diff --git a/base/hosts.c b/base/hosts.c index 647d396f..7c1c4ca6 100644 --- a/base/hosts.c +++ b/base/hosts.c @@ -1319,7 +1319,7 @@ gvm_hosts_next (gvm_hosts_t *hosts) * @brief Move the current gvm_host_t from a gvm_hosts_t structure to * the end of the hosts list. * - * @param[in/out] hosts gvm_hosts_t structure which hosts must be + * @param[in,out] hosts gvm_hosts_t structure which hosts must be * rearange. The hosts->current index points to the last used hosts and * gvm_hosts_next() must be called to get the next host in the list. * @@ -1553,7 +1553,7 @@ gvm_vhosts_exclude (gvm_host_t *host, const char *excluded_str) * Not to be used while iterating over the single hosts as it resets the * iterator. * - * @param[in/out] hosts The hosts collection from which to exclude. + * @param[in,out] hosts The hosts collection from which to exclude. * @param[in] excluded_str String of hosts to exclude. * @param[in] max_hosts Max number of hosts in hosts_str. 0 means unlimited. * @@ -1626,7 +1626,7 @@ gvm_hosts_exclude_with_max (gvm_hosts_t *hosts, const char *excluded_str, /** * @brief Returns a list of hosts after a host authorization check. * - * @param[in/out] hosts The hosts collection from which to exclude. + * @param[in,out] hosts The hosts collection from which to exclude. * @param[in] deny_hosts_str String of denied hosts. This hosts will be * removed from the hosts list * @param[in] allow_hosts_str String of allow hosts. This hosts will be kept diff --git a/base/nvti.c b/base/nvti.c index 38d1bbbb..e3502d44 100644 --- a/base/nvti.c +++ b/base/nvti.c @@ -454,8 +454,7 @@ nvti_add_vtref (nvti_t *vt, vtref_t *ref) * @brief Add a severity to the VT Info. * * @param vt The VT Info structure. - * - * @param ref The VT severity to add. + * @param s The VT severity to add. * * @return 0 for success. Anything else indicates an error. */ @@ -1305,7 +1304,7 @@ nvti_put_name (nvti_t *n, gchar *name) * * @param n The NVT Info structure. * - * @param solution The summary to set. A copy will be created from this. + * @param summary The summary to set. A copy will be created from this. * * @return 0 for success. Anything else indicates an error. */ @@ -1325,7 +1324,7 @@ nvti_set_summary (nvti_t *n, const gchar *summary) * * @param n The NVT Info structure. * - * @param solution The summary to set. The string will be used directly. + * @param summary The summary to set. The string will be used directly. * * @return 0 for success. Anything else indicates an error. */ @@ -1425,7 +1424,7 @@ nvti_put_affected (nvti_t *n, gchar *affected) * * @param n The NVT Info structure. * - * @param affected The impact text to set. A copy will be created from this. + * @param impact The impact text to set. A copy will be created from this. * * @return 0 for success. Anything else indicates an error. */ @@ -1445,7 +1444,7 @@ nvti_set_impact (nvti_t *n, const gchar *impact) * * @param n The NVT Info structure. * - * @param affected The impact text to set. The string will be used directly. + * @param impact The impact text to set. The string will be used directly. * * @return 0 for success. Anything else indicates an error. */ diff --git a/gmp/gmp.c b/gmp/gmp.c index c7a29c82..b3ffbc11 100644 --- a/gmp/gmp.c +++ b/gmp/gmp.c @@ -348,10 +348,10 @@ gmp_authenticate (gnutls_session_t *session, const char *username, /** * @brief Authenticate with the manager. * - * @param[in] session Pointer to GNUTLS session. - * @param[in] opts Struct containing the options to apply. - * @param[out] opts Additional account information if authentication - * was successful. + * @param[in] session Pointer to GNUTLS session. + * @param[in,out] opts In: Struct containing the options to apply. + * Out: Additional account information if authentication + * was successful. * * @return 0 on success, 1 if manager closed connection, 2 if auth failed, * 3 on timeout, -1 on error. diff --git a/osp/osp.c b/osp/osp.c index e2dd6ea4..7b24171d 100644 --- a/osp/osp.c +++ b/osp/osp.c @@ -231,7 +231,7 @@ osp_send_command (osp_connection_t *connection, entity_t *response, * @brief Send a command to an OSP server. * * @param[in] connection Connection to OSP server. - * @param[out] response Response from OSP server. + * @param[out] str Response from OSP server. * @param[in] fmt OSP Command to send. * * @return 0 and response, 1 if error. @@ -673,7 +673,7 @@ osp_get_vts_ext (osp_connection_t *connection, osp_get_vts_opts_t opts, * * @param[in] connection Connection to an OSP server. * @param[in] opts Struct containing the options to apply. - * @param[out] vts VTs. + * @param[out] str Response. * * @return 0 if success, 1 if error. */ @@ -811,7 +811,7 @@ osp_get_performance_ext (osp_connection_t *connection, * @brief Get a scan status from an OSP server * * @param[in] connection Connection to an OSP server. - * @param[in] scan_id ID of scan to get. + * @param[in] opts Struct containing the options to apply. * @param[out] error Pointer to error, if any. * * @return Osp scan status @@ -1682,6 +1682,8 @@ osp_credential_set_auth_data (osp_credential_t *credential, const char *name, * @param[in] ports The ports of the target. * @param[in] exclude_hosts The excluded hosts of the target. * @param[in] alive_test The alive test method of the target. + * @param[in] reverse_lookup_unify Lookup flag. + * @param[in] reverse_lookup_only Lookup flag. * * @return The newly allocated osp_target_t. */ diff --git a/util/kb.h b/util/kb.h index d9d5bff1..a67b7a58 100644 --- a/util/kb.h +++ b/util/kb.h @@ -233,8 +233,10 @@ kb_item_free (struct kb_item *); /** * @brief Initialize a new Knowledge Base object. + * * @param[in] kb Reference to a kb_t to initialize. * @param[in] kb_path Path to KB. + * * @return 0 on success, -1 on connection error, -2 on unavailable DB spot. */ static inline int @@ -251,8 +253,10 @@ kb_new (kb_t *kb, const char *kb_path) /** * @brief Connect to a Knowledge Base object which has the given kb_index. + * * @param[in] kb_path Path to KB. * @param[in] kb_index DB index + * * @return Knowledge Base object, NULL otherwise. */ static inline kb_t @@ -266,8 +270,10 @@ kb_direct_conn (const char *kb_path, const int kb_index) /** * @brief Find an existing Knowledge Base object with key. + * * @param[in] kb_path Path to KB. * @param[in] key Marker key to search for in KB objects. + * * @return Knowledge Base object, NULL otherwise. */ static inline kb_t @@ -281,7 +287,9 @@ kb_find (const char *kb_path, const char *key) /** * @brief Delete all entries and release ownership on the namespace. + * * @param[in] kb KB handle to release. + * * @return 0 on success, non-null on error. */ static inline int @@ -296,9 +304,11 @@ kb_delete (kb_t kb) /** * @brief Get a single KB element. + * * @param[in] kb KB handle where to fetch the item. * @param[in] name Name of the element to retrieve. * @param[in] type Desired element type. + * * @return A struct kb_item to be freed with kb_item_free() or NULL if no * element was found or on error. */ @@ -314,8 +324,10 @@ kb_item_get_single (kb_t kb, const char *name, enum kb_item_type type) /** * @brief Get a single KB string item. + * * @param[in] kb KB handle where to fetch the item. * @param[in] name Name of the element to retrieve. + * * @return A string to be freed or NULL if list is empty or on error. */ static inline char * @@ -330,8 +342,10 @@ kb_item_get_str (kb_t kb, const char *name) /** * @brief Get a single KB integer item. + * * @param[in] kb KB handle where to fetch the item. * @param[in] name Name of the element to retrieve. + * * @return An integer. */ static inline int @@ -346,8 +360,10 @@ kb_item_get_int (kb_t kb, const char *name) /** * @brief Get all items stored under a given name. + * * @param[in] kb KB handle where to fetch the items. * @param[in] name Name of the elements to retrieve. + * * @return Linked struct kb_item instances to be freed with kb_item_free() or * NULL if no element was found or on error. */ @@ -363,8 +379,10 @@ kb_item_get_all (kb_t kb, const char *name) /** * @brief Get all items stored under a given pattern. + * * @param[in] kb KB handle where to fetch the items. * @param[in] pattern '*' pattern of the elements to retrieve. + * * @return Linked struct kb_item instances to be freed with kb_item_free() or * NULL if no element was found or on error. */ @@ -380,9 +398,11 @@ kb_item_get_pattern (kb_t kb, const char *pattern) /** * @brief Push a new value under a given key. + * * @param[in] kb KB handle where to store the item. * @param[in] name Key to push to. * @param[in] value Value to push. + * * @return 0 on success, non-null on error. */ static inline int @@ -397,8 +417,10 @@ kb_item_push_str (kb_t kb, const char *name, const char *value) /** * @brief Pop a single KB string item. + * * @param[in] kb KB handle where to fetch the item. * @param[in] name Name of the element to retrieve. + * * @return A struct kb_item to be freed with kb_item_free() or NULL if no * element was found or on error. */ @@ -415,9 +437,11 @@ kb_item_pop_str (kb_t kb, const char *name) /** * @brief Count all items stored under a given pattern. * + * * @param[in] kb KB handle where to count the items. * @param[in] pattern '*' pattern of the elements to count. * + * * @return Count of items. */ static inline size_t @@ -432,10 +456,12 @@ kb_item_count (kb_t kb, const char *pattern) /** * @brief Insert (append) a new entry under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. * @param[in] str Item value. * @param[in] len Value length. Used for blobs. + * * @return 0 on success, non-null on error. */ static inline int @@ -450,12 +476,14 @@ kb_item_add_str (kb_t kb, const char *name, const char *str, size_t len) /** * @brief Insert (append) a new unique entry under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. * @param[in] str Item value. * @param[in] len Value length. Used for blobs. * @param[in] pos Which position the value is appended to. 0 for right, * 1 for left position in the list. + * * @return 0 on success, non-null on error. */ static inline int @@ -471,13 +499,17 @@ kb_item_add_str_unique (kb_t kb, const char *name, const char *str, size_t len, /** * @brief Insert (append) a new unique and volatile entry under a given name. + * + * * @param[in] kb Reference to a kb_t to initialize. * @param[in] name Item name. - * @param[in] val Item value. - * @param[in] expire Item expire. + * @param[in] str String to add. * @param[in] len Value length. Used for blobs. + * @param[in] expire Item expire. * @param[in] pos Which position the value is appended to. 0 for right, 1 for - * left position in the list. + * left position in the list. + * + * * @return 0 on success, -1 on error. */ static inline int @@ -494,10 +526,12 @@ kb_add_str_unique_volatile (kb_t kb, const char *name, const char *str, /** * @brief Set (replace) a new entry under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. * @param[in] str Item value. * @param[in] len Value length. Used for blobs. + * * @return 0 on success, non-null on error. */ static inline int @@ -512,9 +546,11 @@ kb_item_set_str (kb_t kb, const char *name, const char *str, size_t len) /** * @brief Insert (append) a new entry under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. * @param[in] val Item value. + * * @return 0 on success, non-null on error. */ static inline int @@ -529,9 +565,11 @@ kb_item_add_int (kb_t kb, const char *name, int val) /** * @brief Insert (append) a new unique entry under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. * @param[in] val Item value. + * * @return 0 on success, non-null on error. */ static inline int @@ -546,11 +584,13 @@ kb_item_add_int_unique (kb_t kb, const char *name, int val) /** * @brief Insert (append) a new unique and volatile entry under a given name. + * * @param[in] kb Reference to a kb_t to initialize. * @param[in] name Item name. * @param[in] val Item value. * @param[in] expire Item expire. * + * * @return 0 on success, -1 on error. */ static inline int @@ -566,9 +606,11 @@ kb_add_int_unique_volatile (kb_t kb, const char *name, int val, int expire) /** * @brief Set (replace) a new entry under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. * @param[in] val Item value. + * * @return 0 on success, non-null on error. */ static inline int @@ -583,9 +625,11 @@ kb_item_set_int (kb_t kb, const char *name, int val) /** * @brief Insert a new nvt. + * * @param[in] kb KB handle where to store the nvt. * @param[in] nvt nvt to store. * @param[in] filename Path to nvt to store. + * * @return 0 on success, non-null on error. */ static inline int @@ -600,9 +644,11 @@ kb_nvt_add (kb_t kb, const nvti_t *nvt, const char *filename) /** * @brief Get field of a NVT. + * * @param[in] kb KB handle where to store the nvt. * @param[in] oid OID of NVT to get from. * @param[in] position Position of field to get. + * * @return Value of field, NULL otherwise. */ static inline char * @@ -617,8 +663,10 @@ kb_nvt_get (kb_t kb, const char *oid, enum kb_nvt_pos position) /** * @brief Get a full NVT. + * * @param[in] kb KB handle where to store the nvt. * @param[in] oid OID of NVT to get. + * * @return nvti_t of NVT, NULL otherwise. */ static inline nvti_t * @@ -633,7 +681,9 @@ kb_nvt_get_all (kb_t kb, const char *oid) /** * @brief Get list of NVT OIDs. + * * @param[in] kb KB handle where NVTs are stored. + * * @return Linked-list of OIDs, NULL otherwise. */ static inline GSList * @@ -648,8 +698,10 @@ kb_nvt_get_oids (kb_t kb) /** * @brief Delete all entries under a given name. + * * @param[in] kb KB handle where to store the item. * @param[in] name Item name. + * * @return 0 on success, non-null on error. */ static inline int @@ -664,7 +716,9 @@ kb_del_items (kb_t kb, const char *name) /** * @brief Save all the KB's content. + * * @param[in] kb KB handle. + * * @return 0 on success, non-null on error. */ static inline int @@ -683,8 +737,10 @@ kb_save (kb_t kb) /** * @brief Reset connection to the KB. This is called after each fork() to make + * * sure connections aren't shared between concurrent processes. * @param[in] kb KB handle. + * * @return 0 on success, non-null on error. */ static inline int @@ -703,8 +759,10 @@ kb_lnk_reset (kb_t kb) /** * @brief Flush all the KB's content. Delete all namespaces. + * * @param[in] kb KB handle. * @param[in] except Don't flush DB with except key. + * * @return 0 on success, non-null on error. */ static inline int @@ -723,7 +781,9 @@ kb_flush (kb_t kb, const char *except) /** * @brief Return the kb index + * * @param[in] kb KB handle. + * * @return kb_index on success, null on error. */ static inline int diff --git a/util/mqtt.c b/util/mqtt.c index a0ffafc8..789ccbcb 100644 --- a/util/mqtt.c +++ b/util/mqtt.c @@ -52,7 +52,7 @@ static gboolean mqtt_initialized = FALSE; /** * @brief Set the global init status. - * @param Status Status of initialization. + * @param status Status of initialization. */ static void mqtt_set_initialized_status (gboolean status) @@ -552,7 +552,7 @@ mqtt_publish_single_message (const char *server_uri_in, const char *topic, * * @param server_uri_in Server URI * @param username_in Username - * @param password_in Password + * @param passwd_in Password * @param topic Topic to publish to * @param msg Message to publish * @@ -626,9 +626,9 @@ mqtt_publish_single_message_auth (const char *server_uri_in, * To be able to subscribe to a topic the client needs to be connected to a * broker. * - * @param mqtt_t contains the mqtt client - * @param qos quality of service of messages within topic - * @param topic Topic to subscribe to + * @param mqtt contains the mqtt client + * @param qos quality of service of messages within topic + * @param topic Topic to subscribe to * * @return 0 on success, -1 when given mqtt is not useable, -2 when subscription * failed. @@ -679,8 +679,8 @@ mqtt_subscribe (const char *topic) * * This function unsubscribes given client from a given topic. * - * @param mqtt_t contains the mqtt client - * @param topic Topic to unsubscribe from + * @param mqtt contains the mqtt client + * @param topic Topic to unsubscribe from * * @return 0 on success, -1 when given mqtt is not useable, -2 when unsubscribe * failed. diff --git a/util/serverutils.c b/util/serverutils.c index f33a05cf..a20ba7df 100644 --- a/util/serverutils.c +++ b/util/serverutils.c @@ -500,8 +500,6 @@ gvm_server_close (int socket, gnutls_session_t session) * @brief Close a server connection and its socket. * * @param[in] connection Connection. - * - * @return 0 on success, -1 on error. */ void gvm_connection_close (gvm_connection_t *connection) diff --git a/util/xmlutils.c b/util/xmlutils.c index 67c375ac..16ec7109 100644 --- a/util/xmlutils.c +++ b/util/xmlutils.c @@ -886,10 +886,9 @@ try_read_string (gnutls_session_t *session, int timeout, * * @param[in] socket Socket to read from. * @param[in] timeout Server idle time before giving up, in seconds. 0 - * to wait forever. - * @param[out] entity Pointer to an entity tree. + * to wait forever. * @param[out] string_return An optional return location for the text read - * from the session. If NULL then it simply + * from the socket. If NULL then it simply * remains NULL. If a pointer to NULL then it * points to a freshly allocated GString on successful return. Otherwise it * points to an existing GString onto which the text is appended. @@ -1841,8 +1840,6 @@ xml_count_entities (entities_t entities) * @param[in] xml XML string. * @param[in] format Format string. * @param[in] ... Arguments for format string. - * - * @return Result of XSL transformation. */ void xml_string_append (GString *xml, const char *format, ...)