Change in openvpn[master]: Review doxygen warnings
A message that is not in the archive (sent off-list or not yet received): gerrit.1728560771000.I7a852eb5fafae3a0e85dd89ea6d4c91fcf2fab4e@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/778?usp=email
to review the following change.
Change subject: Review doxygen warnings
......................................................................
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)
---
M doc/doxygen/doc_compression.h
M doc/doxygen/doc_protocol_overview.h
M sample/sample-plugins/simple/base64.c
M src/openvpn/argv.c
M src/openvpn/buffer.h
M src/openvpn/console.h
M src/openvpn/console_builtin.c
M src/openvpn/console_systemd.c
M src/openvpn/crypto.h
M src/openvpn/crypto_backend.h
M src/openvpn/crypto_mbedtls.c
M src/openvpn/crypto_mbedtls.h
M src/openvpn/crypto_openssl.c
M src/openvpn/crypto_openssl.h
M src/openvpn/dns.c
M src/openvpn/forward.h
M src/openvpn/init.c
M src/openvpn/lzo.c
M src/openvpn/manage.c
M src/openvpn/mbedtls_compat.h
M src/openvpn/multi.h
M src/openvpn/openssl_compat.h
M src/openvpn/pkcs11_backend.h
M src/openvpn/pkcs11_mbedtls.c
M src/openvpn/pkcs11_openssl.c
M src/openvpn/push.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/ssl_backend.h
M src/openvpn/ssl_common.h
M src/openvpn/ssl_mbedtls.c
M src/openvpn/ssl_mbedtls.h
M src/openvpn/ssl_ncp.c
M src/openvpn/ssl_ncp.h
M src/openvpn/ssl_openssl.c
M src/openvpn/ssl_openssl.h
M src/openvpn/ssl_pkt.h
M src/openvpn/ssl_util.h
M src/openvpn/ssl_verify.c
M src/openvpn/ssl_verify.h
M src/openvpn/ssl_verify_backend.h
M src/openvpn/ssl_verify_mbedtls.c
M src/openvpn/ssl_verify_mbedtls.h
M src/openvpn/ssl_verify_openssl.c
M src/openvpn/ssl_verify_openssl.h
M src/openvpn/tls_crypt.h
M src/openvpn/tun.c
M src/openvpn/tun.h
M src/tapctl/tap.c
49 files changed, 152 insertions(+), 117 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/78/778/1
doc/doxygen/doc_compression.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Compression module documentation file. +* @file +* Data Channel Compression module documentation file. */ /**
doc/doxygen/doc_protocol_overview.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Network protocol overview documentation file. +* @file +* Network protocol overview documentation file. */ /**
sample/sample-plugins/simple/base64.c +6 -5
@@ -44,7 +44,7 @@* returns, any returned pointers are invalid. * * @param name String containing the env.var name to search for -* @param envp String array pointer to the environment variable +* @param envp String array pointer to the environment variables * * @return Returns a pointer to the value in the environment variable * table on successful match. Otherwise NULL is returned
@@ -138,10 +138,11 @@* For the arguments, see the include/openvpn-plugin.h file * for details on the function parameters * -* @param args Pointer to a struct with details about the plug-in -* call from the main OpenVPN process. -* @param returndata Pointer to a struct where the plug-in can provide -* information back to OpenVPN to be processed +* @param handle Pointer to the plug-in global context buffer, which +* need to be released by this function +* @param type Type of the hook +* @param argv String array pointer to arguments for the hook +* @param envp String array pointer to current environment variables * * @return Must return OPENVPN_PLUGIN_FUNC_SUCCESS or * OPENVPN_PLUGIN_FUNC_DEFERRED on success. Otherwise it
src/openvpn/argv.c +35 -35
167 lines not on this page · raw message
src/openvpn/buffer.h +1 -1
@@ -1223,7 +1223,7 @@/** * buffer_read_from_file - copy the content of a file into a buffer * -* @param file path to the file to read +* @param filename path to the file to read * @param gc the garbage collector to use when allocating the buffer. It * is passed to alloc_buf_gc() and therefore can be NULL. *
src/openvpn/console.h +1 -1
@@ -112,7 +112,7 @@/** -* A plain "make Gert happy" wrapper. Same arguments as @query_user_add +* A plain "make Gert happy" wrapper. Same arguments as query_user_add() * * FIXME/TODO: Remove this when refactoring the complete user query process * to be called at start-up initialization of OpenVPN.
src/openvpn/console_builtin.c +5 -5
@@ -166,7 +166,7 @@/** * Closes the TTY FILE pointer, but only if it is not a stdin/stderr FILE object. * -* @params fp FILE pointer to close +* @param fp FILE pointer to close * */ static void
@@ -184,10 +184,10 @@/** * Core function for getting input from console * -* @params prompt The prompt to present to the user -* @params echo Should the user see what is being typed -* @params input Pointer to the buffer used to save the user input -* @params capacity Size of the input buffer +* @param prompt The prompt to present to the user +* @param echo Should the user see what is being typed +* @param input Pointer to the buffer used to save the user input +* @param capacity Size of the input buffer * * @returns Returns True if user input was gathered */
src/openvpn/console_systemd.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Alternative method to query for user input, using systemd +* @file +* Alternative method to query for user input, using systemd * */
src/openvpn/crypto.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography Module +* @file +* Data Channel Cryptography Module * * @addtogroup data_crypto Data Channel Crypto module *
@@ -441,7 +442,7 @@* this and add it themselves. * * @param kt Struct with the crypto algorithm to use -* @param packet_id_size Size of the packet id +* @param pkt_id_size Size of the packet id * @param occ if true calculates the overhead for crypto in the same * incorrect way as all previous OpenVPN versions did, to * end up with identical numbers for OCC compatibility
@@ -459,7 +460,7 @@* and write to file. * * @param filename Filename of the server key file to create. -* @param pem_name The name to use in the PEM header/footer. +* @param key_name The name to use in the PEM header/footer. */ void write_pem_key_file (const char *filename,const char *key_name);
src/openvpn/crypto_backend.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography SSL library-specific backend interface +* @file +* Data Channel Cryptography SSL library-specific backend interface */ #ifndef CRYPTO_BACKEND_H_
@@ -339,7 +340,7 @@* \c OPENVPN_OP_ENCRYPT or \c OPENVPN_OP_DECRYPT). */ void cipher_ctx_init (cipher_ctx_t *ctx,const uint8_t *key, -const char *cipername,crypto_operation_t enc); +const char *ciphername,crypto_operation_t enc);/** * Returns the size of the IV used by the cipher, in bytes, or 0 if no IV is
@@ -357,7 +358,7 @@* * @param ctx The cipher's context * @param tag The buffer to write computed tag in. -* @param tag_size The tag buffer size, in bytes. +* @param tag_len The tag buffer size, in bytes. */ int cipher_ctx_get_tag (cipher_ctx_t *ctx,uint8_t *tag,int tag_len);
src/openvpn/crypto_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifndef CRYPTO_MBEDTLS_H_
src/openvpn/crypto_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_openssl.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifndef CRYPTO_OPENSSL_H_
@@ -111,8 +112,7 @@* This is just a convenience wrapper for often occurring situations. * * @param flags Flags to indicate error type and priority. -* @param format Format string to print. -* @param format args (optional) arguments for the format string. +* @param ... Format string and optional format arguments */ #define crypto_msg (flags, ...) \ do { \
src/openvpn/dns.c +1 -1
@@ -34,7 +34,7 @@* Parses a string as port and stores it * * @param port Pointer to in_port_t where the port value is stored -* @param addr Port number as string +* @param port_str Port number as string * @return True if parsing was successful */ static bool
src/openvpn/forward.h +3 -3
@@ -85,11 +85,11 @@* - Check that the client authentication has succeeded; if not, drop the * packet. * - If the \a comp_frag argument is true: -* - Call \c lzo_compress() of the \link Data Channel Compression +* - Call \c lzo_compress() of the \link compression Data Channel Compression * module\endlink to (possibly) compress the packet. -* - Call \c fragment_outgoing() of the \link Data Channel Fragmentation +* - Call \c fragment_outgoing() of the \link fragmentation Data Channel Fragmentation * module\endlink to (possibly) fragment the packet. -* - Activate the \link Data Channel Crypto module\endlink to perform +* - Activate the \link data_crypto Data Channel Crypto module\endlink to perform * security operations on the packet. * - Call \c tls_pre_encrypt() to choose the appropriate security * parameters for this packet.
src/openvpn/init.c +3 -3
@@ -294,8 +294,8 @@* * This will write the control message * -* command parm1,parm2,.. -* . +* command parm1,parm2,... +* * to the control channel. * * @param arg The context struct
@@ -2280,7 +2280,7 @@/** * Prints the results of options imported for the data channel -* @param o +* @param c */ static void tls_print_deferred_options_results (struct context *c)
src/openvpn/lzo.c +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Data Channel Compression module function definitions. +* @file +* Data Channel Compression module function definitions. */ #ifdef HAVE_CONFIG_H
src/openvpn/manage.c +1 -0
@@ -1240,6 +1240,7 @@* Checks if the correct number of arguments to a management command are present * and otherwise prints an error and returns false. * +* @param man The management interface struct * @param p pointer to the parameter array * @param n number of arguments required * @param flags if MN_AT_LEAST require at least n parameters and not exactly n
src/openvpn/mbedtls_compat.h +2 -2
@@ -22,8 +22,8 @@*/ /** -* @file mbedtls compatibility stub -* +* @file +* mbedtls compatibility stub. * This file provide compatibility stubs for the mbedtls libraries * prior to version 3. This version made most fields in structs private * and requires accessor functions to be used. For earlier versions, we
src/openvpn/multi.h +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Header file for server-mode related structures and functions. +* @file +* Header file for server-mode related structures and functions. */ #ifndef MULTI_H
src/openvpn/openssl_compat.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file OpenSSL compatibility stub +* @file +* OpenSSL compatibility stub * * This file provide compatibility stubs for the OpenSSL libraries * prior to version 1.1. This version introduces many changes in the
src/openvpn/pkcs11_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 SSL library-specific backend +* @file +* PKCS #11 SSL library-specific backend */ #ifndef PKCS11_BACKEND_H_
src/openvpn/pkcs11_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 mbed TLS backend +* @file +* PKCS #11 mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/pkcs11_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 OpenSSL backend +* @file +* PKCS #11 OpenSSL backend */ #ifdef HAVE_CONFIG_H
src/openvpn/push.c +1 -1
@@ -604,7 +604,7 @@/** * Prepare push options, based on local options * -* @param context context structure storing data for VPN tunnel +* @param c context structure storing data for VPN tunnel * @param gc gc arena for allocating push options * @param push_list push list to where options are added *
src/openvpn/ssl.c +7 -6
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation Module +* @file +* Control Channel SSL/Data channel negotiation Module */ /*
@@ -113,7 +114,7 @@/** * Limit the reneg_bytes value when using a small-block (<128 bytes) cipher. * -* @param cipher The current cipher (may be NULL). +* @param ciphername The current cipher (may be NULL). * @param reneg_bytes Pointer to the current reneg_bytes, updated if needed. * May *not* be NULL. */
@@ -454,10 +455,10 @@* - the CRL file was passed inline * - the CRL file was not modified since the last (re)load * -* @param ssl_ctx The TLS context to use when reloading the CRL -* @param crl_file The file name to load the CRL from, or -* "[[INLINE]]" in the case of inline files. -* @param crl_inline A string containing the CRL +* @param ssl_ctx The TLS context to use when reloading the CRL +* @param crl_file The file name to load the CRL from, or +* or an array containing the inline CRL. +* @param crl_file_inline True if crl_file is an inline CRL. */ static void tls_ctx_reload_crl(struct tls_root_ctx *ssl_ctx, const char *crl_file,
src/openvpn/ssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation module +* @file +* Control Channel SSL/Data channel negotiation module */ #ifndef OPENVPN_SSL_H
src/openvpn/ssl_backend.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL library backend module +* @file +* Control Channel SSL library backend module */
@@ -252,7 +253,7 @@* context. * * @param ctx TLS context to use -* @param crypto_api_cert String representing the certificate to load. +* @param cryptoapi_cert String representing the certificate to load. */ #ifdef ENABLE_CRYPTOAPI void tls_ctx_load_cryptoapi (struct tls_root_ctx *ctx,const char *cryptoapi_cert);
@@ -506,7 +507,6 @@* @param ks_ssl - The security parameter state for this %key * session. * @param buf - A buffer in which to store the plaintext. -* @param maxlen - The maximum number of bytes to extract. * * @return The return value indicates whether the data was successfully * processed:
src/openvpn/ssl_common.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Common Data Structures +* @file +* Control Channel Common Data Structures */ #ifndef SSL_COMMON_H_
src/openvpn/ssl_mbedtls.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_mbedtls.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifndef SSL_MBEDTLS_H_
@@ -67,9 +68,9 @@* * @param sign_ctx The context for the signing function. * @param src The data to be signed, -* @param src_len The length of src, in bytes. +* @param src_size The length of src, in bytes. * @param dst The destination buffer for the signature. -* @param dst_len The length of the destination buffer. +* @param dst_size The length of the destination buffer. * * @return true if signing succeeded, false otherwise. */
src/openvpn/ssl_ncp.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.c to be able to unit test it. */
src/openvpn/ssl_ncp.h +3 -2
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.h to be able to unit test it. */
@@ -90,7 +91,7 @@* Check whether the ciphers in the supplied list are supported. * * @param list Colon-separated list of ciphers -* @parms gc gc_arena to allocate the returned string +* @param gc gc_arena to allocate the returned string * * @returns colon separated string of normalised (via * translate_cipher_name_from_openvpn) and
src/openvpn/ssl_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifndef SSL_OPENSSL_H_
src/openvpn/ssl_pkt.h +5 -4
@@ -22,9 +22,10 @@*/ /** -* @file SSL control channel wrap/unwrap and decode functions. This file -* (and its .c file) is designed to to be included in units/etc without -* pulling in a lot of dependencies +* @file +* SSL control channel wrap/unwrap and decode functions. +* This file (and its .c file) is designed to to be included in units/etc without +* pulling in a lot of dependencies. */ #ifndef SSL_PKT_H
@@ -182,7 +183,7 @@/** * Checks if a control packet has a correct HMAC server session id * -* @param client_sid session id of the client +* @param state session information * @param from link_socket from the client * @param hmac the hmac context to use for the calculation * @param handwindow the quantisation of the current time
src/openvpn/ssl_util.h +4 -2
@@ -22,8 +22,10 @@*/ /** -* @file SSL utility function. This file (and its .c file) is designed to -* to be included in units/etc without pulling in a lot of dependencies +* @file +* SSL utility functions. +* This file (and its .c file) is designed to to be included in units/etc +* without pulling in a lot of dependencies. */ #ifndef SSL_UTIL_H_
src/openvpn/ssl_verify.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifndef SSL_VERIFY_H_
src/openvpn/ssl_verify_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module library-specific backend interface +* @file +* Control Channel Verification Module library-specific backend interface */ #ifndef SSL_VERIFY_BACKEND_H_
src/openvpn/ssl_verify_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifndef SSL_VERIFY_MBEDTLS_H_
src/openvpn/ssl_verify_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL implementation +* @file +* Control Channel Verification Module OpenSSL implementation */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL backend +* @file +* Control Channel Verification Module OpenSSL backend */
src/openvpn/tls_crypt.h +2 -2
@@ -167,8 +167,8 @@/** * Initialize a tls-crypt-v2 server key (used to encrypt/decrypt client keys). * -* @param key Key structure to be initialized. Must be non-NULL. -* @parem encrypt If true, initialize the key structure for encryption, +* @param key_ctx Key structure to be initialized. Must be non-NULL. +* @param encrypt If true, initialize the key structure for encryption, * otherwise for decryption. * @param key_file File path of the key file to load or the key itself if * key_inline is true.
src/openvpn/tun.c +2 -2
@@ -1104,7 +1104,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
@@ -1303,7 +1303,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/openvpn/tun.h +1 -1
@@ -330,7 +330,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/tapctl/tap.c +1 -1
@@ -632,7 +632,7 @@* @param dwProperty Specifies the property to be retrieved. See * https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967.aspx * -* @pdwPropertyRegDataType A pointer to a variable that receives the data type of the +* @param pdwPropertyRegDataType A pointer to a variable that receives the data type of the * property that is being retrieved. This is one of the standard * registry data types. This parameter is optional and can be NULL. *
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/778?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a852eb5fafae3a0e85dd89ea6d4c91fcf2fab4e
Gerrit-Change-Number: 778
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld.
plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/778?usp=email )
Change subject: Review doxygen warnings
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/778?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a852eb5fafae3a0e85dd89ea6d4c91fcf2fab4e
Gerrit-Change-Number: 778
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Fri, 27 Dec 2024 16:10:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v2 1/1 Review doxygen warnings
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
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)
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/778
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>
doc/doxygen/doc_compression.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Compression module documentation file. +* @file +* Data Channel Compression module documentation file. */ /**
doc/doxygen/doc_protocol_overview.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Network protocol overview documentation file. +* @file +* Network protocol overview documentation file. */ /**
sample/sample-plugins/simple/base64.c +6 -5
@@ -44,7 +44,7 @@* returns, any returned pointers are invalid. * * @param name String containing the env.var name to search for -* @param envp String array pointer to the environment variable +* @param envp String array pointer to the environment variables * * @return Returns a pointer to the value in the environment variable * table on successful match. Otherwise NULL is returned
@@ -138,10 +138,11 @@* For the arguments, see the include/openvpn-plugin.h file * for details on the function parameters * -* @param args Pointer to a struct with details about the plug-in -* call from the main OpenVPN process. -* @param returndata Pointer to a struct where the plug-in can provide -* information back to OpenVPN to be processed +* @param handle Pointer to the plug-in global context buffer, which +* need to be released by this function +* @param type Type of the hook +* @param argv String array pointer to arguments for the hook +* @param envp String array pointer to current environment variables * * @return Must return OPENVPN_PLUGIN_FUNC_SUCCESS or * OPENVPN_PLUGIN_FUNC_DEFERRED on success. Otherwise it
src/openvpn/argv.c +35 -35
167 lines not on this page · raw message
src/openvpn/buffer.h +1 -1
@@ -1218,7 +1218,7 @@/** * buffer_read_from_file - copy the content of a file into a buffer * -* @param file path to the file to read +* @param filename path to the file to read * @param gc the garbage collector to use when allocating the buffer. It * is passed to alloc_buf_gc() and therefore can be NULL. *
src/openvpn/console.h +1 -1
@@ -112,7 +112,7 @@/** -* A plain "make Gert happy" wrapper. Same arguments as @query_user_add +* A plain "make Gert happy" wrapper. Same arguments as query_user_add() * * FIXME/TODO: Remove this when refactoring the complete user query process * to be called at start-up initialization of OpenVPN.
src/openvpn/console_builtin.c +5 -5
@@ -166,7 +166,7 @@/** * Closes the TTY FILE pointer, but only if it is not a stdin/stderr FILE object. * -* @params fp FILE pointer to close +* @param fp FILE pointer to close * */ static void
@@ -184,10 +184,10 @@/** * Core function for getting input from console * -* @params prompt The prompt to present to the user -* @params echo Should the user see what is being typed -* @params input Pointer to the buffer used to save the user input -* @params capacity Size of the input buffer +* @param prompt The prompt to present to the user +* @param echo Should the user see what is being typed +* @param input Pointer to the buffer used to save the user input +* @param capacity Size of the input buffer * * @returns Returns True if user input was gathered */
src/openvpn/console_systemd.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Alternative method to query for user input, using systemd +* @file +* Alternative method to query for user input, using systemd * */
src/openvpn/crypto.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography Module +* @file +* Data Channel Cryptography Module * * @addtogroup data_crypto Data Channel Crypto module *
@@ -466,7 +467,7 @@* this and add it themselves. * * @param kt Struct with the crypto algorithm to use -* @param packet_id_size Size of the packet id +* @param pkt_id_size Size of the packet id * @param occ if true calculates the overhead for crypto in the same * incorrect way as all previous OpenVPN versions did, to * end up with identical numbers for OCC compatibility
@@ -484,7 +485,7 @@* and write to file. * * @param filename Filename of the server key file to create. -* @param pem_name The name to use in the PEM header/footer. +* @param key_name The name to use in the PEM header/footer. */ void write_pem_key_file (const char *filename,const char *key_name);
src/openvpn/crypto_backend.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography SSL library-specific backend interface +* @file +* Data Channel Cryptography SSL library-specific backend interface */ #ifndef CRYPTO_BACKEND_H_
@@ -339,7 +340,7 @@* \c OPENVPN_OP_ENCRYPT or \c OPENVPN_OP_DECRYPT). */ void cipher_ctx_init (cipher_ctx_t *ctx,const uint8_t *key, -const char *cipername,crypto_operation_t enc); +const char *ciphername,crypto_operation_t enc);/** * Returns the size of the IV used by the cipher, in bytes, or 0 if no IV is
@@ -357,7 +358,7 @@* * @param ctx The cipher's context * @param tag The buffer to write computed tag in. -* @param tag_size The tag buffer size, in bytes. +* @param tag_len The tag buffer size, in bytes. */ int cipher_ctx_get_tag (cipher_ctx_t *ctx,uint8_t *tag,int tag_len);
src/openvpn/crypto_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifndef CRYPTO_MBEDTLS_H_
src/openvpn/crypto_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_openssl.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifndef CRYPTO_OPENSSL_H_
@@ -110,8 +111,7 @@* This is just a convenience wrapper for often occurring situations. * * @param flags Flags to indicate error type and priority. -* @param format Format string to print. -* @param format args (optional) arguments for the format string. +* @param ... Format string and optional format arguments */ #define crypto_msg (flags, ...) \ do { \
src/openvpn/dns.c +1 -1
@@ -34,7 +34,7 @@* Parses a string as port and stores it * * @param port Pointer to in_port_t where the port value is stored -* @param addr Port number as string +* @param port_str Port number as string * @return True if parsing was successful */ static bool
src/openvpn/forward.h +3 -3
@@ -86,11 +86,11 @@* - Check that the client authentication has succeeded; if not, drop the * packet. * - If the \a comp_frag argument is true: -* - Call \c lzo_compress() of the \link Data Channel Compression +* - Call \c lzo_compress() of the \link compression Data Channel Compression * module\endlink to (possibly) compress the packet. -* - Call \c fragment_outgoing() of the \link Data Channel Fragmentation +* - Call \c fragment_outgoing() of the \link fragmentation Data Channel Fragmentation * module\endlink to (possibly) fragment the packet. -* - Activate the \link Data Channel Crypto module\endlink to perform +* - Activate the \link data_crypto Data Channel Crypto module\endlink to perform * security operations on the packet. * - Call \c tls_pre_encrypt() to choose the appropriate security * parameters for this packet.
src/openvpn/init.c +3 -3
@@ -294,8 +294,8 @@* * This will write the control message * -* command parm1,parm2,.. -* . +* command parm1,parm2,... +* * to the control channel. * * @param arg The context struct
@@ -2278,7 +2278,7 @@/** * Prints the results of options imported for the data channel -* @param o +* @param c */ static void tls_print_deferred_options_results (struct context *c)
src/openvpn/lzo.c +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Data Channel Compression module function definitions. +* @file +* Data Channel Compression module function definitions. */ #ifdef HAVE_CONFIG_H
src/openvpn/manage.c +1 -0
@@ -1240,6 +1240,7 @@* Checks if the correct number of arguments to a management command are present * and otherwise prints an error and returns false. * +* @param man The management interface struct * @param p pointer to the parameter array * @param n number of arguments required * @param flags if MN_AT_LEAST require at least n parameters and not exactly n
src/openvpn/mbedtls_compat.h +2 -2
@@ -22,8 +22,8 @@*/ /** -* @file mbedtls compatibility stub -* +* @file +* mbedtls compatibility stub. * This file provide compatibility stubs for the mbedtls libraries * prior to version 3. This version made most fields in structs private * and requires accessor functions to be used. For earlier versions, we
src/openvpn/multi.h +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Header file for server-mode related structures and functions. +* @file +* Header file for server-mode related structures and functions. */ #ifndef MULTI_H
src/openvpn/openssl_compat.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file OpenSSL compatibility stub +* @file +* OpenSSL compatibility stub * * This file provide compatibility stubs for the OpenSSL libraries * prior to version 1.1. This version introduces many changes in the
src/openvpn/pkcs11_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 SSL library-specific backend +* @file +* PKCS #11 SSL library-specific backend */ #ifndef PKCS11_BACKEND_H_
src/openvpn/pkcs11_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 mbed TLS backend +* @file +* PKCS #11 mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/pkcs11_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 OpenSSL backend +* @file +* PKCS #11 OpenSSL backend */ #ifdef HAVE_CONFIG_H
src/openvpn/push.c +1 -1
@@ -604,7 +604,7 @@/** * Prepare push options, based on local options * -* @param context context structure storing data for VPN tunnel +* @param c context structure storing data for VPN tunnel * @param gc gc arena for allocating push options * @param push_list push list to where options are added *
src/openvpn/ssl.c +7 -6
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation Module +* @file +* Control Channel SSL/Data channel negotiation Module */ /*
@@ -98,7 +99,7 @@/** * Limit the reneg_bytes value when using a small-block (<128 bytes) cipher. * -* @param cipher The current cipher (may be NULL). +* @param ciphername The current cipher (may be NULL). * @param reneg_bytes Pointer to the current reneg_bytes, updated if needed. * May *not* be NULL. */
@@ -461,10 +462,10 @@* - the CRL file was passed inline * - the CRL file was not modified since the last (re)load * -* @param ssl_ctx The TLS context to use when reloading the CRL -* @param crl_file The file name to load the CRL from, or -* "[[INLINE]]" in the case of inline files. -* @param crl_inline A string containing the CRL +* @param ssl_ctx The TLS context to use when reloading the CRL +* @param crl_file The file name to load the CRL from, or +* or an array containing the inline CRL. +* @param crl_file_inline True if crl_file is an inline CRL. */ static void tls_ctx_reload_crl(struct tls_root_ctx *ssl_ctx, const char *crl_file,
src/openvpn/ssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation module +* @file +* Control Channel SSL/Data channel negotiation module */ #ifndef OPENVPN_SSL_H
src/openvpn/ssl_backend.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL library backend module +* @file +* Control Channel SSL library backend module */
@@ -252,7 +253,7 @@* context. * * @param ctx TLS context to use -* @param crypto_api_cert String representing the certificate to load. +* @param cryptoapi_cert String representing the certificate to load. */ #ifdef ENABLE_CRYPTOAPI void tls_ctx_load_cryptoapi (struct tls_root_ctx *ctx,const char *cryptoapi_cert);
@@ -506,7 +507,6 @@* @param ks_ssl - The security parameter state for this %key * session. * @param buf - A buffer in which to store the plaintext. -* @param maxlen - The maximum number of bytes to extract. * * @return The return value indicates whether the data was successfully * processed:
src/openvpn/ssl_common.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Common Data Structures +* @file +* Control Channel Common Data Structures */ #ifndef SSL_COMMON_H_
src/openvpn/ssl_mbedtls.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_mbedtls.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifndef SSL_MBEDTLS_H_
@@ -67,9 +68,9 @@* * @param sign_ctx The context for the signing function. * @param src The data to be signed, -* @param src_len The length of src, in bytes. +* @param src_size The length of src, in bytes. * @param dst The destination buffer for the signature. -* @param dst_len The length of the destination buffer. +* @param dst_size The length of the destination buffer. * * @return true if signing succeeded, false otherwise. */
src/openvpn/ssl_ncp.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.c to be able to unit test it. */
src/openvpn/ssl_ncp.h +3 -2
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.h to be able to unit test it. */
@@ -90,7 +91,7 @@* Check whether the ciphers in the supplied list are supported. * * @param list Colon-separated list of ciphers -* @parms gc gc_arena to allocate the returned string +* @param gc gc_arena to allocate the returned string * * @returns colon separated string of normalised (via * translate_cipher_name_from_openvpn) and
src/openvpn/ssl_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifndef SSL_OPENSSL_H_
src/openvpn/ssl_pkt.h +5 -4
@@ -22,9 +22,10 @@*/ /** -* @file SSL control channel wrap/unwrap and decode functions. This file -* (and its .c file) is designed to to be included in units/etc without -* pulling in a lot of dependencies +* @file +* SSL control channel wrap/unwrap and decode functions. +* This file (and its .c file) is designed to to be included in units/etc without +* pulling in a lot of dependencies. */ #ifndef SSL_PKT_H
@@ -182,7 +183,7 @@/** * Checks if a control packet has a correct HMAC server session id * -* @param client_sid session id of the client +* @param state session information * @param from link_socket from the client * @param hmac the hmac context to use for the calculation * @param handwindow the quantisation of the current time
src/openvpn/ssl_util.h +4 -2
@@ -22,8 +22,10 @@*/ /** -* @file SSL utility function. This file (and its .c file) is designed to -* to be included in units/etc without pulling in a lot of dependencies +* @file +* SSL utility functions. +* This file (and its .c file) is designed to to be included in units/etc +* without pulling in a lot of dependencies. */ #ifndef SSL_UTIL_H_
src/openvpn/ssl_verify.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifndef SSL_VERIFY_H_
src/openvpn/ssl_verify_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module library-specific backend interface +* @file +* Control Channel Verification Module library-specific backend interface */ #ifndef SSL_VERIFY_BACKEND_H_
src/openvpn/ssl_verify_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifndef SSL_VERIFY_MBEDTLS_H_
src/openvpn/ssl_verify_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL implementation +* @file +* Control Channel Verification Module OpenSSL implementation */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL backend +* @file +* Control Channel Verification Module OpenSSL backend */
src/openvpn/tls_crypt.h +2 -2
@@ -167,8 +167,8 @@/** * Initialize a tls-crypt-v2 server key (used to encrypt/decrypt client keys). * -* @param key Key structure to be initialized. Must be non-NULL. -* @parem encrypt If true, initialize the key structure for encryption, +* @param key_ctx Key structure to be initialized. Must be non-NULL. +* @param encrypt If true, initialize the key structure for encryption, * otherwise for decryption. * @param key_file File path of the key file to load or the key itself if * key_inline is true.
src/openvpn/tun.c +2 -2
@@ -1104,7 +1104,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
@@ -1303,7 +1303,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/openvpn/tun.h +1 -1
@@ -330,7 +330,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/tapctl/tap.c +1 -1
@@ -632,7 +632,7 @@* @param dwProperty Specifies the property to be retrieved. See * https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967.aspx * -* @pdwPropertyRegDataType A pointer to a variable that receives the data type of the +* @param pdwPropertyRegDataType A pointer to a variable that receives the data type of the * property that is being retrieved. This is one of the standard * registry data types. This parameter is optional and can be NULL. *
[Openvpn-devel] [PATCH applied] Re: Review doxygen warnings
Only comment changes, so nothing to test for me :-)
Your patch has been applied to the master branch.
commit ccdffc08f3c9e672f68755876138e1f50468575f
Author: Frank Lichtenheld Date: Fri Dec 27 17:16:48 2024 +0100
Review doxygen warnings
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30256.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/778?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by plaisthos
Change subject: Review doxygen warnings
......................................................................
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)
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30256.html
---
M doc/doxygen/doc_compression.h
M doc/doxygen/doc_protocol_overview.h
M sample/sample-plugins/simple/base64.c
M src/openvpn/argv.c
M src/openvpn/buffer.h
M src/openvpn/console.h
M src/openvpn/console_builtin.c
M src/openvpn/console_systemd.c
M src/openvpn/crypto.h
M src/openvpn/crypto_backend.h
M src/openvpn/crypto_mbedtls.c
M src/openvpn/crypto_mbedtls.h
M src/openvpn/crypto_openssl.c
M src/openvpn/crypto_openssl.h
M src/openvpn/dns.c
M src/openvpn/forward.h
M src/openvpn/init.c
M src/openvpn/lzo.c
M src/openvpn/manage.c
M src/openvpn/mbedtls_compat.h
M src/openvpn/multi.h
M src/openvpn/openssl_compat.h
M src/openvpn/pkcs11_backend.h
M src/openvpn/pkcs11_mbedtls.c
M src/openvpn/pkcs11_openssl.c
M src/openvpn/push.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/ssl_backend.h
M src/openvpn/ssl_common.h
M src/openvpn/ssl_mbedtls.c
M src/openvpn/ssl_mbedtls.h
M src/openvpn/ssl_ncp.c
M src/openvpn/ssl_ncp.h
M src/openvpn/ssl_openssl.c
M src/openvpn/ssl_openssl.h
M src/openvpn/ssl_pkt.h
M src/openvpn/ssl_util.h
M src/openvpn/ssl_verify.c
M src/openvpn/ssl_verify.h
M src/openvpn/ssl_verify_backend.h
M src/openvpn/ssl_verify_mbedtls.c
M src/openvpn/ssl_verify_mbedtls.h
M src/openvpn/ssl_verify_openssl.c
M src/openvpn/ssl_verify_openssl.h
M src/openvpn/tls_crypt.h
M src/openvpn/tun.c
M src/openvpn/tun.h
M src/tapctl/tap.c
49 files changed, 152 insertions(+), 117 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/78/778/3
doc/doxygen/doc_compression.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Compression module documentation file. +* @file +* Data Channel Compression module documentation file. */ /**
doc/doxygen/doc_protocol_overview.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Network protocol overview documentation file. +* @file +* Network protocol overview documentation file. */ /**
sample/sample-plugins/simple/base64.c +6 -5
@@ -44,7 +44,7 @@* returns, any returned pointers are invalid. * * @param name String containing the env.var name to search for -* @param envp String array pointer to the environment variable +* @param envp String array pointer to the environment variables * * @return Returns a pointer to the value in the environment variable * table on successful match. Otherwise NULL is returned
@@ -138,10 +138,11 @@* For the arguments, see the include/openvpn-plugin.h file * for details on the function parameters * -* @param args Pointer to a struct with details about the plug-in -* call from the main OpenVPN process. -* @param returndata Pointer to a struct where the plug-in can provide -* information back to OpenVPN to be processed +* @param handle Pointer to the plug-in global context buffer, which +* need to be released by this function +* @param type Type of the hook +* @param argv String array pointer to arguments for the hook +* @param envp String array pointer to current environment variables * * @return Must return OPENVPN_PLUGIN_FUNC_SUCCESS or * OPENVPN_PLUGIN_FUNC_DEFERRED on success. Otherwise it
src/openvpn/argv.c +35 -35
167 lines not on this page · raw message
src/openvpn/buffer.h +1 -1
@@ -1218,7 +1218,7 @@/** * buffer_read_from_file - copy the content of a file into a buffer * -* @param file path to the file to read +* @param filename path to the file to read * @param gc the garbage collector to use when allocating the buffer. It * is passed to alloc_buf_gc() and therefore can be NULL. *
src/openvpn/console.h +1 -1
@@ -112,7 +112,7 @@/** -* A plain "make Gert happy" wrapper. Same arguments as @query_user_add +* A plain "make Gert happy" wrapper. Same arguments as query_user_add() * * FIXME/TODO: Remove this when refactoring the complete user query process * to be called at start-up initialization of OpenVPN.
src/openvpn/console_builtin.c +5 -5
@@ -166,7 +166,7 @@/** * Closes the TTY FILE pointer, but only if it is not a stdin/stderr FILE object. * -* @params fp FILE pointer to close +* @param fp FILE pointer to close * */ static void
@@ -184,10 +184,10 @@/** * Core function for getting input from console * -* @params prompt The prompt to present to the user -* @params echo Should the user see what is being typed -* @params input Pointer to the buffer used to save the user input -* @params capacity Size of the input buffer +* @param prompt The prompt to present to the user +* @param echo Should the user see what is being typed +* @param input Pointer to the buffer used to save the user input +* @param capacity Size of the input buffer * * @returns Returns True if user input was gathered */
src/openvpn/console_systemd.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Alternative method to query for user input, using systemd +* @file +* Alternative method to query for user input, using systemd * */
src/openvpn/crypto.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography Module +* @file +* Data Channel Cryptography Module * * @addtogroup data_crypto Data Channel Crypto module *
@@ -491,7 +492,7 @@* this and add it themselves. * * @param kt Struct with the crypto algorithm to use -* @param packet_id_size Size of the packet id +* @param pkt_id_size Size of the packet id * @param occ if true calculates the overhead for crypto in the same * incorrect way as all previous OpenVPN versions did, to * end up with identical numbers for OCC compatibility
@@ -509,7 +510,7 @@* and write to file. * * @param filename Filename of the server key file to create. -* @param pem_name The name to use in the PEM header/footer. +* @param key_name The name to use in the PEM header/footer. */ void write_pem_key_file (const char *filename,const char *key_name);
src/openvpn/crypto_backend.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography SSL library-specific backend interface +* @file +* Data Channel Cryptography SSL library-specific backend interface */ #ifndef CRYPTO_BACKEND_H_
@@ -339,7 +340,7 @@* \c OPENVPN_OP_ENCRYPT or \c OPENVPN_OP_DECRYPT). */ void cipher_ctx_init (cipher_ctx_t *ctx,const uint8_t *key, -const char *cipername,crypto_operation_t enc); +const char *ciphername,crypto_operation_t enc);/** * Returns the size of the IV used by the cipher, in bytes, or 0 if no IV is
@@ -357,7 +358,7 @@* * @param ctx The cipher's context * @param tag The buffer to write computed tag in. -* @param tag_size The tag buffer size, in bytes. +* @param tag_len The tag buffer size, in bytes. */ int cipher_ctx_get_tag (cipher_ctx_t *ctx,uint8_t *tag,int tag_len);
src/openvpn/crypto_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifndef CRYPTO_MBEDTLS_H_
src/openvpn/crypto_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_openssl.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifndef CRYPTO_OPENSSL_H_
@@ -110,8 +111,7 @@* This is just a convenience wrapper for often occurring situations. * * @param flags Flags to indicate error type and priority. -* @param format Format string to print. -* @param format args (optional) arguments for the format string. +* @param ... Format string and optional format arguments */ #define crypto_msg (flags, ...) \ do { \
src/openvpn/dns.c +1 -1
@@ -34,7 +34,7 @@* Parses a string as port and stores it * * @param port Pointer to in_port_t where the port value is stored -* @param addr Port number as string +* @param port_str Port number as string * @return True if parsing was successful */ static bool
src/openvpn/forward.h +3 -3
@@ -86,11 +86,11 @@* - Check that the client authentication has succeeded; if not, drop the * packet. * - If the \a comp_frag argument is true: -* - Call \c lzo_compress() of the \link Data Channel Compression +* - Call \c lzo_compress() of the \link compression Data Channel Compression * module\endlink to (possibly) compress the packet. -* - Call \c fragment_outgoing() of the \link Data Channel Fragmentation +* - Call \c fragment_outgoing() of the \link fragmentation Data Channel Fragmentation * module\endlink to (possibly) fragment the packet. -* - Activate the \link Data Channel Crypto module\endlink to perform +* - Activate the \link data_crypto Data Channel Crypto module\endlink to perform * security operations on the packet. * - Call \c tls_pre_encrypt() to choose the appropriate security * parameters for this packet.
src/openvpn/init.c +3 -3
@@ -294,8 +294,8 @@* * This will write the control message * -* command parm1,parm2,.. -* . +* command parm1,parm2,... +* * to the control channel. * * @param arg The context struct
@@ -2278,7 +2278,7 @@/** * Prints the results of options imported for the data channel -* @param o +* @param c */ static void tls_print_deferred_options_results (struct context *c)
src/openvpn/lzo.c +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Data Channel Compression module function definitions. +* @file +* Data Channel Compression module function definitions. */ #ifdef HAVE_CONFIG_H
src/openvpn/manage.c +1 -0
@@ -1240,6 +1240,7 @@* Checks if the correct number of arguments to a management command are present * and otherwise prints an error and returns false. * +* @param man The management interface struct * @param p pointer to the parameter array * @param n number of arguments required * @param flags if MN_AT_LEAST require at least n parameters and not exactly n
src/openvpn/mbedtls_compat.h +2 -2
@@ -22,8 +22,8 @@*/ /** -* @file mbedtls compatibility stub -* +* @file +* mbedtls compatibility stub. * This file provide compatibility stubs for the mbedtls libraries * prior to version 3. This version made most fields in structs private * and requires accessor functions to be used. For earlier versions, we
src/openvpn/multi.h +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Header file for server-mode related structures and functions. +* @file +* Header file for server-mode related structures and functions. */ #ifndef MULTI_H
src/openvpn/openssl_compat.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file OpenSSL compatibility stub +* @file +* OpenSSL compatibility stub * * This file provide compatibility stubs for the OpenSSL libraries * prior to version 1.1. This version introduces many changes in the
src/openvpn/pkcs11_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 SSL library-specific backend +* @file +* PKCS #11 SSL library-specific backend */ #ifndef PKCS11_BACKEND_H_
src/openvpn/pkcs11_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 mbed TLS backend +* @file +* PKCS #11 mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/pkcs11_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 OpenSSL backend +* @file +* PKCS #11 OpenSSL backend */ #ifdef HAVE_CONFIG_H
src/openvpn/push.c +1 -1
@@ -604,7 +604,7 @@/** * Prepare push options, based on local options * -* @param context context structure storing data for VPN tunnel +* @param c context structure storing data for VPN tunnel * @param gc gc arena for allocating push options * @param push_list push list to where options are added *
src/openvpn/ssl.c +7 -6
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation Module +* @file +* Control Channel SSL/Data channel negotiation Module */ /*
@@ -98,7 +99,7 @@/** * Limit the reneg_bytes value when using a small-block (<128 bytes) cipher. * -* @param cipher The current cipher (may be NULL). +* @param ciphername The current cipher (may be NULL). * @param reneg_bytes Pointer to the current reneg_bytes, updated if needed. * May *not* be NULL. */
@@ -461,10 +462,10 @@* - the CRL file was passed inline * - the CRL file was not modified since the last (re)load * -* @param ssl_ctx The TLS context to use when reloading the CRL -* @param crl_file The file name to load the CRL from, or -* "[[INLINE]]" in the case of inline files. -* @param crl_inline A string containing the CRL +* @param ssl_ctx The TLS context to use when reloading the CRL +* @param crl_file The file name to load the CRL from, or +* or an array containing the inline CRL. +* @param crl_file_inline True if crl_file is an inline CRL. */ static void tls_ctx_reload_crl(struct tls_root_ctx *ssl_ctx, const char *crl_file,
src/openvpn/ssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation module +* @file +* Control Channel SSL/Data channel negotiation module */ #ifndef OPENVPN_SSL_H
src/openvpn/ssl_backend.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL library backend module +* @file +* Control Channel SSL library backend module */
@@ -252,7 +253,7 @@* context. * * @param ctx TLS context to use -* @param crypto_api_cert String representing the certificate to load. +* @param cryptoapi_cert String representing the certificate to load. */ #ifdef ENABLE_CRYPTOAPI void tls_ctx_load_cryptoapi (struct tls_root_ctx *ctx,const char *cryptoapi_cert);
@@ -506,7 +507,6 @@* @param ks_ssl - The security parameter state for this %key * session. * @param buf - A buffer in which to store the plaintext. -* @param maxlen - The maximum number of bytes to extract. * * @return The return value indicates whether the data was successfully * processed:
src/openvpn/ssl_common.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Common Data Structures +* @file +* Control Channel Common Data Structures */ #ifndef SSL_COMMON_H_
src/openvpn/ssl_mbedtls.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_mbedtls.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifndef SSL_MBEDTLS_H_
@@ -67,9 +68,9 @@* * @param sign_ctx The context for the signing function. * @param src The data to be signed, -* @param src_len The length of src, in bytes. +* @param src_size The length of src, in bytes. * @param dst The destination buffer for the signature. -* @param dst_len The length of the destination buffer. +* @param dst_size The length of the destination buffer. * * @return true if signing succeeded, false otherwise. */
src/openvpn/ssl_ncp.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.c to be able to unit test it. */
src/openvpn/ssl_ncp.h +3 -2
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.h to be able to unit test it. */
@@ -90,7 +91,7 @@* Check whether the ciphers in the supplied list are supported. * * @param list Colon-separated list of ciphers -* @parms gc gc_arena to allocate the returned string +* @param gc gc_arena to allocate the returned string * * @returns colon separated string of normalised (via * translate_cipher_name_from_openvpn) and
src/openvpn/ssl_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifndef SSL_OPENSSL_H_
src/openvpn/ssl_pkt.h +5 -4
@@ -22,9 +22,10 @@*/ /** -* @file SSL control channel wrap/unwrap and decode functions. This file -* (and its .c file) is designed to to be included in units/etc without -* pulling in a lot of dependencies +* @file +* SSL control channel wrap/unwrap and decode functions. +* This file (and its .c file) is designed to to be included in units/etc without +* pulling in a lot of dependencies. */ #ifndef SSL_PKT_H
@@ -182,7 +183,7 @@/** * Checks if a control packet has a correct HMAC server session id * -* @param client_sid session id of the client +* @param state session information * @param from link_socket from the client * @param hmac the hmac context to use for the calculation * @param handwindow the quantisation of the current time
src/openvpn/ssl_util.h +4 -2
@@ -22,8 +22,10 @@*/ /** -* @file SSL utility function. This file (and its .c file) is designed to -* to be included in units/etc without pulling in a lot of dependencies +* @file +* SSL utility functions. +* This file (and its .c file) is designed to to be included in units/etc +* without pulling in a lot of dependencies. */ #ifndef SSL_UTIL_H_
src/openvpn/ssl_verify.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifndef SSL_VERIFY_H_
src/openvpn/ssl_verify_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module library-specific backend interface +* @file +* Control Channel Verification Module library-specific backend interface */ #ifndef SSL_VERIFY_BACKEND_H_
src/openvpn/ssl_verify_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifndef SSL_VERIFY_MBEDTLS_H_
src/openvpn/ssl_verify_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL implementation +* @file +* Control Channel Verification Module OpenSSL implementation */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL backend +* @file +* Control Channel Verification Module OpenSSL backend */
src/openvpn/tls_crypt.h +2 -2
@@ -167,8 +167,8 @@/** * Initialize a tls-crypt-v2 server key (used to encrypt/decrypt client keys). * -* @param key Key structure to be initialized. Must be non-NULL. -* @parem encrypt If true, initialize the key structure for encryption, +* @param key_ctx Key structure to be initialized. Must be non-NULL. +* @param encrypt If true, initialize the key structure for encryption, * otherwise for decryption. * @param key_file File path of the key file to load or the key itself if * key_inline is true.
src/openvpn/tun.c +2 -2
@@ -1104,7 +1104,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
@@ -1303,7 +1303,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/openvpn/tun.h +1 -1
@@ -330,7 +330,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/tapctl/tap.c +1 -1
@@ -632,7 +632,7 @@* @param dwProperty Specifies the property to be retrieved. See * https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967.aspx * -* @pdwPropertyRegDataType A pointer to a variable that receives the data type of the +* @param pdwPropertyRegDataType A pointer to a variable that receives the data type of the * property that is being retrieved. This is one of the standard * registry data types. This parameter is optional and can be NULL. *
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/778?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a852eb5fafae3a0e85dd89ea6d4c91fcf2fab4e
Gerrit-Change-Number: 778
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/778?usp=email )
Change subject: Review doxygen warnings
......................................................................
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)
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30256.html
---
M doc/doxygen/doc_compression.h
M doc/doxygen/doc_protocol_overview.h
M sample/sample-plugins/simple/base64.c
M src/openvpn/argv.c
M src/openvpn/buffer.h
M src/openvpn/console.h
M src/openvpn/console_builtin.c
M src/openvpn/console_systemd.c
M src/openvpn/crypto.h
M src/openvpn/crypto_backend.h
M src/openvpn/crypto_mbedtls.c
M src/openvpn/crypto_mbedtls.h
M src/openvpn/crypto_openssl.c
M src/openvpn/crypto_openssl.h
M src/openvpn/dns.c
M src/openvpn/forward.h
M src/openvpn/init.c
M src/openvpn/lzo.c
M src/openvpn/manage.c
M src/openvpn/mbedtls_compat.h
M src/openvpn/multi.h
M src/openvpn/openssl_compat.h
M src/openvpn/pkcs11_backend.h
M src/openvpn/pkcs11_mbedtls.c
M src/openvpn/pkcs11_openssl.c
M src/openvpn/push.c
M src/openvpn/ssl.c
M src/openvpn/ssl.h
M src/openvpn/ssl_backend.h
M src/openvpn/ssl_common.h
M src/openvpn/ssl_mbedtls.c
M src/openvpn/ssl_mbedtls.h
M src/openvpn/ssl_ncp.c
M src/openvpn/ssl_ncp.h
M src/openvpn/ssl_openssl.c
M src/openvpn/ssl_openssl.h
M src/openvpn/ssl_pkt.h
M src/openvpn/ssl_util.h
M src/openvpn/ssl_verify.c
M src/openvpn/ssl_verify.h
M src/openvpn/ssl_verify_backend.h
M src/openvpn/ssl_verify_mbedtls.c
M src/openvpn/ssl_verify_mbedtls.h
M src/openvpn/ssl_verify_openssl.c
M src/openvpn/ssl_verify_openssl.h
M src/openvpn/tls_crypt.h
M src/openvpn/tun.c
M src/openvpn/tun.h
M src/tapctl/tap.c
49 files changed, 152 insertions(+), 117 deletions(-)
doc/doxygen/doc_compression.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Compression module documentation file. +* @file +* Data Channel Compression module documentation file. */ /**
doc/doxygen/doc_protocol_overview.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Network protocol overview documentation file. +* @file +* Network protocol overview documentation file. */ /**
sample/sample-plugins/simple/base64.c +6 -5
@@ -44,7 +44,7 @@* returns, any returned pointers are invalid. * * @param name String containing the env.var name to search for -* @param envp String array pointer to the environment variable +* @param envp String array pointer to the environment variables * * @return Returns a pointer to the value in the environment variable * table on successful match. Otherwise NULL is returned
@@ -138,10 +138,11 @@* For the arguments, see the include/openvpn-plugin.h file * for details on the function parameters * -* @param args Pointer to a struct with details about the plug-in -* call from the main OpenVPN process. -* @param returndata Pointer to a struct where the plug-in can provide -* information back to OpenVPN to be processed +* @param handle Pointer to the plug-in global context buffer, which +* need to be released by this function +* @param type Type of the hook +* @param argv String array pointer to arguments for the hook +* @param envp String array pointer to current environment variables * * @return Must return OPENVPN_PLUGIN_FUNC_SUCCESS or * OPENVPN_PLUGIN_FUNC_DEFERRED on success. Otherwise it
src/openvpn/argv.c +35 -35
167 lines not on this page · raw message
src/openvpn/buffer.h +1 -1
@@ -1218,7 +1218,7 @@/** * buffer_read_from_file - copy the content of a file into a buffer * -* @param file path to the file to read +* @param filename path to the file to read * @param gc the garbage collector to use when allocating the buffer. It * is passed to alloc_buf_gc() and therefore can be NULL. *
src/openvpn/console.h +1 -1
@@ -112,7 +112,7 @@/** -* A plain "make Gert happy" wrapper. Same arguments as @query_user_add +* A plain "make Gert happy" wrapper. Same arguments as query_user_add() * * FIXME/TODO: Remove this when refactoring the complete user query process * to be called at start-up initialization of OpenVPN.
src/openvpn/console_builtin.c +5 -5
@@ -166,7 +166,7 @@/** * Closes the TTY FILE pointer, but only if it is not a stdin/stderr FILE object. * -* @params fp FILE pointer to close +* @param fp FILE pointer to close * */ static void
@@ -184,10 +184,10 @@/** * Core function for getting input from console * -* @params prompt The prompt to present to the user -* @params echo Should the user see what is being typed -* @params input Pointer to the buffer used to save the user input -* @params capacity Size of the input buffer +* @param prompt The prompt to present to the user +* @param echo Should the user see what is being typed +* @param input Pointer to the buffer used to save the user input +* @param capacity Size of the input buffer * * @returns Returns True if user input was gathered */
src/openvpn/console_systemd.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Alternative method to query for user input, using systemd +* @file +* Alternative method to query for user input, using systemd * */
src/openvpn/crypto.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography Module +* @file +* Data Channel Cryptography Module * * @addtogroup data_crypto Data Channel Crypto module *
@@ -491,7 +492,7 @@* this and add it themselves. * * @param kt Struct with the crypto algorithm to use -* @param packet_id_size Size of the packet id +* @param pkt_id_size Size of the packet id * @param occ if true calculates the overhead for crypto in the same * incorrect way as all previous OpenVPN versions did, to * end up with identical numbers for OCC compatibility
@@ -509,7 +510,7 @@* and write to file. * * @param filename Filename of the server key file to create. -* @param pem_name The name to use in the PEM header/footer. +* @param key_name The name to use in the PEM header/footer. */ void write_pem_key_file (const char *filename,const char *key_name);
src/openvpn/crypto_backend.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography SSL library-specific backend interface +* @file +* Data Channel Cryptography SSL library-specific backend interface */ #ifndef CRYPTO_BACKEND_H_
@@ -339,7 +340,7 @@* \c OPENVPN_OP_ENCRYPT or \c OPENVPN_OP_DECRYPT). */ void cipher_ctx_init (cipher_ctx_t *ctx,const uint8_t *key, -const char *cipername,crypto_operation_t enc); +const char *ciphername,crypto_operation_t enc);/** * Returns the size of the IV used by the cipher, in bytes, or 0 if no IV is
@@ -357,7 +358,7 @@* * @param ctx The cipher's context * @param tag The buffer to write computed tag in. -* @param tag_size The tag buffer size, in bytes. +* @param tag_len The tag buffer size, in bytes. */ int cipher_ctx_get_tag (cipher_ctx_t *ctx,uint8_t *tag,int tag_len);
src/openvpn/crypto_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography mbed TLS-specific backend interface +* @file +* Data Channel Cryptography mbed TLS-specific backend interface */ #ifndef CRYPTO_MBEDTLS_H_
src/openvpn/crypto_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifdef HAVE_CONFIG_H
src/openvpn/crypto_openssl.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Data Channel Cryptography OpenSSL-specific backend interface +* @file +* Data Channel Cryptography OpenSSL-specific backend interface */ #ifndef CRYPTO_OPENSSL_H_
@@ -110,8 +111,7 @@* This is just a convenience wrapper for often occurring situations. * * @param flags Flags to indicate error type and priority. -* @param format Format string to print. -* @param format args (optional) arguments for the format string. +* @param ... Format string and optional format arguments */ #define crypto_msg (flags, ...) \ do { \
src/openvpn/dns.c +1 -1
@@ -34,7 +34,7 @@* Parses a string as port and stores it * * @param port Pointer to in_port_t where the port value is stored -* @param addr Port number as string +* @param port_str Port number as string * @return True if parsing was successful */ static bool
src/openvpn/forward.h +3 -3
@@ -86,11 +86,11 @@* - Check that the client authentication has succeeded; if not, drop the * packet. * - If the \a comp_frag argument is true: -* - Call \c lzo_compress() of the \link Data Channel Compression +* - Call \c lzo_compress() of the \link compression Data Channel Compression * module\endlink to (possibly) compress the packet. -* - Call \c fragment_outgoing() of the \link Data Channel Fragmentation +* - Call \c fragment_outgoing() of the \link fragmentation Data Channel Fragmentation * module\endlink to (possibly) fragment the packet. -* - Activate the \link Data Channel Crypto module\endlink to perform +* - Activate the \link data_crypto Data Channel Crypto module\endlink to perform * security operations on the packet. * - Call \c tls_pre_encrypt() to choose the appropriate security * parameters for this packet.
src/openvpn/init.c +3 -3
@@ -294,8 +294,8 @@* * This will write the control message * -* command parm1,parm2,.. -* . +* command parm1,parm2,... +* * to the control channel. * * @param arg The context struct
@@ -2278,7 +2278,7 @@/** * Prints the results of options imported for the data channel -* @param o +* @param c */ static void tls_print_deferred_options_results (struct context *c)
src/openvpn/lzo.c +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Data Channel Compression module function definitions. +* @file +* Data Channel Compression module function definitions. */ #ifdef HAVE_CONFIG_H
src/openvpn/manage.c +1 -0
@@ -1240,6 +1240,7 @@* Checks if the correct number of arguments to a management command are present * and otherwise prints an error and returns false. * +* @param man The management interface struct * @param p pointer to the parameter array * @param n number of arguments required * @param flags if MN_AT_LEAST require at least n parameters and not exactly n
src/openvpn/mbedtls_compat.h +2 -2
@@ -22,8 +22,8 @@*/ /** -* @file mbedtls compatibility stub -* +* @file +* mbedtls compatibility stub. * This file provide compatibility stubs for the mbedtls libraries * prior to version 3. This version made most fields in structs private * and requires accessor functions to be used. For earlier versions, we
src/openvpn/multi.h +2 -1
@@ -22,7 +22,8 @@*/ /** -* @file Header file for server-mode related structures and functions. +* @file +* Header file for server-mode related structures and functions. */ #ifndef MULTI_H
src/openvpn/openssl_compat.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file OpenSSL compatibility stub +* @file +* OpenSSL compatibility stub * * This file provide compatibility stubs for the OpenSSL libraries * prior to version 1.1. This version introduces many changes in the
src/openvpn/pkcs11_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 SSL library-specific backend +* @file +* PKCS #11 SSL library-specific backend */ #ifndef PKCS11_BACKEND_H_
src/openvpn/pkcs11_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 mbed TLS backend +* @file +* PKCS #11 mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/pkcs11_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file PKCS #11 OpenSSL backend +* @file +* PKCS #11 OpenSSL backend */ #ifdef HAVE_CONFIG_H
src/openvpn/push.c +1 -1
@@ -604,7 +604,7 @@/** * Prepare push options, based on local options * -* @param context context structure storing data for VPN tunnel +* @param c context structure storing data for VPN tunnel * @param gc gc arena for allocating push options * @param push_list push list to where options are added *
src/openvpn/ssl.c +7 -6
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation Module +* @file +* Control Channel SSL/Data channel negotiation Module */ /*
@@ -98,7 +99,7 @@/** * Limit the reneg_bytes value when using a small-block (<128 bytes) cipher. * -* @param cipher The current cipher (may be NULL). +* @param ciphername The current cipher (may be NULL). * @param reneg_bytes Pointer to the current reneg_bytes, updated if needed. * May *not* be NULL. */
@@ -461,10 +462,10 @@* - the CRL file was passed inline * - the CRL file was not modified since the last (re)load * -* @param ssl_ctx The TLS context to use when reloading the CRL -* @param crl_file The file name to load the CRL from, or -* "[[INLINE]]" in the case of inline files. -* @param crl_inline A string containing the CRL +* @param ssl_ctx The TLS context to use when reloading the CRL +* @param crl_file The file name to load the CRL from, or +* or an array containing the inline CRL. +* @param crl_file_inline True if crl_file is an inline CRL. */ static void tls_ctx_reload_crl(struct tls_root_ctx *ssl_ctx, const char *crl_file,
src/openvpn/ssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data channel negotiation module +* @file +* Control Channel SSL/Data channel negotiation module */ #ifndef OPENVPN_SSL_H
src/openvpn/ssl_backend.h +3 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL library backend module +* @file +* Control Channel SSL library backend module */
@@ -252,7 +253,7 @@* context. * * @param ctx TLS context to use -* @param crypto_api_cert String representing the certificate to load. +* @param cryptoapi_cert String representing the certificate to load. */ #ifdef ENABLE_CRYPTOAPI void tls_ctx_load_cryptoapi (struct tls_root_ctx *ctx,const char *cryptoapi_cert);
@@ -506,7 +507,6 @@* @param ks_ssl - The security parameter state for this %key * session. * @param buf - A buffer in which to store the plaintext. -* @param maxlen - The maximum number of bytes to extract. * * @return The return value indicates whether the data was successfully * processed:
src/openvpn/ssl_common.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Common Data Structures +* @file +* Control Channel Common Data Structures */ #ifndef SSL_COMMON_H_
src/openvpn/ssl_mbedtls.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_mbedtls.h +4 -3
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel mbed TLS Backend +* @file +* Control Channel mbed TLS Backend */ #ifndef SSL_MBEDTLS_H_
@@ -67,9 +68,9 @@* * @param sign_ctx The context for the signing function. * @param src The data to be signed, -* @param src_len The length of src, in bytes. +* @param src_size The length of src, in bytes. * @param dst The destination buffer for the signature. -* @param dst_len The length of the destination buffer. +* @param dst_size The length of the destination buffer. * * @return true if signing succeeded, false otherwise. */
src/openvpn/ssl_ncp.c +2 -1
@@ -24,7 +24,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.c to be able to unit test it. */
src/openvpn/ssl_ncp.h +3 -2
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel SSL/Data dynamic negotiation Module +* @file +* Control Channel SSL/Data dynamic negotiation Module * This file is split from ssl.h to be able to unit test it. */
@@ -90,7 +91,7 @@* Check whether the ciphers in the supplied list are supported. * * @param list Colon-separated list of ciphers -* @parms gc gc_arena to allocate the returned string +* @param gc gc_arena to allocate the returned string * * @returns colon separated string of normalised (via * translate_cipher_name_from_openvpn) and
src/openvpn/ssl_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel OpenSSL Backend +* @file +* Control Channel OpenSSL Backend */ #ifndef SSL_OPENSSL_H_
src/openvpn/ssl_pkt.h +5 -4
@@ -22,9 +22,10 @@*/ /** -* @file SSL control channel wrap/unwrap and decode functions. This file -* (and its .c file) is designed to to be included in units/etc without -* pulling in a lot of dependencies +* @file +* SSL control channel wrap/unwrap and decode functions. +* This file (and its .c file) is designed to to be included in units/etc without +* pulling in a lot of dependencies. */ #ifndef SSL_PKT_H
@@ -182,7 +183,7 @@/** * Checks if a control packet has a correct HMAC server session id * -* @param client_sid session id of the client +* @param state session information * @param from link_socket from the client * @param hmac the hmac context to use for the calculation * @param handwindow the quantisation of the current time
src/openvpn/ssl_util.h +4 -2
@@ -22,8 +22,10 @@*/ /** -* @file SSL utility function. This file (and its .c file) is designed to -* to be included in units/etc without pulling in a lot of dependencies +* @file +* SSL utility functions. +* This file (and its .c file) is designed to to be included in units/etc +* without pulling in a lot of dependencies. */ #ifndef SSL_UTIL_H_
src/openvpn/ssl_verify.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module +* @file +* Control Channel Verification Module */ #ifndef SSL_VERIFY_H_
src/openvpn/ssl_verify_backend.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module library-specific backend interface +* @file +* Control Channel Verification Module library-specific backend interface */ #ifndef SSL_VERIFY_BACKEND_H_
src/openvpn/ssl_verify_mbedtls.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_mbedtls.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module mbed TLS backend +* @file +* Control Channel Verification Module mbed TLS backend */ #ifndef SSL_VERIFY_MBEDTLS_H_
src/openvpn/ssl_verify_openssl.c +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL implementation +* @file +* Control Channel Verification Module OpenSSL implementation */ #ifdef HAVE_CONFIG_H
src/openvpn/ssl_verify_openssl.h +2 -1
@@ -23,7 +23,8 @@*/ /** -* @file Control Channel Verification Module OpenSSL backend +* @file +* Control Channel Verification Module OpenSSL backend */
src/openvpn/tls_crypt.h +2 -2
@@ -167,8 +167,8 @@/** * Initialize a tls-crypt-v2 server key (used to encrypt/decrypt client keys). * -* @param key Key structure to be initialized. Must be non-NULL. -* @parem encrypt If true, initialize the key structure for encryption, +* @param key_ctx Key structure to be initialized. Must be non-NULL. +* @param encrypt If true, initialize the key structure for encryption, * otherwise for decryption. * @param key_file File path of the key file to load or the key itself if * key_inline is true.
src/openvpn/tun.c +2 -2
@@ -1104,7 +1104,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
@@ -1303,7 +1303,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/openvpn/tun.h +1 -1
@@ -330,7 +330,7 @@* * @param tt the tuntap interface context * @param ifname the human readable interface name -* @param mtu the MTU value to set the interface to +* @param tun_mtu the MTU value to set the interface to * @param es the environment to be used when executing the commands * @param ctx the networking API opaque context */
src/tapctl/tap.c +1 -1
@@ -632,7 +632,7 @@* @param dwProperty Specifies the property to be retrieved. See * https://msdn.microsoft.com/en-us/library/windows/hardware/ff551967.aspx * -* @pdwPropertyRegDataType A pointer to a variable that receives the data type of the +* @param pdwPropertyRegDataType A pointer to a variable that receives the data type of the * property that is being retrieved. This is one of the standard * registry data types. This parameter is optional and can be NULL. *
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/778?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7a852eb5fafae3a0e85dd89ea6d4c91fcf2fab4e
Gerrit-Change-Number: 778
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged