yumapro  20.10-12
YumaPro SDK
ietf-netconf-nmda.h
Go to the documentation of this file.
1 
2 #ifndef _H_ietf_netconf_nmda
3 #define _H_ietf_netconf_nmda
4 /*
5  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
6  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
7  *
8  * Unless required by applicable law or agreed to in writing,
9  * software distributed under the License is distributed on an
10  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
11  * KIND, either express or implied. See the License for the
12  * specific language governing permissions and limitations
13  * under the License.
14  *
15 
16 *** Generated by yangdump-sdk lion-andy-nmda-2019-06-13.19.26-M
17 
18  Combined SIL header
19  module ietf-netconf-nmda
20  revision 2019-01-07
21  namespace urn:ietf:params:xml:ns:yang:ietf-netconf-nmda
22  organization IETF NETCONF Working Group
23  Created: 2019-06-14T02:29:53Z
24  CLI parameters:
25  format h
26  indent 4
27  module ietf-netconf-nmda
28  output ietf-netconf-nmda.h
29  unified true
30 
31  */
32 
33 
40 #include <xmlstring.h>
41 
42 #include "dlq.h"
43 #include "ncxtypes.h"
44 #include "op.h"
45 #include "status.h"
46 #include "val.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 #define y_ietf_netconf_nmda_M_ietf_netconf_nmda (const xmlChar *)"ietf-netconf-nmda"
53 
54 #define y_ietf_netconf_nmda_R_ietf_netconf_nmda (const xmlChar *)"2019-01-07"
55 
56 /* Feature ietf-netconf-nmda:origin
57  * Comment out to disable */
58 #define u_ietf_netconf_nmda_F_origin 1
59 
60 /* Feature ietf-netconf-nmda:with-defaults
61  * Comment out to disable */
62 #define u_ietf_netconf_nmda_F_with_defaults 1
63 
64 
65 #define y_ietf_netconf_nmda_N_config (const xmlChar *)"config"
66 #define y_ietf_netconf_nmda_N_config_filter (const xmlChar *)"config-filter"
67 #define y_ietf_netconf_nmda_N_data (const xmlChar *)"data"
68 #define y_ietf_netconf_nmda_N_datastore (const xmlChar *)"datastore"
69 #define y_ietf_netconf_nmda_N_default_operation (const xmlChar *)"default-operation"
70 #define y_ietf_netconf_nmda_N_edit_content (const xmlChar *)"edit-content"
71 #define y_ietf_netconf_nmda_N_edit_data (const xmlChar *)"edit-data"
72 #define y_ietf_netconf_nmda_N_filter_spec (const xmlChar *)"filter-spec"
73 #define y_ietf_netconf_nmda_N_get_data (const xmlChar *)"get-data"
74 #define y_ietf_netconf_nmda_N_max_depth (const xmlChar *)"max-depth"
75 #define y_ietf_netconf_nmda_N_negated_origin_filter (const xmlChar *)"negated-origin-filter"
76 #define y_ietf_netconf_nmda_N_origin_filter (const xmlChar *)"origin-filter"
77 #define y_ietf_netconf_nmda_N_origin_filters (const xmlChar *)"origin-filters"
78 #define y_ietf_netconf_nmda_N_subtree_filter (const xmlChar *)"subtree-filter"
79 #define y_ietf_netconf_nmda_N_url (const xmlChar *)"url"
80 #define y_ietf_netconf_nmda_N_with_defaults (const xmlChar *)"with-defaults"
81 #define y_ietf_netconf_nmda_N_with_origin (const xmlChar *)"with-origin"
82 #define y_ietf_netconf_nmda_N_xpath_filter (const xmlChar *)"xpath-filter"
83 
84 
85 #if 0
86 /* anydata /get-data/input/filter-spec/subtree-filter/subtree-filter */
87 typedef struct y_ietf_netconf_nmda_T_get_data_input_filter_spec_subtree_filter_subtree_filter_ {
88  dlq_hdr_t qhdr;
89 } y_ietf_netconf_nmda_T_get_data_input_filter_spec_subtree_filter_subtree_filter;
90 
91 /* case /get-data/input/filter-spec/subtree-filter */
92 typedef struct y_ietf_netconf_nmda_T_get_data_input_filter_spec_subtree_filter_ {
93  y_ietf_netconf_nmda_T_get_data_input_filter_spec_subtree_filter_subtree_filter v_subtree_filter;
94 } y_ietf_netconf_nmda_T_get_data_input_filter_spec_subtree_filter;
95 
96 /* case /get-data/input/filter-spec/xpath-filter */
97 typedef struct y_ietf_netconf_nmda_T_get_data_input_filter_spec_xpath_filter_ {
98 
99 #ifdef u_ietf_netconf_F_xpath
100  xmlChar *v_xpath_filter;
101 #endif /* u_ietf_netconf_F_xpath */
102 } y_ietf_netconf_nmda_T_get_data_input_filter_spec_xpath_filter;
103 
104 /* choice /get-data/input/filter-spec */
105 typedef union y_ietf_netconf_nmda_T_get_data_input_filter_spec_ {
106  y_ietf_netconf_nmda_T_get_data_input_filter_spec_subtree_filter v_subtree_filter;
107  y_ietf_netconf_nmda_T_get_data_input_filter_spec_xpath_filter v_xpath_filter;
108 } y_ietf_netconf_nmda_T_get_data_input_filter_spec;
109 
110 /* leaf-list /get-data/input/origin-filters/origin-filter/origin-filter */
111 typedef struct y_ietf_netconf_nmda_T_get_data_input_origin_filters_origin_filter_origin_filter_ {
112  dlq_hdr_t qhdr;
113  val_idref_t *v_origin_filter;
114 } y_ietf_netconf_nmda_T_get_data_input_origin_filters_origin_filter_origin_filter;
115 
116 /* case /get-data/input/origin-filters/origin-filter */
117 typedef struct y_ietf_netconf_nmda_T_get_data_input_origin_filters_origin_filter_ {
118  dlq_hdr_t v_origin_filter;
119 } y_ietf_netconf_nmda_T_get_data_input_origin_filters_origin_filter;
120 
121 /* leaf-list /get-data/input/origin-filters/negated-origin-filter/negated-origin-filter */
122 typedef struct y_ietf_netconf_nmda_T_get_data_input_origin_filters_negated_origin_filter_negated_origin_filter_ {
123  dlq_hdr_t qhdr;
124  val_idref_t *v_negated_origin_filter;
125 } y_ietf_netconf_nmda_T_get_data_input_origin_filters_negated_origin_filter_negated_origin_filter;
126 
127 /* case /get-data/input/origin-filters/negated-origin-filter */
128 typedef struct y_ietf_netconf_nmda_T_get_data_input_origin_filters_negated_origin_filter_ {
129  dlq_hdr_t v_negated_origin_filter;
130 } y_ietf_netconf_nmda_T_get_data_input_origin_filters_negated_origin_filter;
131 
132 
133 #ifdef u_ietf_netconf_nmda_F_origin
134 /* choice /get-data/input/origin-filters */
135 typedef union y_ietf_netconf_nmda_T_get_data_input_origin_filters_ {
136  y_ietf_netconf_nmda_T_get_data_input_origin_filters_origin_filter v_origin_filter;
137  y_ietf_netconf_nmda_T_get_data_input_origin_filters_negated_origin_filter v_negated_origin_filter;
138 } y_ietf_netconf_nmda_T_get_data_input_origin_filters;
139 #endif /* u_ietf_netconf_nmda_F_origin */
140 
141 /* container /get-data/input */
142 typedef struct y_ietf_netconf_nmda_T_get_data_input_ {
143  val_idref_t *v_datastore;
144  y_ietf_netconf_nmda_T_get_data_input_filter_spec v_filter_spec;
145  boolean v_config_filter;
146 
147 #ifdef u_ietf_netconf_nmda_F_origin
148  y_ietf_netconf_nmda_T_get_data_input_origin_filters v_origin_filters;
149 #endif /* u_ietf_netconf_nmda_F_origin */
150  val_value_t *v_max_depth;
151 
152 #ifdef u_ietf_netconf_nmda_F_origin
153  boolean v_with_origin;
154 #endif /* u_ietf_netconf_nmda_F_origin */
155  xmlChar *v_with_defaults;
156 } y_ietf_netconf_nmda_T_get_data_input;
157 
158 /* anydata /get-data/output/data */
159 typedef struct y_ietf_netconf_nmda_T_get_data_output_data_ {
160  dlq_hdr_t qhdr;
161 } y_ietf_netconf_nmda_T_get_data_output_data;
162 
163 /* container /get-data/output */
164 typedef struct y_ietf_netconf_nmda_T_get_data_output_ {
165  y_ietf_netconf_nmda_T_get_data_output_data v_data;
166 } y_ietf_netconf_nmda_T_get_data_output;
167 
168 /* rpc /get-data */
169 typedef struct y_ietf_netconf_nmda_T_get_data_ {
170  y_ietf_netconf_nmda_T_get_data_input v_input;
171  y_ietf_netconf_nmda_T_get_data_output v_output;
172 } y_ietf_netconf_nmda_T_get_data;
173 
174 /* anydata /edit-data/input/edit-content/config/config */
175 typedef struct y_ietf_netconf_nmda_T_edit_data_input_edit_content_config_config_ {
176  dlq_hdr_t qhdr;
177 } y_ietf_netconf_nmda_T_edit_data_input_edit_content_config_config;
178 
179 /* case /edit-data/input/edit-content/config */
180 typedef struct y_ietf_netconf_nmda_T_edit_data_input_edit_content_config_ {
181  y_ietf_netconf_nmda_T_edit_data_input_edit_content_config_config v_config;
182 } y_ietf_netconf_nmda_T_edit_data_input_edit_content_config;
183 
184 /* case /edit-data/input/edit-content/url */
185 typedef struct y_ietf_netconf_nmda_T_edit_data_input_edit_content_url_ {
186 
187 #ifdef u_ietf_netconf_F_url
188  xmlChar *v_url;
189 #endif /* u_ietf_netconf_F_url */
190 } y_ietf_netconf_nmda_T_edit_data_input_edit_content_url;
191 
192 /* choice /edit-data/input/edit-content */
193 typedef union y_ietf_netconf_nmda_T_edit_data_input_edit_content_ {
194  y_ietf_netconf_nmda_T_edit_data_input_edit_content_config v_config;
195  y_ietf_netconf_nmda_T_edit_data_input_edit_content_url v_url;
196 } y_ietf_netconf_nmda_T_edit_data_input_edit_content;
197 
198 /* container /edit-data/input */
199 typedef struct y_ietf_netconf_nmda_T_edit_data_input_ {
200  val_idref_t *v_datastore;
201  xmlChar *v_default_operation;
202  y_ietf_netconf_nmda_T_edit_data_input_edit_content v_edit_content;
203 } y_ietf_netconf_nmda_T_edit_data_input;
204 
205 /* container /edit-data/output */
206 typedef struct y_ietf_netconf_nmda_T_edit_data_output_ {
207 } y_ietf_netconf_nmda_T_edit_data_output;
208 
209 /* rpc /edit-data */
210 typedef struct y_ietf_netconf_nmda_T_edit_data_ {
211  y_ietf_netconf_nmda_T_edit_data_input v_input;
212  y_ietf_netconf_nmda_T_edit_data_output v_output;
213 } y_ietf_netconf_nmda_T_edit_data;
214 
215 #endif // 0
216 
217 
218 /* group defined in agt_nmda.h */
219 
235 extern status_t y_ietf_netconf_nmda_init (
236  const xmlChar *modname,
237  const xmlChar *revision);
238 
239 
248 extern status_t y_ietf_netconf_nmda_init2 (void);
249 
250 
256 extern void y_ietf_netconf_nmda_cleanup (void);
257 
258 
262 #ifdef __cplusplus
263 } /* end extern 'C' */
264 #endif
265 
266 #endif
cfg_rwlock_acquire_single_rdlock
status_t cfg_rwlock_acquire_single_rdlock(thd_tcb_t *tcb, cfg_template_t *cfg)
Acquire a single RWLOCK for read access.
Definition: cfg.c:957
cfg.h
ncx_feature.h
NCX Module Library YANG Feature Utility Functions.
agt_util.h
Utility Functions for NCX Server method routines.
agt_rpc_register_method
status_t agt_rpc_register_method(const xmlChar *module, const xmlChar *method_name, agt_rpc_phase_t phase, agt_rpc_method_t method)
add callback for 1 phase of RPC processing
Definition: agt_rpc.c:2557
val_get_choice_next_set
val_value_t * val_get_choice_next_set(const obj_template_t *obj, val_value_t *curchild)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3218
val_find_child
val_value_t * val_find_child(const val_value_t *parent, const xmlChar *modname, const xmlChar *childname)
Find the first instance of the specified child node.
Definition: val.c:8560
ERR_NCX_DEF_NOT_FOUND
@ ERR_NCX_DEF_NOT_FOUND
250
Definition: status_enum.h:289
val.h
Value Node Basic Support.
agt_rpc.h
NETCONF protocol remote procedure call server-side definitions.
AGT_RPC_PH_VALIDATE
@ AGT_RPC_PH_VALIDATE
(2) cb after the input is parsed
Definition: agt_rpc.h:115
NCX_LAYER_OPERATION
@ NCX_LAYER_OPERATION
protocol operation layer
Definition: ncxtypes.h:346
agt_validate_filter_nmda
status_t agt_validate_filter_nmda(rpc_msg_t *msg, val_value_t *filter, boolean is_subtree)
Validate the <filter> parameter; FOR NMDA ONLY.
Definition: agt_util.c:2511
agt_action.h
NETCONF Server YANG action handler.
ERR_NCX_WRONG_VERSION
@ ERR_NCX_WRONG_VERSION
314
Definition: status_enum.h:357
ncx_nmda_get_cfg_id
ncx_cfg_t ncx_nmda_get_cfg_id(ncx_nmda_ds_t ds_enum)
Get the cfg datastore ID for the NMDA datastore ID.
Definition: ncx_nmda.c:342
op.h
NETCONF protocol operations.
ncxmod.h
NCX Module Load Manager.
agt_cb.h
NETCONF Server Data Model callback handler.
OP_EDITOP_MERGE
@ OP_EDITOP_MERGE
edit op is merge
Definition: op.h:124
VAL_ENUM_NAME
#define VAL_ENUM_NAME(V)
Access the enum name in the value ONLY if BCX_NT_ENUM This is the macro used to check values in SIL c...
Definition: val.h:434
agt_output_filter
status_t agt_output_filter(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output the proper data for the get or get-config operation generate the data that matched the subtree...
Definition: agt_util.c:2890
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
agt_rpc_unregister_method
void agt_rpc_unregister_method(const xmlChar *module, const xmlChar *method_name)
remove the callback functions for all phases of RPC or Action processing for the specified RPC method...
Definition: agt_rpc.c:2759
ERR_NCX_MISSING_PARM
@ ERR_NCX_MISSING_PARM
233
Definition: status_enum.h:272
agt_val.h
NETCONF Server database callback handler.
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xml_val.h
Utility functions for creating value structs.
ncx_nmda_get_originref_parm
ncx_nmda_origin_t ncx_nmda_get_originref_parm(val_value_t *parmval)
Handle the or:origin-ref data type parameter Extract the internal enum for the origin.
Definition: ncx_nmda.c:376
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
ncx_find_object
obj_template_t * ncx_find_object(ncx_module_t *mod, const xmlChar *objname)
Find a top level module object.
Definition: ncx.c:4345
OP_ERROP_STOP
@ OP_ERROP_STOP
stop-on-error
Definition: op.h:175
ncx_nmda_ds_conventional
boolean ncx_nmda_ds_conventional(ncx_nmda_ds_t ds_enum)
Return TRUE if the datastore is a conventional datastore which has config=true objects only.
Definition: ncx_nmda.c:525
val_util.h
Value Node Utilities.
y_ietf_netconf_nmda_init2
status_t y_ietf_netconf_nmda_init2(void)
Phase 2 initialization.
Definition: ietf-netconf-nmda.c:715
agt_get_savedevQ
dlq_hdr_t * agt_get_savedevQ(void)
Get the agt_savedevQ pointer.
Definition: agt.c:4747
agt_set_with_defaults
status_t agt_set_with_defaults(rpc_msg_t *msg, const xmlChar *modname, val_value_t **errval)
Check if the <with-defaults> parameter is set in the request message, and if so, it is one of the ser...
Definition: agt_util.c:4540
ncx_nmda_get_dsref_parm
ncx_nmda_ds_t ncx_nmda_get_dsref_parm(val_value_t *parmval)
Handle the ds:datastore-ref data type parameter Extract the internal enum for the datastore.
Definition: ncx_nmda.c:298
NCX_NMDA_ORIGIN_NONE
@ NCX_NMDA_ORIGIN_NONE
not set
Definition: ncxtypes.h:1349
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
agt_sil_lib.h
Server Instrumentation Library Support.
rpc.h
NETCONF protocol remote procedure call common definitions.
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
val_child.h
Value Node Child Access Support.
log_debug
void void void void void void void log_debug(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG log entry.
NCX_CFGID_RUNNING
@ NCX_CFGID_RUNNING
running datastore (no value for not set!)
Definition: ncxtypes.h:384
agt.h
Multi-Protocol Network Management Server.
VAL_IDREF
#define VAL_IDREF(V)
Access the value as an identityref ONLY if NCX_BT_IDREF.
Definition: val.h:470
ncx_nmda_new_params
ncx_nmda_params_t * ncx_nmda_new_params(void)
Malloc a new ncx_nmda_params_t.
Definition: ncx_nmda.c:153
y_ietf_netconf_nmda_cleanup
void y_ietf_netconf_nmda_cleanup(void)
cleanup the server instrumentation library
Definition: ietf-netconf-nmda.c:730
agt_set_depth_nmda
void agt_set_depth_nmda(rpc_msg_t *msg)
Check if the <depth> parameter is set NMDA max-depth parameter in the request message If so,...
Definition: agt_util.c:4711
ncx_nmda.h
NMDA Data Support.
XML_MSG_NMDA_PARAMS
#define XML_MSG_NMDA_PARAMS(M)
NMDA params.
Definition: xml_msg.h:316
ncx_set_feature_enable
status_t ncx_set_feature_enable(const xmlChar *modname, const xmlChar *name, boolean flag)
Create or set a feature_entry struct for the specified feature enabled parameter.
Definition: ncx_feature.c:1437
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
VAL_BOOL
#define VAL_BOOL(V)
Access the value as a boolean ONLY IF btyp == NCX_BT_BOOLEAN.
Definition: val.h:405
ncxmod_load_module
status_t ncxmod_load_module(const xmlChar *modname, const xmlChar *revision, dlq_hdr_t *savedevQ, ncx_module_t **retmod)
Determine the location of the specified module and then load it into the system, if not already loade...
Definition: ncxmod.c:4342
AGT_RPC_PH_INVOKE
@ AGT_RPC_PH_INVOKE
(3) cb to invoke the requested method
Definition: agt_rpc.h:118
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
ERR_NCX_UNKNOWN_MODULE
@ ERR_NCX_UNKNOWN_MODULE
356
Definition: status_enum.h:399
cfg_ok_to_read
status_t cfg_ok_to_read(const cfg_template_t *cfg)
Check if the specified config can be read right now.
Definition: cfg.c:2226
LOGDEBUG
#define LOGDEBUG
Check if at least log-level=debug.
Definition: log.h:287
NCX_NT_VAL
@ NCX_NT_VAL
val_value_t
Definition: ncxtypes.h:276
NCX_NT_NONE
@ NCX_NT_NONE
not set
Definition: ncxtypes.h:273
xml_msg_set_cfgid
void xml_msg_set_cfgid(xml_msg_hdr_t *msg, ncx_cfg_t cfgid)
Set the config ID in the message.
Definition: xml_msg.c:1248
NCX_NMDA_DS_NONE
@ NCX_NMDA_DS_NONE
not set
Definition: ncxtypes.h:1338
y_ietf_netconf_nmda_init
status_t y_ietf_netconf_nmda_init(const xmlChar *modname, const xmlChar *revision)
Phase 1 module init.
Definition: ietf-netconf-nmda.c:603
ietf-netconf-nmda.h
NMDA protocol operation SIL APIs.
agt_get_profile
agt_profile_t * agt_get_profile(void)
Get the server profile struct.
Definition: agt.c:4118
RPC_DATA_STD
@ RPC_DATA_STD
STD is used by <get> and <get-config> to force a <data> container in the NETCONF namespace.
Definition: rpc.h:162
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
ncx.h
YANG module utility functions.
cfg_get_config_id
cfg_template_t * cfg_get_config_id(ncx_cfg_t cfgid)
Get the config struct from its ID.
Definition: cfg.c:1530
ncx_feature_enabled_str
boolean ncx_feature_enabled_str(const xmlChar *modname, const xmlChar *revision, const xmlChar *name)
Find a ncx_feature_t struct and check if it is enabled.
Definition: ncx_feature.c:1255
ncx_nmda_new_origin_filter
ncx_origin_filter_t * ncx_nmda_new_origin_filter(ncx_nmda_origin_t origin)
Malloc a new ncx_origin_filter_t.
Definition: ncx_nmda.c:89
dlq_enque
void dlq_enque(REG void *newP, REG dlq_hdrT *listP)
add a queue node to the end of a queue list Add newP to listP
Definition: dlq.c:246
agt_output_empty
status_t agt_output_empty(ses_cb_t *scb, rpc_msg_t *msg, int32 indent)
output no data for the get or get-config operation because the if-modified-since fileter did not pass
Definition: agt_util.c:3055
agt_get_rpc_input
val_value_t * agt_get_rpc_input(rpc_msg_t *msg)
Get the rpc input value node.
Definition: agt_util.c:6487
val_child_next_same
val_value_t * val_child_next_same(val_value_t *curnode)
Get the next node of the same type.
Definition: val_child.c:2359
agt_timer.h
Handle timer services for the server.
val_get_choice_first_set
val_value_t * val_get_choice_first_set(val_value_t *val, const obj_template_t *obj)
Check a val_value_t struct against its expected OBJ to determine if a specific choice has already bee...
Definition: val_util.c:3068
status.h
Global error messages for status code enumerations.
dlq.h
dlq provides general double-linked list and queue support:
OP_TESTOP_NONE
@ OP_TESTOP_NONE
not set
Definition: op.h:161
obj_find_child_choice_case
obj_template_t * obj_find_child_choice_case(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6201