X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=sources%2FSockUtil.c;h=421919c2118f950c35d0f7943a6d8e8488a03c9f;hb=31f55ec58bee8b2c4993633849b7da4e30cab222;hp=8b3fef219143d48543cb0e2dd49b79651efb8840;hpb=847a6cd39fe3d885ececc0658dfa5a4862534627;p=gapil.git diff --git a/sources/SockUtil.c b/sources/SockUtil.c index 8b3fef2..421919c 100644 --- a/sources/SockUtil.c +++ b/sources/SockUtil.c @@ -1,4 +1,4 @@ -/* Sockutils.c +/* SockUtil.c * * Copyright (C) 2004 Simone Piccardi * @@ -18,24 +18,21 @@ */ /*************************************************************** * - * File SockUtils.c + * File SockUtil.c * Routines for socket operations. * * Define routines for socket handling * * Author: S. Piccardi * - * $Id$ - * ***************************************************************/ -#include -#include /* standard I/O functions */ -#include -#include -#include +#include /* primitive system data types */ +#include /* standard I/O library */ +#include /* unix standard library */ +#include /* C strings library */ +#include /* error definitions and routines */ +#include /* socket constants, types and functions */ #include -#include -#include #include #include @@ -50,8 +47,6 @@ * Author: Simone Piccardi * Dec. 2004 * - * $Id$ - * **************************************************************************/ char *ip_ntop(struct addrinfo *addr, char *dst, socklen_t cnt) { @@ -82,8 +77,6 @@ char *ip_ntop(struct addrinfo *addr, char *dst, socklen_t cnt) * Author: Simone Piccardi * Dec. 2004 * - * $Id$ - * ****************************************************************/ int sockconn(char *host, char *serv, int prot, int type) { @@ -140,8 +133,6 @@ int sockconn(char *host, char *serv, int prot, int type) * Author: Simone Piccardi * Dec. 2004 * - * $Id$ - * ****************************************************************/ int sockbind(char *host, char *serv, int prot, int type) { @@ -195,15 +186,13 @@ int sockbind(char *host, char *serv, int prot, int type) } /**************************************************************** * - * Routine sockbind2 + * Routine sockbindopt * Return a binded socket given hostname, service, and socket type - * Issue a SO_REUSEADDR on the socket before binding. + * Issue a SO_REUSEADDR on the socket before binding on reuse value. * * Author: Simone Piccardi * Mar. 2005 * - * $Id$ - * ****************************************************************/ int sockbindopt(char *host, char *serv, int prot, int type, int reuse) {