summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-18 14:05:44 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-18 14:05:44 +0000
commit2fc4f88977dd638ebc718c9374bb3fa56551171f (patch)
treee8648edb413e02bb34959946a580b98905852403 /src
parent433e2295e3f7fbb3e61b54489b9ee392914f3bff (diff)
-doxygen
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_connection_lib.h8
-rw-r--r--src/include/gnunet_server_lib.h15
-rw-r--r--src/util/connection.c16
-rw-r--r--src/util/server.c36
4 files changed, 40 insertions, 35 deletions
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h
index c37666e38..c4c76a7eb 100644
--- a/src/include/gnunet_connection_lib.h
+++ b/src/include/gnunet_connection_lib.h
@@ -161,14 +161,14 @@ GNUNET_CONNECTION_create_from_existing (struct GNUNET_NETWORK_Handle *osSocket);
* Create a connection handle by accepting on a listen socket. This
* function may block if the listen socket has no connection ready.
*
- * @param access function to use to check if access is allowed
- * @param access_cls closure for access
+ * @param access_cb function to use to check if access is allowed
+ * @param access_cb_cls closure for @a access_cb
* @param lsock listen socket
* @return the connection handle, NULL on error (for example, access refused)
*/
struct GNUNET_CONNECTION_Handle *
-GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
- void *access_cls,
+GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access_cb,
+ void *access_cb_cls,
struct GNUNET_NETWORK_Handle *lsock);
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h
index 207f76a44..6b6dac1ac 100644
--- a/src/include/gnunet_server_lib.h
+++ b/src/include/gnunet_server_lib.h
@@ -119,8 +119,8 @@ struct GNUNET_SERVER_MessageHandler
/**
* Create a new server.
*
- * @param access function for access control
- * @param access_cls closure for @a access
+ * @param access_cb function for access control
+ * @param access_cb_cls closure for @a access_cb
* @param lsocks NULL-terminated array of listen sockets
* @param idle_timeout after how long should we timeout idle connections?
* @param require_found if #GNUNET_YES, connections sending messages of unknown type
@@ -129,8 +129,8 @@ struct GNUNET_SERVER_MessageHandler
* (typically, "port" already in use)
*/
struct GNUNET_SERVER_Handle *
-GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
- void *access_cls,
+GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access_cb,
+ void *access_cb_cls,
struct GNUNET_NETWORK_Handle **lsocks,
struct GNUNET_TIME_Relative idle_timeout,
int require_found);
@@ -138,8 +138,8 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
/**
* Create a new server.
*
- * @param access function for access control
- * @param access_cls closure for @a access
+ * @param access_cb function for access control
+ * @param access_cb_cls closure for @a access_cb
* @param server_addr address toes listen on (including port), NULL terminated array
* @param socklen lengths of respective @a server_addr
* @param idle_timeout after how long should we timeout idle connections?
@@ -149,7 +149,8 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
* (typically, "port" already in use)
*/
struct GNUNET_SERVER_Handle *
-GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls,
+GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access_cb,
+ void *access_cb_cls,
struct sockaddr *const *server_addr,
const socklen_t * socklen,
struct GNUNET_TIME_Relative idle_timeout,
diff --git a/src/util/connection.c b/src/util/connection.c
index 71135d6b8..8fe136b02 100644
--- a/src/util/connection.c
+++ b/src/util/connection.c
@@ -204,12 +204,12 @@ struct GNUNET_CONNECTION_Handle
/**
* Read task that we may need to wait for.
*/
- struct GNUNET_SCHEDULER_Task * read_task;
+ struct GNUNET_SCHEDULER_Task *read_task;
/**
* Write task that we may need to wait for.
*/
- struct GNUNET_SCHEDULER_Task * write_task;
+ struct GNUNET_SCHEDULER_Task *write_task;
/**
* Handle to a pending DNS lookup request.
@@ -311,14 +311,14 @@ GNUNET_CONNECTION_create_from_existing (struct GNUNET_NETWORK_Handle *osSocket)
* Create a connection handle by accepting on a listen socket. This
* function may block if the listen socket has no connection ready.
*
- * @param access function to use to check if access is allowed
- * @param access_cls closure for access
+ * @param access_cb function to use to check if access is allowed
+ * @param access_cb_cls closure for @a access_cb
* @param lsock listen socket
* @return the connection handle, NULL on error
*/
struct GNUNET_CONNECTION_Handle *
-GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
- void *access_cls,
+GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access_cb,
+ void *access_cb_cls,
struct GNUNET_NETWORK_Handle *lsock)
{
struct GNUNET_CONNECTION_Handle *connection;
@@ -415,8 +415,8 @@ GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
#endif
}
- if ((NULL != access) &&
- (GNUNET_YES != (aret = access (access_cls, gcp, uaddr, addrlen))))
+ if ((NULL != access_cb) &&
+ (GNUNET_YES != (aret = access_cb (access_cb_cls, gcp, uaddr, addrlen))))
{
if (GNUNET_NO == aret)
LOG (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/util/server.c b/src/util/server.c
index 94d781870..d05df089f 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -122,12 +122,12 @@ struct GNUNET_SERVER_Handle
/**
* Function to call for access control.
*/
- GNUNET_CONNECTION_AccessCheck access;
+ GNUNET_CONNECTION_AccessCheck access_cb;
/**
- * Closure for access.
+ * Closure for @e access_cb.
*/
- void *access_cls;
+ void *access_cb_cls;
/**
* NULL-terminated array of sockets used to listen for new
@@ -413,8 +413,8 @@ process_listen_socket (void *cls,
if (GNUNET_NETWORK_fdset_isset (tc->read_ready, server->listen_sockets[i]))
{
sock =
- GNUNET_CONNECTION_create_from_accept (server->access,
- server->access_cls,
+ GNUNET_CONNECTION_create_from_accept (server->access_cb,
+ server->access_cb_cls,
server->listen_sockets[i]);
if (NULL != sock)
{
@@ -522,8 +522,8 @@ open_listen_socket (const struct sockaddr *server_addr, socklen_t socklen)
/**
* Create a new server.
*
- * @param access function for access control
- * @param access_cls closure for access
+ * @param access_cb function for access control
+ * @param access_cb_cls closure for @a access_cb
* @param lsocks NULL-terminated array of listen sockets
* @param idle_timeout after how long should we timeout idle connections?
* @param require_found if #GNUNET_YES, connections sending messages of unknown type
@@ -532,8 +532,8 @@ open_listen_socket (const struct sockaddr *server_addr, socklen_t socklen)
* (typically, "port" already in use)
*/
struct GNUNET_SERVER_Handle *
-GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
- void *access_cls,
+GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access_cb,
+ void *access_cb_cls,
struct GNUNET_NETWORK_Handle **lsocks,
struct GNUNET_TIME_Relative idle_timeout,
int require_found)
@@ -543,8 +543,8 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
server = GNUNET_new (struct GNUNET_SERVER_Handle);
server->idle_timeout = idle_timeout;
server->listen_sockets = lsocks;
- server->access = access;
- server->access_cls = access_cls;
+ server->access_cb = access_cb;
+ server->access_cb_cls = access_cb_cls;
server->require_found = require_found;
if (NULL != lsocks)
GNUNET_SERVER_resume (server);
@@ -555,8 +555,8 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
/**
* Create a new server.
*
- * @param access function for access control
- * @param access_cls closure for access
+ * @param access_cb function for access control
+ * @param access_cb_cls closure for @a access_cb
* @param server_addr address to listen on (including port), NULL terminated array
* @param socklen length of server_addr
* @param idle_timeout after how long should we timeout idle connections?
@@ -566,7 +566,8 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
* (typically, "port" already in use)
*/
struct GNUNET_SERVER_Handle *
-GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls,
+GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access_cb,
+ void *access_cb_cls,
struct sockaddr *const *server_addr,
const socklen_t * socklen,
struct GNUNET_TIME_Relative idle_timeout,
@@ -619,8 +620,11 @@ GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls,
{
lsocks = NULL;
}
- return GNUNET_SERVER_create_with_sockets (access, access_cls, lsocks,
- idle_timeout, require_found);
+ return GNUNET_SERVER_create_with_sockets (access_cb,
+ access_cb_cls,
+ lsocks,
+ idle_timeout,
+ require_found);
}