doxify client.h
[paraslash.git] / net.c
diff --git a/net.c b/net.c
index 28bc777d4dde6f56be5414d4d8d92aeb0d47ab6e..5a7eb9175427c2fcee0f4d3a2532870fb11dcc08 100644 (file)
--- a/net.c
+++ b/net.c
 #include "string.h"
 #include "error.h"
 
+
+/** \cond holds information about one encrypted connection */
 struct crypt_data {
        crypt_function *recv;
        crypt_function *send;
        void *private_data;
 };
-
 static struct crypt_data *crypt_data_array;
 static unsigned cda_size = 0;
+/** \endcond */
+
 
+/**
+ * activate encryption for one file descriptor
+ *
+ * \param fd the file descriptor
+ * \param recv the function used for decrypting received data
+ * \param send the function used for encrypting before sending
+ * \param private_data user data supplied by the caller
+ */
 void enable_crypt(int fd, crypt_function *recv, crypt_function *send,
        void *private_data)
 {
@@ -48,6 +59,13 @@ void enable_crypt(int fd, crypt_function *recv, crypt_function *send,
        PARA_INFO_LOG("rc4 encryption activated for fd %d\n", fd);
 }
 
+/**
+ * deactivate encryption for a given fd
+ *
+ * \param fd the file descriptor
+ *
+ * This must be called if and only if \p fd was activated via enable_crypt().
+ */
 void disable_crypt(int fd)
 {
        if (cda_size < fd + 1)