[dhcp-agent-commits] dhcp-agent/src dhcp-libutil.h,1.20,1.21 dhcp-util.c,1.11,1.12
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2002-12-29 05:31:39
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv9833 Modified Files: dhcp-libutil.h dhcp-util.c Log Message: removed resolv() Index: dhcp-libutil.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-libutil.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** dhcp-libutil.h 29 Dec 2002 05:09:55 -0000 1.20 --- dhcp-libutil.h 29 Dec 2002 05:31:35 -0000 1.21 *************** *** 184,188 **** extern struct timeval timeval_diff(struct timeval begin, struct timeval end); extern const char *getprogname(void); - extern int resolv(char *address, uint32_t *addr); extern ip_addr_t *string_ip_to_ip_addr(const char *string_ip); extern eth_addr_t *string_eth_addr_to_eth_addr(const char *eth_ip); --- 184,187 ---- Index: dhcp-util.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-util.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dhcp-util.c 23 Dec 2002 00:51:25 -0000 1.11 --- dhcp-util.c 29 Dec 2002 05:31:36 -0000 1.12 *************** *** 468,497 **** } - /* Returns 0 on success or -1 if error. - * Fills in addr with 32-bit ipv4 address */ - - extern int h_errno; - - int resolv(char *address, uint32_t *addr) - { - struct hostent *host; - - *(addr) = inet_addr(address); - - if(*(addr) == INADDR_NONE) { - - host = gethostbyname(address); - - if(host == NULL) { - ERROR_MESSAGE("rawnet: unable to resolv host: %s", hstrerror(h_errno)); - return -1; - } - - memcpy(&addr, (int *)*&host->h_addr, sizeof(addr)); - } - - return 0; - } - void set_interactive(uint8_t interactive_arg) { --- 468,471 ---- |