/* gethost.c
*
- * Copyright (C) 2001 Simone Piccardi
+ * Copyright (C) 2005 Simone Piccardi
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* Usage: gethost -h give all info's
*
- * $Id: gethost.c,v 1.3 2003/05/02 09:55:14 piccardi Exp $
- *
****************************************************************/
/*
* Include needed headers
#include <stdlib.h> /* C standard library */
#include <unistd.h> /* unix standard library */
#include <stdio.h> /* standard I/O library */
-#include <string.h> /* string functions */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
+#include <string.h> /* C strings library */
+#include <sys/types.h> /* primitive system data types */
+#include <sys/socket.h> /* socket constants, types and functions */
+#include <netdb.h> /* C resolver library */
-/* Help printing routine */
-void usage(void);
-int main(int argc, char *argv[])
-{
/*
- * Variables definition
+ * Function and globals definitions
*/
+void usage(void); /* Help printing routine */
+
+/*
+ * Main program
+ */
+int main(int argc, char *argv[])
+{
+ /*
+ * Variables definition
+ */
int i;
int use = 0;
struct hostent *host;