X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2Fmygethost.c;fp=sources%2Fmygethost.c;h=11ae1cef264f4bbbfd36d9c071ccf3b9713af635;hp=76cf84477eb5edd568c52c40bf3d6199b30dfb1a;hb=bba36f6db6e48de4fd97f8a1aa15a0d82558e776;hpb=d429b57bfd2108e922838756d4909251065a41f4 diff --git a/sources/mygethost.c b/sources/mygethost.c index 76cf844..11ae1ce 100644 --- a/sources/mygethost.c +++ b/sources/mygethost.c @@ -36,7 +36,7 @@ extern int h_errno; #include "Gapil.h" /* - * Program myhost + * Program mygethost * * Use gethostbyname and print results */ @@ -50,6 +50,18 @@ int main(int argc, char *argv[]) */ int i; struct hostent *data; + + struct sock_level { + int level; + char * name; + } sock_level[] = { + SOL_SOCKET, "SOL_SOCKET", + SOL_IP, "SOL_IP", + SOL_TCP, "SOL_TCP", + SOL_IPV6, "SOL_IPV6", + SOL_ICMPV6, "SOL_ICMPV6" + }; + char **alias; char *addr; char buffer[INET6_ADDRSTRLEN];