
#include<arpa/inet.h>
#include<netinet/in.h>

#include<netdb.h>
#include<stdio.h>
#include<stdlib.h>



unsigned long resolve_name(char *name)
{
static struct hostent *ht;

if((ht = gethostbyname(name))==NULL){
   #ifdef RESOLV_DEBUG
   fprintf(stderr,"RESOLV: resovname(): following names cannot be solved. %s\n", name);
   #endif
   return 0;
   }

return *((unsigned long *)ht->h_addr_list[0]);
}




