From: Arran Cudbard-Bell Date: Sun, 20 Jan 2013 12:42:55 +0000 (+0000) Subject: Remove @version, doxygen seems to parse $id ok X-Git-Tag: release_3_0_0_beta1~1305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=953e166d9711744474db134a5a4a7744016e1753;p=thirdparty%2Ffreeradius-server.git Remove @version, doxygen seems to parse $id ok Add callback docs for connection API --- diff --git a/src/include/connection.h b/src/include/connection.h index b72a2e99c69..074f5d4a641 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -15,12 +15,14 @@ */ #ifndef FR_CONNECTION_H #define FR_CONNECTION_H -/** +/* + * $Id$ + * * @file connection.h * @brief Structures, prototypes and global variables for server connection pools. * - * @version $Id$ - * @copyright 1999,2000,2002,2003,2004,2005,2006,2007,2008 The FreeRADIUS server project + * @copyright 2012 The FreeRADIUS server project + * @copyright 2012 Alan DeKok */ #include @@ -34,8 +36,40 @@ extern "C" { typedef struct fr_connection_pool_t fr_connection_pool_t; +/** Create a new connection handle + * + * This function will be called whenever the connection pool manager needs + * to spawn a new connection, and on reconnect. + * + * @note A function pointer matching this prototype must be passed + * to fr_connection_pool. + * @param[in] ctx pointer passed to fr_connection_pool_init. + * @return NULL on error, else a connection handle. + */ typedef void *(*fr_connection_create_t)(void *ctx); + +/** Check a connection handle is still viable + * + * Should check the state of a connection handle. + * + * @note NULL may be passed to fr_connection_init, if there is no way to check + * the state of a connection handle. + * @note Not currently use by connection pool manager. + * @param[in] ctx pointer passed to fr_connection_pool_init. + * @param[in] connection handle returned by fr_connection_create_t. + * @return < 0 on error or if the connection is unusable, else 0. + */ typedef int (*fr_connection_alive_t)(void *ctx, void *connection); + +/** Delete a connection and free allocated memory + * + * Should close any sockets associated with the passed connection handle, + * and free any memory allocated to it. + * + * @param[in] ctx pointer passed to fr_connection_pool_init. + * @param[in,out] connection handle returned by fr_connection_create_t. + * @return < 0 on error else 0 if connection was closed successfully. + */ typedef int (*fr_connection_delete_t)(void *ctx, void *connection); fr_connection_pool_t *fr_connection_pool_init(CONF_SECTION *cs, diff --git a/src/include/libradius.h b/src/include/libradius.h index c2eeeddba68..ee5567f69d1 100644 --- a/src/include/libradius.h +++ b/src/include/libradius.h @@ -16,11 +16,12 @@ #ifndef LIBRADIUS_H #define LIBRADIUS_H /* + * $Id$ + * * @file libradius.h * @brief Structures and prototypes for the radius library. * - * @version $Id$ - * @copyright 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008 The FreeRADIUS server project + * @copyright 1999-2008 The FreeRADIUS server project */ #include diff --git a/src/include/md5.h b/src/include/md5.h index 380cbc9480e..3002d118d38 100644 --- a/src/include/md5.h +++ b/src/include/md5.h @@ -1,8 +1,9 @@ /* + * $Id$ + * * @file md5.h * @brief Structures and prototypes for md5. * - * @version $Id$ * @license LGPL, but largely derived from a public domain source. */ diff --git a/src/include/modules.h b/src/include/modules.h index a9a5daae2bc..c306d681fed 100644 --- a/src/include/modules.h +++ b/src/include/modules.h @@ -1,8 +1,25 @@ /* + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* + * $Id$ + * * @file modules.h * @brief Interface to the RADIUS module system. * - * @version $Id$ * @copyright 2013 The FreeRADIUS server project */ diff --git a/src/include/radiusd.h b/src/include/radiusd.h index 8aa9b869a16..7e0081459e6 100644 --- a/src/include/radiusd.h +++ b/src/include/radiusd.h @@ -16,11 +16,12 @@ #ifndef RADIUSD_H #define RADIUSD_H /* + * $Id$ + * * @file radiusd.h * @brief Structures, prototypes and global variables for the FreeRADIUS server. * - * @version $Id$ - * @copyright 1999,2000,2002,2003,2004,2005,2006,2007,2008 The FreeRADIUS server project + * @copyright 1999-2000,2002-2008 The FreeRADIUS server project */ #include diff --git a/src/include/soh.h b/src/include/soh.h index db3cc83efec..96b750b90c6 100644 --- a/src/include/soh.h +++ b/src/include/soh.h @@ -16,10 +16,11 @@ #ifndef FR_SOH_H #define FR_SOH_H /* + * $Id$ + * * @file soh.h * @brief Microsoft SoH support * - * @version $Id$ * @copyright 2010 Phil Mayers */ diff --git a/src/include/tcp.h b/src/include/tcp.h index cb86062ac4d..c45779e8123 100644 --- a/src/include/tcp.h +++ b/src/include/tcp.h @@ -16,10 +16,11 @@ #ifndef FR_TCP_H #define FR_TCP_H /* + * $Id$ + * * @file tcp.h * @brief RADIUS over TCP * - * @version $Id$ * @copyright 2009 Dante http://dante.net */ diff --git a/src/include/tls-h b/src/include/tls-h index d855c6a5a94..a44c134af0e 100644 --- a/src/include/tls-h +++ b/src/include/tls-h @@ -18,10 +18,11 @@ #ifdef WITH_TLS /* + * $Id$ + * * @file tls.h * @brief Structures and prototypes for TLS wrappers * - * @version $Id$ * @copyright 2010 Network RADIUS SARL */ diff --git a/src/include/token.h b/src/include/token.h index c3bf7753d30..bdf60bf4a0e 100644 --- a/src/include/token.h +++ b/src/include/token.h @@ -17,10 +17,11 @@ #define FR_TOKEN_H /* + * $Id$ + * * @file token.h * @brief Tokenisation code and constants. * - * @version $Id$ * @copyright 2001,2006 The FreeRADIUS server project */ diff --git a/src/include/udpfromto.h b/src/include/udpfromto.h index 3e7ddb8395a..3a954ff8035 100644 --- a/src/include/udpfromto.h +++ b/src/include/udpfromto.h @@ -1,10 +1,9 @@ #ifndef UDPFROMTO_H #define UDPFROMTO_H /* - * @file udpfromto.h + * $Id$ * - * @version $Id$ - * @copyright 2013 The FreeRADIUS server project + * @file udpfromto.h */ #include diff --git a/src/include/vmps.h b/src/include/vmps.h index fb7bd1b2c51..69eb558afcd 100644 --- a/src/include/vmps.h +++ b/src/include/vmps.h @@ -1,11 +1,27 @@ +/* + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ #ifndef VMPS_H #define VMPS_H /* + * $Id$ + * * @file vmps.h * @brief Routines to handle VMPS sockets. * - * @version $Id$ - * @copyright 2013 The FreeRADIUS server project + * @copyright 2013 The FreeRADIUS server project */ #include diff --git a/src/include/vqp.h b/src/include/vqp.h index 6c598ecf60b..a875a649d9a 100644 --- a/src/include/vqp.h +++ b/src/include/vqp.h @@ -17,10 +17,11 @@ #define FR_VQP_H /* + * $Id$ + * * @file vqp.h * @brief Structures and prototypes for Cisco's VLAN Query Protocol * - * @version $Id$ * @copyright 2007 The FreeRADIUS server project * @copyright 2007 Alan DeKok */ diff --git a/src/lib/radius.c b/src/lib/radius.c index 30f3be041a3..e08420f423f 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -15,10 +15,11 @@ */ /* + * $Id$ + * * @file radius.c * @brief Functions to send/receive radius packets. * - * @version $Id$ * @copyright 2000-2003,2006 The FreeRADIUS server project */ diff --git a/src/main/connection.c b/src/main/connection.c index 56c7736b82b..0ceaa39ea2c 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -82,7 +82,7 @@ struct fr_connection_pool_t { //!< and maintain. int cleanup_delay; //!< How long a connection can go unused //!< for before it's closed - //!< (0 is infinite) + //!< (0 is infinite). int max_uses; //!< Maximum number of times a //!< connection can be used before being //!< closed. @@ -105,9 +105,10 @@ struct fr_connection_pool_t { //!< configuration parameters. time_t last_throttled; //!< Last time we refused to spawn a //!< connection because the last - //!< connection failed. + //!< connection failed, or we were + //!< already spawning a connection. time_t last_at_max; //!< Last time we hit the maximum number - //!< of allowed connections + //!< of allowed connections. unsigned int count; //!< Number of connections spawned over //!< the lifetime of the pool. @@ -430,7 +431,7 @@ static void fr_connection_close(fr_connection_pool_t *pool, /** Find a connection handle in the connection list * * Walks over the list of connections searching for a specified connection - * handle, and returns the first connection that contains that pointer. + * handle and returns the first connection that contains that pointer. * * @note Will lock mutex and only release mutex if connection handle * is not found, so will usually return will mutex held. diff --git a/src/main/exec.c b/src/main/exec.c index bbcb6f24b30..88865d8dd87 100644 --- a/src/main/exec.c +++ b/src/main/exec.c @@ -15,10 +15,11 @@ */ /* + * $Id$ + * * @file exec.c * @brief Execute external programs. * - * @version $Id$ * @copyright 2000-2004,2006 The FreeRADIUS server project */ diff --git a/src/main/process.c b/src/main/process.c index 49c5ec19fec..518081fc32c 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -14,11 +14,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/** +/* + * $Id$ + * * @file process.c * @brief Defines the state machines that control how requests are processed. * - * @version $Id$ * @copyright 2012 The FreeRADIUS server project * @copyright 2012 Alan DeKok */ diff --git a/src/main/soh.c b/src/main/soh.c index 293f35c9461..a17980acded 100644 --- a/src/main/soh.c +++ b/src/main/soh.c @@ -15,10 +15,11 @@ */ /* + * $Id$ + * * @file soh.c * @brief Implements the MS-SOH parsing code. This is called from rlm_eap_peap * - * @version $Id$ * @copyright 2010 Phil Mayers */ diff --git a/src/main/valuepair.c b/src/main/valuepair.c index 5607caf1b59..98c4da60afe 100644 --- a/src/main/valuepair.c +++ b/src/main/valuepair.c @@ -15,13 +15,14 @@ */ /* + * $Id$ + * * @brief Valuepair functions that are radiusd-specific and as such do not * belong in the library. * @file main/valuepair.c * * @ingroup AVP * - * @version $Id$ * @copyright 2000,2006 The FreeRADIUS server project * @copyright 2000 Alan DeKok */ diff --git a/src/main/xlat.c b/src/main/xlat.c index 8af4e1dd9b4..d7606c87b1d 100644 --- a/src/main/xlat.c +++ b/src/main/xlat.c @@ -15,10 +15,11 @@ */ /* + * $Id$ + * * @file xlat.c * @brief String expansion ("translation"). Implements %Attribute -> value * - * @version $Id$ * @copyright 2000,2006 The FreeRADIUS server project * @copyright 2000 Alan DeKok */ diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index 1d6ac4bf3ed..1641f13a931 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -14,11 +14,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/** +/* + * $Id$ + * * @brief Functions and datatypes for the REST (HTTP) transport. * @file rest.c * - * @version $Id$ * @copyright 2012-2013 Arran Cudbard-Bell */ diff --git a/src/modules/rlm_rest/rest.h b/src/modules/rlm_rest/rest.h index f74c11bb076..aa1df13698f 100644 --- a/src/modules/rlm_rest/rest.h +++ b/src/modules/rlm_rest/rest.h @@ -15,17 +15,18 @@ */ /* - * @brief Function prototypes datatypes for the REST (HTTP) transport. + * $Id$ + * + * @brief Function prototypes and datatypes for the REST (HTTP) transport. * @file rest.h * - * @version $Id$ * @copyright 2012-2013 Arran Cudbard-Bell */ + #include -#include - RCSIDH(other_h, "$Id$") +#include #include "config.h" #ifdef HAVE_JSON_JSONH