diff options
author | Paul Traina <pst@FreeBSD.org> | 1996-01-23 01:35:04 +0000 |
---|---|---|
committer | Paul Traina <pst@FreeBSD.org> | 1996-01-23 01:35:04 +0000 |
commit | e08ac58bbe2be2817736b8f4b32c75f8d55359df (patch) | |
tree | 145d6ce072fde2eeda7863a006d92fd2c1eec916 /libexec/bootpd/trygetif.c | |
parent | a270abb407a717b6c38a10d1c996af9ac907f84a (diff) | |
download | src-e08ac58bbe2be2817736b8f4b32c75f8d55359df.tar.gz src-e08ac58bbe2be2817736b8f4b32c75f8d55359df.zip |
Import bootpd-2.4.3 from ftp.mc.com
Notes
Notes:
svn path=/cvs2svn/branches/MC/; revision=13572
Diffstat (limited to 'libexec/bootpd/trygetif.c')
-rw-r--r-- | libexec/bootpd/trygetif.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libexec/bootpd/trygetif.c b/libexec/bootpd/trygetif.c index 894f17b6e917..8c78ee34247a 100644 --- a/libexec/bootpd/trygetif.c +++ b/libexec/bootpd/trygetif.c @@ -9,6 +9,9 @@ #include <sys/sockio.h> #endif +#ifdef _AIX32 +#include <sys/time.h> /* for struct timeval in net/if.h */ +#endif #include <net/if.h> /* for struct ifreq */ #include <netinet/in.h> #include <arpa/inet.h> /* inet_ntoa */ @@ -23,23 +26,26 @@ int debug = 0; char *progname; +void main(argc, argv) + int argc; char **argv; { struct hostent *hep; - struct sockaddr ea; /* Ethernet address */ struct sockaddr_in *sip; /* Interface address */ struct ifreq *ifr; struct in_addr dst_addr; struct in_addr *dap; - int i, s; + int s; progname = argv[0]; /* for report */ dap = NULL; if (argc > 1) { dap = &dst_addr; - if (inet_aton(argv[1], &dst_addr) == 0) { + if (isdigit(argv[1][0])) + dst_addr.s_addr = inet_addr(argv[1]); + else { hep = gethostbyname(argv[1]); if (!hep) { printf("gethostbyname(%s)\n", argv[1]); |