X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Flocate_host.c;h=7b5869907c8cb3cdb9c54e13295b3a5689c43ff4;hb=694a3ea878536e2deda1c0168e51837a31b81af7;hp=923a68165ad003c1e600ace51e6c9e2b29090220;hpb=7836de1a004d9353cadb71885e360715884d1601;p=citadel.git diff --git a/webcit/locate_host.c b/webcit/locate_host.c index 923a68165..7b5869907 100644 --- a/webcit/locate_host.c +++ b/webcit/locate_host.c @@ -1,36 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #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; @@ -51,3 +40,5 @@ void locate_host(char *tbuf, int client_socket) } safestrncpy(tbuf, ch->h_name, 64); } + +/*@}*/