From 575b442f78eed0966d4e3c11fac457d939edd00f Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sun, 15 Mar 2015 16:45:02 +0000 Subject: [PATCH] Added comments. FossilOrigin-Name: 00dc8491954f3195b410d70fed386f7e3f717ea1a781a8511c4ab3a875af081a --- src/capwap/dtls_bio.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/capwap/dtls_bio.c b/src/capwap/dtls_bio.c index b0d42d2f..8e0c63a0 100644 --- a/src/capwap/dtls_bio.c +++ b/src/capwap/dtls_bio.c @@ -16,13 +16,25 @@ */ +/** + * @file + * @brief Implements DTLS BIO read/write functions. + */ + + #include #include "cw_log.h" #include "dtls.h" - +/** + * Reads CAPWAP DTLS data from a connection object. + * @param conn conn object + * @param out where to write data to + * @param maxlen maximum number of bytes to read + * @return the number of bytes read + */ int dtls_bio_read(struct conn *conn, char *out, int maxlen) { if (conn->dtls_buffer_len == 0) { @@ -53,7 +65,13 @@ int dtls_bio_read(struct conn *conn, char *out, int maxlen) return ret; } - +/** + * Write DTLS data to a CAPWAP connection. + * @param conn the connection + * @param data data to write + * @param len number of bytes to write + * @return the number of bytes written + */ int dtls_bio_write(struct conn *conn, const char *data, int len) { uint8_t buffer[2048];