Began making changes to do better handling of character sets.
[citadel.git] / webcit / locate_host.c
index ba7026216393a772538d2361df8cbb7c1a50b32e..7b5869907c8cb3cdb9c54e13295b3a5689c43ff4 100644 (file)
@@ -1,17 +1,25 @@
 /*
  * $Id$
- *
- * Examine a socket and determine the name/address of the originating host.
  */
-
+/**
+ * \defgroup Hostlookup Examine a socket and determine the name/address of the originating host.
+ * \ingroup WebcitHttpServer
+ */
+/*@{*/
 
 #include "webcit.h"
 
+/**
+ * \brief get a hostname 
+ * \todo buffersize?
+ * \param tbuf the returnbuffer
+ * \param client_socket the sock fd where the client is connected
+ */
 void locate_host(char *tbuf, int client_socket)
 {
        struct sockaddr_in cs;
        struct hostent *ch;
-       int len;
+       socklen_t len;
        char *i;
        int a1, a2, a3, a4;
 
@@ -32,3 +40,5 @@ void locate_host(char *tbuf, int client_socket)
        }
        safestrncpy(tbuf, ch->h_name, 64);
 }
+
+/*@}*/