*
* Author: S. Piccardi Jul. 2004
*
- * $Id$
- *
*****************************************************************************/
-#include <netdb.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h> /* C standard library */
-#include <stdio.h> /* I/O standard library */
-#include <unistd.h>
-#include <arpa/inet.h>
+#include <sys/types.h> /* primitive system data types */
+#include <sys/stat.h> /* file characteristics constants and functions */
+#include <stdlib.h> /* C standard library */
+#include <stdio.h> /* standard I/O library */
+#include <unistd.h> /* unix standard library */
+#include <arpa/inet.h> /* IP addresses conversion utilities */
+#include <netdb.h> /* C resolver library */
+
+
+
extern int h_errno;
#include "Gapil.h"
/*
- * Program myhost
+ * Program mygethost
*
* Use gethostbyname and print results
*/
*/
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];