11/**
22 * @file netconf.h
33 * @author Radek Krejci <[email protected] > 4+ * @author Michal Vasko <[email protected] > 45 * @brief libnetconf2's general public functions and structures definitions.
56 *
67 * @copyright
7- * Copyright (c) 2015 - 2021 CESNET, z.s.p.o.
8+ * Copyright (c) 2015 - 2025 CESNET, z.s.p.o.
89 *
910 * This source code is licensed under BSD 3-Clause License (the "License").
1011 * You may not use this file except in compliance with the License.
@@ -51,7 +52,7 @@ extern "C" {
5152/**
5253 * @brief Enumeration of reasons of the NETCONF session termination as defined in RFC 6470.
5354 */
54- typedef enum NC_SESSION_TERM_REASON {
55+ typedef enum {
5556 NC_SESSION_TERM_ERR = -1 , /**< error return code for function getting the session termination reason */
5657 NC_SESSION_TERM_NONE = 0 , /**< session still running */
5758 NC_SESSION_TERM_CLOSED , /**< closed by client in a normal fashion */
@@ -65,7 +66,7 @@ typedef enum NC_SESSION_TERM_REASON {
6566/**
6667 * @brief Enumeration of NETCONF message types.
6768 */
68- typedef enum NC_MSG_TYPE {
69+ typedef enum {
6970 NC_MSG_ERROR , /**< error return value */
7071 NC_MSG_WOULDBLOCK , /**< timeout return value */
7172 NC_MSG_NONE , /**< no message at input or message was processed internally */
@@ -85,7 +86,7 @@ extern const char *nc_msgtype2str[];
8586/**
8687 * @brief Enumeration of the supported types of datastores defined by NETCONF
8788 */
88- typedef enum NC_DATASTORE_TYPE {
89+ typedef enum {
8990 NC_DATASTORE_ERROR = 0 , /**< error state of functions returning the datastore type */
9091 NC_DATASTORE_CONFIG , /**< value describing that the datastore is set as config */
9192 NC_DATASTORE_URL , /**< value describing that the datastore data should be given from the URL */
@@ -97,7 +98,7 @@ typedef enum NC_DATASTORE_TYPE {
9798/**
9899 * @brief Enumeration of NETCONF with-defaults capability modes.
99100 */
100- typedef enum NC_WITHDEFAULTS_MODE {
101+ typedef enum {
101102 NC_WD_UNKNOWN = 0 , /**< invalid mode */
102103 NC_WD_ALL , /**< report-all mode */
103104 NC_WD_ALL_TAG , /**< report-all-tagged mode */
@@ -108,7 +109,7 @@ typedef enum NC_WITHDEFAULTS_MODE {
108109/**
109110 * @brief Enumeration of NETCONF (both server and client) rpc-reply types.
110111 */
111- typedef enum NC_REPLY {
112+ typedef enum {
112113 NC_RPL_OK , /**< OK rpc-reply */
113114 NC_RPL_DATA , /**< DATA rpc-reply */
114115 NC_RPL_ERROR , /**< ERROR rpc-reply */
@@ -118,7 +119,7 @@ typedef enum NC_REPLY {
118119/**
119120 * @brief Enumeration of function parameter treatments.
120121 */
121- typedef enum NC_PARAMTYPE {
122+ typedef enum {
122123 NC_PARAMTYPE_CONST , /**< use the parameter directly, do not free */
123124 NC_PARAMTYPE_FREE , /**< use the parameter directly, free afterwards */
124125 NC_PARAMTYPE_DUP_AND_FREE /**< make a copy of the argument, free afterwards */
0 commit comments