Browse code

Review doxygen warnings

We write doxygen comments but we do not verify them. So
quite some errors have crept in. Trying to reduce them
by reviewing the warnings output of doxygen and addressing
most of them.

Did generally ignore "The following parameter is not documented"
warnings (except those caused by typos). Fixing those will
require more work.

Usual errors fixed:
- Wrong usage of @file
- Wrong spellings of @param
- Desync between function declaration and comment
(usually param names)

Change-Id: I7a852eb5fafae3a0e85dd89ea6d4c91fcf2fab4e
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20241227161648.3350-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg30256.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Frank Lichtenheld authored on 2024/12/28 01:16:48
Showing 49 changed files
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Compression module documentation file.
26
+ * @file
27
+ * Data Channel Compression module documentation file.
27 28
  */
28 29
 
29 30
 /**
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Network protocol overview documentation file.
26
+ * @file
27
+ * Network protocol overview documentation file.
27 28
  */
28 29
 
29 30
 /**
... ...
@@ -44,7 +44,7 @@ plugin_base64_decode_t ovpn_base64_decode = NULL;  /**< Pointer to the openvpn_b
44 44
  * returns, any returned pointers are invalid.
45 45
  *
46 46
  * @param name  String containing the env.var name to search for
47
- * @param envp  String array pointer to the environment variable
47
+ * @param envp  String array pointer to the environment variables
48 48
  *
49 49
  * @return Returns a pointer to the value in the environment variable
50 50
  *         table on successful match.  Otherwise NULL is returned
... ...
@@ -138,10 +138,11 @@ openvpn_plugin_open_v3(const int v3structver,
138 138
  * For the arguments, see the include/openvpn-plugin.h file
139 139
  * for details on the function parameters
140 140
  *
141
- * @param args        Pointer to a struct with details about the plug-in
142
- *                    call from the main OpenVPN process.
143
- * @param returndata  Pointer to a struct where the plug-in can provide
144
- *                    information back to OpenVPN to be processed
141
+ * @param handle   Pointer to the plug-in global context buffer, which
142
+ *                 need to be released by this function
143
+ * @param type     Type of the hook
144
+ * @param argv     String array pointer to arguments for the hook
145
+ * @param envp     String array pointer to current environment variables
145 146
  *
146 147
  * @return  Must return OPENVPN_PLUGIN_FUNC_SUCCESS or
147 148
  *          OPENVPN_PLUGIN_FUNC_DEFERRED on success.  Otherwise it
... ...
@@ -42,7 +42,7 @@
42 42
  *  Resizes the list of arguments struct argv can carry.  This resize
43 43
  *  operation will only increase the size, never decrease the size.
44 44
  *
45
- *  @param *a      Valid pointer to a struct argv to resize
45
+ *  @param a       Valid pointer to a struct argv to resize
46 46
  *  @param newcap  size_t with the new size of the argument list.
47 47
  */
48 48
 static void
... ...
@@ -66,7 +66,7 @@ argv_extend(struct argv *a, const size_t newcap)
66 66
  *  Initialise an already allocated struct argv.
67 67
  *  It is expected that the input argument is a valid pointer.
68 68
  *
69
- *  @param *a  Pointer to a struct argv to initialise
69
+ *  @param a  Pointer to a struct argv to initialise
70 70
  */
71 71
 static void
72 72
 argv_init(struct argv *a)
... ...
@@ -96,7 +96,7 @@ argv_new(void)
96 96
  *  Frees all memory allocations allocated by the struct argv
97 97
  *  related functions.
98 98
  *
99
- *  @param *a  Valid pointer to a struct argv to release memory from
99
+ *  @param a  Valid pointer to a struct argv to release memory from
100 100
  */
101 101
 void
102 102
 argv_free(struct argv *a)
... ...
@@ -108,7 +108,7 @@ argv_free(struct argv *a)
108 108
  *  Resets the struct argv to an initial state.  No memory buffers
109 109
  *  will be released by this call.
110 110
  *
111
- *  @param *a      Valid pointer to a struct argv to resize
111
+ *  @param a      Valid pointer to a struct argv to resize
112 112
  */
113 113
 static void
114 114
 argv_reset(struct argv *a)
... ...
@@ -133,7 +133,7 @@ argv_reset(struct argv *a)
133 133
  *  This approach ensures that the list does grow bulks and only when the
134 134
  *  current limit is reached.
135 135
  *
136
- *  @param *a   Valid pointer to the struct argv to extend
136
+ *  @param a    Valid pointer to the struct argv to extend
137 137
  *  @param add  size_t with the number of elements to add.
138 138
  *
139 139
  */
... ...
@@ -150,9 +150,9 @@ argv_grow(struct argv *a, const size_t add)
150 150
  *  This will ensure the list size in struct argv has the needed capacity to
151 151
  *  store the value.
152 152
  *
153
- *  @param *a    struct argv where to append the new string value
154
- *  @param *str  Pointer to string to append.  The provided string *MUST* have
155
- *               been malloc()ed or NULL.
153
+ *  @param a    struct argv where to append the new string value
154
+ *  @param str  Pointer to string to append.  The provided string *MUST* have
155
+ *              been malloc()ed or NULL.
156 156
  */
157 157
 static void
158 158
 argv_append(struct argv *a, char *str)
... ...
@@ -167,7 +167,7 @@ argv_append(struct argv *a, char *str)
167 167
  *  values being copied from the source input.
168 168
  *
169 169
  *
170
- *  @param *source   Valid pointer to the source struct argv to clone.  It may
170
+ *  @param source    Valid pointer to the source struct argv to clone.  It may
171 171
  *                   be NULL.
172 172
  *  @param headroom  Number of slots to leave empty in front of the slots
173 173
  *                   copied from the source.
... ...
@@ -199,8 +199,8 @@ argv_clone(const struct argv *source, const size_t headroom)
199 199
 /**
200 200
  *  Inserts an argument string in front of all other argument slots.
201 201
  *
202
- *  @param  *a     Valid pointer to the struct argv to insert the argument into
203
- *  @param  *head  Pointer to the char * string with the argument to insert
202
+ *  @param  a     Valid pointer to the struct argv to insert the argument into
203
+ *  @param  head  Pointer to the string with the argument to insert
204 204
  *
205 205
  *  @returns Returns a new struct argv with the inserted argument in front
206 206
  */
... ...
@@ -217,8 +217,8 @@ argv_insert_head(const struct argv *a, const char *head)
217 217
  *  Generate a single string with all the arguments in a struct argv
218 218
  *  concatenated.
219 219
  *
220
- *  @param *a    Valid pointer to the struct argv with the arguments to list
221
- *  @param *gc   Pointer to a struct gc_arena managed buffer
220
+ *  @param a     Valid pointer to the struct argv with the arguments to list
221
+ *  @param gc    Pointer to a struct gc_arena managed buffer
222 222
  *  @param flags Flags passed to the print_argv() function.
223 223
  *
224 224
  *  @returns Returns a string generated by print_argv() with all the arguments
... ...
@@ -237,7 +237,7 @@ argv_str(const struct argv *a, struct gc_arena *gc, const unsigned int flags)
237 237
  *  Write the arguments stored in a struct argv via the msg() command.
238 238
  *
239 239
  *  @param msglev  Integer with the message level used by msg().
240
- *  @param *a      Valid pointer to the struct argv with the arguments to write.
240
+ *  @param a       Valid pointer to the struct argv with the arguments to write.
241 241
  */
242 242
 void
243 243
 argv_msg(const int msglev, const struct argv *a)
... ...
@@ -251,9 +251,9 @@ argv_msg(const int msglev, const struct argv *a)
251 251
  *  Similar to argv_msg() but prefixes the messages being written with a
252 252
  *  given string.
253 253
  *
254
- *  @param msglev   Integer with the message level used by msg().
255
- *  @param *a       Valid pointer to the struct argv with the arguments to write
256
- *  @param *prefix  Valid char * pointer to the prefix string
254
+ *  @param msglev  Integer with the message level used by msg().
255
+ *  @param a       Valid pointer to the struct argv with the arguments to write
256
+ *  @param prefix  Valid pointer to the prefix string
257 257
  *
258 258
  */
259 259
 void
... ...
@@ -272,13 +272,13 @@ argv_msg_prefix(const int msglev, const struct argv *a, const char *prefix)
272 272
  *  format string, with space replaced by delim and adds the number of
273 273
  *  arguments to the count parameter.
274 274
  *
275
- *  @param *format  Pointer to a the format string to process
276
- *  @param delim    Char with the delimiter to use
277
- *  @param *count   size_t pointer used to return the number of
278
- *                  tokens (argument slots) found in the format string.
279
- *  @param *gc      Pointer to a gc_arena managed buffer.
275
+ *  @param format  Pointer to a the format string to process
276
+ *  @param delim   Char with the delimiter to use
277
+ *  @param count   size_t pointer used to return the number of
278
+ *                 tokens (argument slots) found in the format string.
279
+ *  @param gc      Pointer to a gc_arena managed buffer.
280 280
  *
281
- *  @returns Returns a parsed format string (char *), together with the
281
+ *  @returns Returns a parsed format string, together with the
282 282
  *           number of tokens parts found (via *count).  The result string
283 283
  *           is allocated within the gc_arena managed buffer.  If the
284 284
  *           gc_arena pointer is NULL, the returned string must be explicitly
... ...
@@ -332,11 +332,11 @@ argv_prep_format(const char *format, const char delim, size_t *count,
332 332
  *  argv_prep_format() before we let libc's printf() do the parsing.
333 333
  *  Then split the resulting string at the injected delimiters.
334 334
  *
335
- *  @param *argres  Valid pointer to a struct argv where the resulting parsed
336
- *                  arguments, based on the format string.
337
- *  @param *format  Char* string with a printf() compliant format string
338
- *  @param arglist  A va_list with the arguments to be consumed by the format
339
- *                  string
335
+ *  @param argres  Valid pointer to a struct argv where the resulting parsed
336
+ *                 arguments, based on the format string.
337
+ *  @param format  Char string with a printf() compliant format string
338
+ *  @param arglist A va_list with the arguments to be consumed by the format
339
+ *                 string
340 340
  *
341 341
  *  @returns Returns true if the parsing and processing was successfully.  If
342 342
  *           the resulting number of arguments does not match the expected
... ...
@@ -429,8 +429,8 @@ out:
429 429
  *  This will always reset and ensure the result is based on a pristine
430 430
  *  struct argv.
431 431
  *
432
- *  @param *argres  Valid pointer to a struct argv where the result will be put.
433
- *  @param *format  printf() compliant (char *) format string.
432
+ *  @param argres  Valid pointer to a struct argv where the result will be put.
433
+ *  @param format  printf() compliant format string.
434 434
  *
435 435
  *  @returns Returns true if the parsing was successful.  See
436 436
  *           argv_printf_arglist() for more details.  The parsed result will
... ...
@@ -453,8 +453,8 @@ argv_printf(struct argv *argres, const char *format, ...)
453 453
  *  struct argv and populets the argument slots based on the printf() based
454 454
  *  format string.
455 455
  *
456
- *  @param *argres  Valid pointer to a struct argv where the result will be put.
457
- *  @param *format  printf() compliant (char *) format string.
456
+ *  @param argres  Valid pointer to a struct argv where the result will be put.
457
+ *  @param format  printf() compliant format string.
458 458
  *
459 459
  *  @returns Returns true if the parsing was successful.  See
460 460
  *           argv_printf_arglist() for more details.  The parsed result will
... ...
@@ -474,9 +474,9 @@ argv_printf_cat(struct argv *argres, const char *format, ...)
474 474
  *  Parses a command string, tokenizes it and puts each element into a separate
475 475
  *  struct argv argument slot.
476 476
  *
477
- *  @params *argres  Valid pointer to a struct argv where the parsed result
478
- *                   will be found.
479
- *  @params *cmdstr  Char * based string to parse
477
+ *  @param argres  Valid pointer to a struct argv where the parsed result
478
+ *                 will be found.
479
+ *  @param cmdstr  Char based string to parse
480 480
  *
481 481
  */
482 482
 void
... ...
@@ -1218,7 +1218,7 @@ struct buffer_list *buffer_list_file(const char *fn, int max_line_len);
1218 1218
 /**
1219 1219
  * buffer_read_from_file - copy the content of a file into a buffer
1220 1220
  *
1221
- * @param file      path to the file to read
1221
+ * @param filename  path to the file to read
1222 1222
  * @param gc        the garbage collector to use when allocating the buffer. It
1223 1223
  *                  is passed to alloc_buf_gc() and therefore can be NULL.
1224 1224
  *
... ...
@@ -112,7 +112,7 @@ query_user_exec(void)
112 112
 
113 113
 
114 114
 /**
115
- * A plain "make Gert happy" wrapper.  Same arguments as @query_user_add
115
+ * A plain "make Gert happy" wrapper.  Same arguments as query_user_add()
116 116
  *
117 117
  * FIXME/TODO: Remove this when refactoring the complete user query process
118 118
  *             to be called at start-up initialization of OpenVPN.
... ...
@@ -166,7 +166,7 @@ open_tty(const bool write)
166 166
 /**
167 167
  * Closes the TTY FILE pointer, but only if it is not a stdin/stderr FILE object.
168 168
  *
169
- * @params fp     FILE pointer to close
169
+ * @param fp     FILE pointer to close
170 170
  *
171 171
  */
172 172
 static void
... ...
@@ -184,10 +184,10 @@ close_tty(FILE *fp)
184 184
 /**
185 185
  *  Core function for getting input from console
186 186
  *
187
- *  @params prompt    The prompt to present to the user
188
- *  @params echo      Should the user see what is being typed
189
- *  @params input     Pointer to the buffer used to save the user input
190
- *  @params capacity  Size of the input buffer
187
+ *  @param prompt    The prompt to present to the user
188
+ *  @param echo      Should the user see what is being typed
189
+ *  @param input     Pointer to the buffer used to save the user input
190
+ *  @param capacity  Size of the input buffer
191 191
  *
192 192
  *  @returns Returns True if user input was gathered
193 193
  */
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Alternative method to query for user input, using systemd
26
+ * @file
27
+ * Alternative method to query for user input, using systemd
27 28
  *
28 29
  */
29 30
 
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Cryptography Module
26
+ * @file
27
+ * Data Channel Cryptography Module
27 28
  *
28 29
  * @addtogroup data_crypto Data Channel Crypto module
29 30
  *
... ...
@@ -491,7 +492,7 @@ bool crypto_check_replay(struct crypto_options *opt,
491 491
  * this and add it themselves.
492 492
  *
493 493
  * @param kt            Struct with the crypto algorithm to use
494
- * @param packet_id_size Size of the packet id
494
+ * @param pkt_id_size   Size of the packet id
495 495
  * @param occ           if true calculates the overhead for crypto in the same
496 496
  *                      incorrect way as all previous OpenVPN versions did, to
497 497
  *                      end up with identical numbers for OCC compatibility
... ...
@@ -509,7 +510,7 @@ unsigned int crypto_max_overhead(void);
509 509
  * and write to file.
510 510
  *
511 511
  * @param filename          Filename of the server key file to create.
512
- * @param pem_name          The name to use in the PEM header/footer.
512
+ * @param key_name          The name to use in the PEM header/footer.
513 513
  */
514 514
 void
515 515
 write_pem_key_file(const char *filename, const char *key_name);
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Cryptography SSL library-specific backend interface
26
+ * @file
27
+ * Data Channel Cryptography SSL library-specific backend interface
27 28
  */
28 29
 
29 30
 #ifndef CRYPTO_BACKEND_H_
... ...
@@ -339,7 +340,7 @@ void cipher_ctx_free(cipher_ctx_t *ctx);
339 339
  *                      \c OPENVPN_OP_ENCRYPT or \c OPENVPN_OP_DECRYPT).
340 340
  */
341 341
 void cipher_ctx_init(cipher_ctx_t *ctx, const uint8_t *key,
342
-                     const char *cipername, crypto_operation_t enc);
342
+                     const char *ciphername, crypto_operation_t enc);
343 343
 
344 344
 /**
345 345
  * Returns the size of the IV used by the cipher, in bytes, or 0 if no IV is
... ...
@@ -357,7 +358,7 @@ int cipher_ctx_iv_length(const cipher_ctx_t *ctx);
357 357
  *
358 358
  * @param ctx           The cipher's context
359 359
  * @param tag           The buffer to write computed tag in.
360
- * @param tag_size      The tag buffer size, in bytes.
360
+ * @param tag_len       The tag buffer size, in bytes.
361 361
  */
362 362
 int cipher_ctx_get_tag(cipher_ctx_t *ctx, uint8_t *tag, int tag_len);
363 363
 
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Cryptography mbed TLS-specific backend interface
26
+ * @file
27
+ * Data Channel Cryptography mbed TLS-specific backend interface
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Cryptography mbed TLS-specific backend interface
26
+ * @file
27
+ * Data Channel Cryptography mbed TLS-specific backend interface
27 28
  */
28 29
 
29 30
 #ifndef CRYPTO_MBEDTLS_H_
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Cryptography OpenSSL-specific backend interface
26
+ * @file
27
+ * Data Channel Cryptography OpenSSL-specific backend interface
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Data Channel Cryptography OpenSSL-specific backend interface
26
+ * @file
27
+ * Data Channel Cryptography OpenSSL-specific backend interface
27 28
  */
28 29
 
29 30
 #ifndef CRYPTO_OPENSSL_H_
... ...
@@ -110,8 +111,7 @@ void crypto_print_openssl_errors(const unsigned int flags);
110 110
  * This is just a convenience wrapper for often occurring situations.
111 111
  *
112 112
  * @param flags         Flags to indicate error type and priority.
113
- * @param format        Format string to print.
114
- * @param format args   (optional) arguments for the format string.
113
+ * @param ...           Format string and optional format arguments
115 114
  */
116 115
 #define crypto_msg(flags, ...) \
117 116
     do { \
... ...
@@ -34,7 +34,7 @@
34 34
  * Parses a string as port and stores it
35 35
  *
36 36
  * @param   port        Pointer to in_port_t where the port value is stored
37
- * @param   addr        Port number as string
37
+ * @param   port_str    Port number as string
38 38
  * @return              True if parsing was successful
39 39
  */
40 40
 static bool
... ...
@@ -86,11 +86,11 @@ void process_io(struct context *c, struct link_socket *sock);
86 86
  * - Check that the client authentication has succeeded; if not, drop the
87 87
  *   packet.
88 88
  * - If the \a comp_frag argument is true:
89
- *   - Call \c lzo_compress() of the \link Data Channel Compression
89
+ *   - Call \c lzo_compress() of the \link compression Data Channel Compression
90 90
  *     module\endlink to (possibly) compress the packet.
91
- *   - Call \c fragment_outgoing() of the \link Data Channel Fragmentation
91
+ *   - Call \c fragment_outgoing() of the \link fragmentation Data Channel Fragmentation
92 92
  *     module\endlink to (possibly) fragment the packet.
93
- * - Activate the \link Data Channel Crypto module\endlink to perform
93
+ * - Activate the \link data_crypto Data Channel Crypto module\endlink to perform
94 94
  *   security operations on the packet.
95 95
  *   - Call \c tls_pre_encrypt() to choose the appropriate security
96 96
  *     parameters for this packet.
... ...
@@ -294,8 +294,8 @@ ce_management_query_proxy(struct context *c)
294 294
  *
295 295
  * This will write the control message
296 296
  *
297
- *  command parm1,parm2,..
298
- *  .
297
+ *  command parm1,parm2,...
298
+ *
299 299
  * to the control channel.
300 300
  *
301 301
  * @param arg           The context struct
... ...
@@ -2278,7 +2278,7 @@ add_delim_if_non_empty(struct buffer *buf, const char *header)
2278 2278
 
2279 2279
 /**
2280 2280
  * Prints the results of options imported for the data channel
2281
- * @param o
2281
+ * @param c
2282 2282
  */
2283 2283
 static void
2284 2284
 tls_print_deferred_options_results(struct context *c)
... ...
@@ -22,7 +22,8 @@
22 22
  */
23 23
 
24 24
 /**
25
- * @file Data Channel Compression module function definitions.
25
+ * @file
26
+ * Data Channel Compression module function definitions.
26 27
  */
27 28
 
28 29
 #ifdef HAVE_CONFIG_H
... ...
@@ -1240,6 +1240,7 @@ man_load_stats(struct management *man)
1240 1240
  * Checks if the correct number of arguments to a management command are present
1241 1241
  * and otherwise prints an error and returns false.
1242 1242
  *
1243
+ * @param man       The management interface struct
1243 1244
  * @param p         pointer to the parameter array
1244 1245
  * @param n         number of arguments required
1245 1246
  * @param flags     if MN_AT_LEAST require at least n parameters and not exactly n
... ...
@@ -22,8 +22,8 @@
22 22
  */
23 23
 
24 24
 /**
25
- * @file mbedtls compatibility stub
26
- *
25
+ * @file
26
+ * mbedtls compatibility stub.
27 27
  * This file provide compatibility stubs for the mbedtls libraries
28 28
  * prior to version 3. This version made most fields in structs private
29 29
  * and requires accessor functions to be used. For earlier versions, we
... ...
@@ -22,7 +22,8 @@
22 22
  */
23 23
 
24 24
 /**
25
- * @file Header file for server-mode related structures and functions.
25
+ * @file
26
+ * Header file for server-mode related structures and functions.
26 27
  */
27 28
 
28 29
 #ifndef MULTI_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file OpenSSL compatibility stub
26
+ * @file
27
+ * OpenSSL compatibility stub
27 28
  *
28 29
  * This file provide compatibility stubs for the OpenSSL libraries
29 30
  * prior to version 1.1. This version introduces many changes in the
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file PKCS #11 SSL library-specific backend
26
+ * @file
27
+ * PKCS #11 SSL library-specific backend
27 28
  */
28 29
 
29 30
 #ifndef PKCS11_BACKEND_H_
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file PKCS #11 mbed TLS backend
26
+ * @file
27
+ * PKCS #11 mbed TLS backend
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file PKCS #11 OpenSSL backend
26
+ * @file
27
+ * PKCS #11 OpenSSL backend
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -604,7 +604,7 @@ prepare_auth_token_push_reply(struct tls_multi *tls_multi, struct gc_arena *gc,
604 604
 /**
605 605
  * Prepare push options, based on local options
606 606
  *
607
- * @param context       context structure storing data for VPN tunnel
607
+ * @param c             context structure storing data for VPN tunnel
608 608
  * @param gc            gc arena for allocating push options
609 609
  * @param push_list     push list to where options are added
610 610
  *
... ...
@@ -24,7 +24,8 @@
24 24
  */
25 25
 
26 26
 /**
27
- * @file Control Channel SSL/Data channel negotiation Module
27
+ * @file
28
+ * Control Channel SSL/Data channel negotiation Module
28 29
  */
29 30
 
30 31
 /*
... ...
@@ -98,7 +99,7 @@ show_tls_performance_stats(void)
98 98
 /**
99 99
  * Limit the reneg_bytes value when using a small-block (<128 bytes) cipher.
100 100
  *
101
- * @param cipher        The current cipher (may be NULL).
101
+ * @param ciphername    The current cipher (may be NULL).
102 102
  * @param reneg_bytes   Pointer to the current reneg_bytes, updated if needed.
103 103
  *                      May *not* be NULL.
104 104
  */
... ...
@@ -461,10 +462,10 @@ tls_version_parse(const char *vstr, const char *extra)
461 461
  * - the CRL file was passed inline
462 462
  * - the CRL file was not modified since the last (re)load
463 463
  *
464
- * @param ssl_ctx       The TLS context to use when reloading the CRL
465
- * @param crl_file      The file name to load the CRL from, or
466
- *                      "[[INLINE]]" in the case of inline files.
467
- * @param crl_inline    A string containing the CRL
464
+ * @param ssl_ctx         The TLS context to use when reloading the CRL
465
+ * @param crl_file        The file name to load the CRL from, or
466
+ *                        or an array containing the inline CRL.
467
+ * @param crl_file_inline True if crl_file is an inline CRL.
468 468
  */
469 469
 static void
470 470
 tls_ctx_reload_crl(struct tls_root_ctx *ssl_ctx, const char *crl_file,
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel SSL/Data channel negotiation module
26
+ * @file
27
+ * Control Channel SSL/Data channel negotiation module
27 28
  */
28 29
 
29 30
 #ifndef OPENVPN_SSL_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel SSL library backend module
26
+ * @file
27
+ * Control Channel SSL library backend module
27 28
  */
28 29
 
29 30
 
... ...
@@ -252,7 +253,7 @@ int tls_ctx_load_pkcs12(struct tls_root_ctx *ctx, const char *pkcs12_file,
252 252
  * context.
253 253
  *
254 254
  * @param ctx                   TLS context to use
255
- * @param crypto_api_cert       String representing the certificate to load.
255
+ * @param cryptoapi_cert       String representing the certificate to load.
256 256
  */
257 257
 #ifdef ENABLE_CRYPTOAPI
258 258
 void tls_ctx_load_cryptoapi(struct tls_root_ctx *ctx, const char *cryptoapi_cert);
... ...
@@ -506,7 +507,6 @@ int key_state_write_ciphertext(struct key_state_ssl *ks_ssl,
506 506
  * @param ks_ssl       - The security parameter state for this %key
507 507
  *                       session.
508 508
  * @param buf          - A buffer in which to store the plaintext.
509
- * @param maxlen       - The maximum number of bytes to extract.
510 509
  *
511 510
  * @return The return value indicates whether the data was successfully
512 511
  *     processed:
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Common Data Structures
26
+ * @file
27
+ * Control Channel Common Data Structures
27 28
  */
28 29
 
29 30
 #ifndef SSL_COMMON_H_
... ...
@@ -24,7 +24,8 @@
24 24
  */
25 25
 
26 26
 /**
27
- * @file Control Channel mbed TLS Backend
27
+ * @file
28
+ * Control Channel mbed TLS Backend
28 29
  */
29 30
 
30 31
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel mbed TLS Backend
26
+ * @file
27
+ * Control Channel mbed TLS Backend
27 28
  */
28 29
 
29 30
 #ifndef SSL_MBEDTLS_H_
... ...
@@ -67,9 +68,9 @@ typedef struct {
67 67
  *
68 68
  * @param sign_ctx  The context for the signing function.
69 69
  * @param src       The data to be signed,
70
- * @param src_len   The length of src, in bytes.
70
+ * @param src_size  The length of src, in bytes.
71 71
  * @param dst       The destination buffer for the signature.
72
- * @param dst_len   The length of the destination buffer.
72
+ * @param dst_size  The length of the destination buffer.
73 73
  *
74 74
  * @return true if signing succeeded, false otherwise.
75 75
  */
... ...
@@ -24,7 +24,8 @@
24 24
  */
25 25
 
26 26
 /**
27
- * @file Control Channel SSL/Data dynamic negotiation Module
27
+ * @file
28
+ * Control Channel SSL/Data dynamic negotiation Module
28 29
  * This file is split from ssl.c to be able to unit test it.
29 30
  */
30 31
 
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel SSL/Data dynamic negotiation Module
26
+ * @file
27
+ * Control Channel SSL/Data dynamic negotiation Module
27 28
  * This file is split from ssl.h to be able to unit test it.
28 29
  */
29 30
 
... ...
@@ -90,7 +91,7 @@ tls_peer_ncp_list(const char *peer_info, struct gc_arena *gc);
90 90
  * Check whether the ciphers in the supplied list are supported.
91 91
  *
92 92
  * @param list          Colon-separated list of ciphers
93
- * @parms gc            gc_arena to allocate the returned string
93
+ * @param gc            gc_arena to allocate the returned string
94 94
  *
95 95
  * @returns             colon separated string of normalised (via
96 96
  *                      translate_cipher_name_from_openvpn) and
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel OpenSSL Backend
26
+ * @file
27
+ * Control Channel OpenSSL Backend
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel OpenSSL Backend
26
+ * @file
27
+ * Control Channel OpenSSL Backend
27 28
  */
28 29
 
29 30
 #ifndef SSL_OPENSSL_H_
... ...
@@ -22,9 +22,10 @@
22 22
  */
23 23
 
24 24
 /**
25
- * @file SSL control channel wrap/unwrap and decode functions. This file
26
- *        (and its .c file) is designed to to be included in units/etc without
27
- *        pulling in a lot of dependencies
25
+ * @file
26
+ * SSL control channel wrap/unwrap and decode functions.
27
+ * This file (and its .c file) is designed to to be included in units/etc without
28
+ * pulling in a lot of dependencies.
28 29
  */
29 30
 
30 31
 #ifndef SSL_PKT_H
... ...
@@ -182,7 +183,7 @@ calculate_session_id_hmac(struct session_id client_sid,
182 182
 /**
183 183
  * Checks if a control packet has a correct HMAC server session id
184 184
  *
185
- * @param client_sid    session id of the client
185
+ * @param state         session information
186 186
  * @param from          link_socket from the client
187 187
  * @param hmac          the hmac context to use for the calculation
188 188
  * @param handwindow    the quantisation of the current time
... ...
@@ -22,8 +22,10 @@
22 22
  */
23 23
 
24 24
 /**
25
- * @file SSL utility function. This file (and its .c file) is designed to
26
- *       to be included in units/etc without pulling in a lot of dependencies
25
+ * @file
26
+ * SSL utility functions.
27
+ * This file (and its .c file) is designed to to be included in units/etc
28
+ * without pulling in a lot of dependencies.
27 29
  */
28 30
 
29 31
 #ifndef SSL_UTIL_H_
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module
26
+ * @file
27
+ * Control Channel Verification Module
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module
26
+ * @file
27
+ * Control Channel Verification Module
27 28
  */
28 29
 
29 30
 #ifndef SSL_VERIFY_H_
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module library-specific backend interface
26
+ * @file
27
+ * Control Channel Verification Module library-specific backend interface
27 28
  */
28 29
 
29 30
 #ifndef SSL_VERIFY_BACKEND_H_
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module mbed TLS backend
26
+ * @file
27
+ * Control Channel Verification Module mbed TLS backend
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module mbed TLS backend
26
+ * @file
27
+ * Control Channel Verification Module mbed TLS backend
27 28
  */
28 29
 
29 30
 #ifndef SSL_VERIFY_MBEDTLS_H_
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module OpenSSL implementation
26
+ * @file
27
+ * Control Channel Verification Module OpenSSL implementation
27 28
  */
28 29
 
29 30
 #ifdef HAVE_CONFIG_H
... ...
@@ -23,7 +23,8 @@
23 23
  */
24 24
 
25 25
 /**
26
- * @file Control Channel Verification Module OpenSSL backend
26
+ * @file
27
+ * Control Channel Verification Module OpenSSL backend
27 28
  */
28 29
 
29 30
 
... ...
@@ -167,8 +167,8 @@ bool tls_crypt_unwrap(const struct buffer *src, struct buffer *dst,
167 167
 /**
168 168
  * Initialize a tls-crypt-v2 server key (used to encrypt/decrypt client keys).
169 169
  *
170
- * @param key           Key structure to be initialized.  Must be non-NULL.
171
- * @parem encrypt       If true, initialize the key structure for encryption,
170
+ * @param key_ctx       Key structure to be initialized.  Must be non-NULL.
171
+ * @param encrypt       If true, initialize the key structure for encryption,
172 172
  *                      otherwise for decryption.
173 173
  * @param key_file      File path of the key file to load or the key itself if
174 174
  *                      key_inline is true.
... ...
@@ -1104,7 +1104,7 @@ create_arbitrary_remote( struct tuntap *tt )
1104 1104
  *
1105 1105
  * @param tt        the tuntap interface context
1106 1106
  * @param ifname    the human readable interface name
1107
- * @param mtu       the MTU value to set the interface to
1107
+ * @param tun_mtu   the MTU value to set the interface to
1108 1108
  * @param es        the environment to be used when executing the commands
1109 1109
  * @param ctx       the networking API opaque context
1110 1110
  */
... ...
@@ -1303,7 +1303,7 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu,
1303 1303
  *
1304 1304
  * @param tt        the tuntap interface context
1305 1305
  * @param ifname    the human readable interface name
1306
- * @param mtu       the MTU value to set the interface to
1306
+ * @param tun_mtu   the MTU value to set the interface to
1307 1307
  * @param es        the environment to be used when executing the commands
1308 1308
  * @param ctx       the networking API opaque context
1309 1309
  */
... ...
@@ -330,7 +330,7 @@ void do_ifconfig_setenv(const struct tuntap *tt,
330 330
  *
331 331
  * @param tt        the tuntap interface context
332 332
  * @param ifname    the human readable interface name
333
- * @param mtu       the MTU value to set the interface to
333
+ * @param tun_mtu   the MTU value to set the interface to
334 334
  * @param es        the environment to be used when executing the commands
335 335
  * @param ctx       the networking API opaque context
336 336
  */
... ...
@@ -632,7 +632,7 @@ get_net_adapter_guid(
632 632
  * @param dwProperty     Specifies the property to be retrieved. See
633 633
  *                       https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967.aspx
634 634
  *
635
- * @pdwPropertyRegDataType  A pointer to a variable that receives the data type of the
635
+ * @param pdwPropertyRegDataType  A pointer to a variable that receives the data type of the
636 636
  *                       property that is being retrieved. This is one of the standard
637 637
  *                       registry data types. This parameter is optional and can be NULL.
638 638
  *