added subdir kill
[tridge/junkcode.git] / gethostbyname.c
1 #include <sys/time.h>
2 #include <sys/types.h>
3 #include <stdio.h>
4 #include <unistd.h>
5 #include <fcntl.h>
6 #include <errno.h>
7 #include <sys/socket.h>
8 #include <netinet/in.h>
9 #include <netdb.h>
10
11
12 main(int argc, char *argv[])
13 {
14         char *name = argv[1];
15         struct hostent *hp;
16         struct in_addr addr;
17
18         if (inet_aton(name, &addr) != 0) {
19                 printf("It's an IP\n");
20         } else {
21                 hp = gethostbyname(name);
22         }
23 }
24