yumapro  20.10-12
YumaPro SDK
xpath1_get2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3  * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4  *
5  * Unless required by applicable law or agreed to in writing,
6  * software distributed under the License is distributed on an
7  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8  * KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations
10  * under the License.
11  */
12 #ifndef _H_xpath1_get2
13 #define _H_xpath1_get2
14 
15 /* FILE: xpath1_get2.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 21-dec-16 abb Begun; split from xpath1.c
36 
37 */
38 
39 #ifndef _H_dlq
40 #include "dlq.h"
41 #endif
42 
43 #ifndef _H_ncxtypes
44 #include "ncxtypes.h"
45 #endif
46 
47 #ifndef _H_obj
48 #include "obj.h"
49 #endif
50 
51 #ifndef _H_status
52 #include "status.h"
53 #endif
54 
55 #ifndef _H_tk
56 #include "tk.h"
57 #endif
58 
59 #ifndef _H_val
60 #include "val.h"
61 #endif
62 
63 #ifndef _H_xmlns
64 #include "xmlns.h"
65 #endif
66 
67 #ifndef _H_xpath
68 #include "xpath.h"
69 #endif
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 /********************************************************************
76 * *
77 * C O N S T A N T S *
78 * *
79 *********************************************************************/
80 
81 
82 /********************************************************************
83 * *
84 * T Y P E S *
85 * *
86 *********************************************************************/
87 
100 typedef struct xpath1_walker_cookie_t_ {
102  xpath_pcb_t *pcb;
103 
105  xpath_get2_cb_t *cb;
106 
108  const xmlChar *modname;
109 
111  const xmlChar *objname;
112 
114  obj_template_t *child_obj;
115 
117  xpath_resnode_t *resnode;
118 
120  xpath_resnode_t *nextnode;
121 
123  dlq_hdr_t *resnodeQ;
124 
126  status_t res;
127 
129  boolean aio_walk_done;
130 } xpath1_walker_cookie_t;
131 
132 
133 /********************************************************************
134 * *
135 * F U N C T I O N S *
136 * *
137 *********************************************************************/
138 
139 
140 
176 extern status_t
177  xpath1_get2_set_nodeset_child (xpath_pcb_t *pcb,
178  xpath_result_t *result,
179  xmlns_id_t childnsid,
180  const xmlChar *childname,
181  boolean textmode,
182  ncx_xpath_axis_t axis);
183 
184 
190 extern status_t
191  xpath1_get2_set_resnode_parent (xpath_resnode_t *resnode);
192 
193 
203 extern void
204  xpath1_get2_get_resnode_parent (xpath_get2_node_t *get2node,
205  val_value_t **parentval,
206  xpath_get2_cb_t **parent_cb);
207 
208 
218 extern status_t
219  xpath1_get2_expand_result (xpath_pcb_t *pcb,
220  xpath_result_t *result,
221  boolean leaflist_only);
222 
223 
234 extern xpath_get2_cb_t *
235  xpath1_get2_new_cb (obj_template_t *obj,
236  val_value_t *parent_val,
237  xpath_get2_cb_t *parent_cb);
238 
239 
245 extern void
246  xpath1_get2_free_cb (xpath_get2_cb_t *cb);
247 
248 
259 extern xpath_get2_node_t *
260  xpath1_get2_new_node (xpath_get2_cb_t *cb,
261  val_value_t *val,
262  xpath_get2_form_t get2_form);
263 
264 
270 extern void
271  xpath1_get2_free_node (xpath_get2_node_t *node);
272 
273 
284 extern status_t
285  xpath1_get2_create_fake_nodes (getcb_get2_t *parent_get2cb,
286  dlq_hdr_t *resnodeQ,
287  xpath_get2_cb_t **retcb);
288 
289 
298 extern void
299  xpath1_get2_free_fake_nodes (dlq_hdr_t *resnodeQ);
300 
301 
311 extern status_t
312  xpath1_get2_simulate_callback (xpath_pcb_t *pcb,
313  xpath_get2_cb_t *cb,
314  xpath1_walker_cookie_t *cookie);
315 
316 
324 extern val_value_t *
325  xpath1_get2_find_return_key (xpath_get2_cb_t *cb,
326  obj_template_t *keyobj);
327 
328 
332 #ifdef __cplusplus
333 } /* end extern 'C' */
334 #endif
335 
336 
337 #endif /* _H_xpath1_get2 */
xpath1_get2.h
XPath 1.0 expression support for server GET2 callback functions.
XP_FORM_GETCB
@ XP_FORM_GETCB
normal GET2 CB
Definition: xpath.h:448
ERR_NCX_SKIPPED
@ ERR_NCX_SKIPPED
2001
Definition: status_enum.h:551
ncx_feature.h
NCX Module Library YANG Feature Utility Functions.
dlq_block_enque
void dlq_block_enque(dlq_hdrT *srcP, dlq_hdrT *dstP)
add all the queue entries in the srcP queue list to the end of the dstP queue list
Definition: dlq.c:731
xpath_first_resnode_valptr
val_value_t * xpath_first_resnode_valptr(xpath_resnode_t *resnode)
Get the first result in the renodeQ from a result struct.
Definition: xpath.c:3982
xml_msg_get_lookupQ
dlq_hdr_t * xml_msg_get_lookupQ(xml_msg_hdr_t *msg)
Get the GET2 lookup Queue.
Definition: xml_msg.c:1606
ncx_prev_backptr
ncx_backptr_t * ncx_prev_backptr(ncx_backptr_t *curptr)
Get previous back pointer struct.
Definition: ncx.c:11561
xpath1_res_new_valhdr_resnode
xpath_resnode_t * xpath1_res_new_valhdr_resnode(xpath_pcb_t *pcb, boolean dblslash, val_child_hdr_t *valhdr)
Get a new result node from the cache or malloc if none available.
Definition: xpath1_res.c:380
xpath_next_resnode_valptr
val_value_t * xpath_next_resnode_valptr(xpath_resnode_t *resnode, val_value_t *valptr)
Get the next node val pointer from a result node struct.
Definition: xpath.c:4017
xpath1_aio.h
Xpath 1.0 search support; XPath function library. Interface to the AIO GET2 object callback API.
xpath1_get2_free_cb
void xpath1_get2_free_cb(xpath_get2_cb_t *cb)
Free a malloced XPath parser control block.
Definition: xpath1_get2.c:2228
getcb_need_get2_ex
boolean getcb_need_get2_ex(obj_template_t *curobj, obj_template_t *reqobj, uint32 *choicecnt, obj_template_t **top_choice)
check if the node has a get2 callback or in a choice/case subtree that has get2 callback
Definition: getcb.c:8266
xpath1_aio_get_next_aio_ptr
val_value_t * xpath1_aio_get_next_aio_ptr(val_value_t *entry)
Get the next AIO val value in the valQ Queue.
Definition: xpath1_aio.c:572
getcb_need_get2
boolean getcb_need_get2(obj_template_t *curobj, obj_template_t *reqobj)
check if the node has a get2 callback or in a choice/case subtree that has get2 callback
Definition: getcb.c:8233
obj_is_terminal
boolean obj_is_terminal(const obj_template_t *obj)
Check if object is a proper leaf or leaflist or anyxml.
Definition: obj.c:13493
obj_is_in_aio_get2
boolean obj_is_in_aio_get2(obj_template_t *obj)
Check if this object is a child of a node with sil-aio-get2 extension setup or if this object itself ...
Definition: obj.c:18305
VAL_NSID
#define VAL_NSID(V)
Access the namespace ID.
Definition: val.h:396
obj_has_aio_list
boolean obj_has_aio_list(obj_template_t *obj)
Check is AIO object is a list or if its parent is a list object.
Definition: obj.c:18458
log_error
void log_error(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_ERROR log entry.
obj_is_rpc
boolean obj_is_rpc(const obj_template_t *obj)
Check if the object is an RPC method.
Definition: obj.c:13983
obj_is_leaf_list
boolean obj_is_leaf_list(const obj_template_t *obj)
Check if object is a proper leaf-list.
Definition: obj.c:13336
xpath1_res_new_get2_resnode
xpath_resnode_t * xpath1_res_new_get2_resnode(xpath_pcb_t *pcb, boolean dblslash, val_value_t *nodeptr_val, xpath_get2_cb_t *nodeptr_cb, xpath_get2_form_t get2_form)
Get a new result node from the cache or malloc if none available.
Definition: xpath1_res.c:434
val.h
Value Node Basic Support.
XP_FL_CONFIGONLY
#define XP_FL_CONFIGONLY
used for YANG/NETCONF to auto-filter any non-config nodes that are matched by an XPath wildcard mecha...
Definition: xpath.h:221
getcb.h
GET1 and GET2 Callback Support.
getcb_pre_get2_choices
status_t getcb_pre_get2_choices(xml_msg_hdr_t *msg, ses_cb_t *scb, getcb_get2_t *parent_get2cb, obj_template_t *targobj, val_value_t *curval, uint32 choice_cnt, obj_template_t *top_choice, boolean *force_remove, getcb_get2_t **ret_get2cb)
Invoke the get2 callbacks for each of the implied choice-stmt nodes in a subtree or REST resource req...
Definition: getcb.c:8611
ncx_clean_backptrQ
void ncx_clean_backptrQ(dlq_hdr_t *backptrQ)
Clean an entire Q of ncx_backptr_t structs.
Definition: ncx.c:11470
val_child_find_nsid
val_value_t * val_child_find_nsid(const val_value_t *parent, xmlns_id_t child_nsid, const xmlChar *child_name)
Find the child node for the specified child name and namespace ID.
Definition: val_child.c:1775
tk.h
NCX Syntax Token Handler.
xpath1_get2_find_return_key
val_value_t * xpath1_get2_find_return_key(xpath_get2_cb_t *cb, obj_template_t *keyobj)
Find a return key.
Definition: xpath1_get2.c:2574
log_debug3
void void void void void void void void void void void log_debug3(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG3 log entry.
xpath1_aio_check_ascend_lists
boolean xpath1_aio_check_ascend_lists(val_value_t *useval, xpath_get2_cb_t *cb)
Check if all the ascendent AIO lists are correct lists for the current val value and XPath GET2 contr...
Definition: xpath1_aio.c:749
obj_next_child_deep
obj_template_t * obj_next_child_deep(obj_template_t *obj)
Get the next child object if the specified object has any children.
Definition: obj.c:7138
ncx_num.h
NCX Module Library Number Utility Functions.
ncx_next_data_node
obj_template_t * ncx_next_data_node(obj_template_t *curnode)
Check if an obj_template_t in in any module that matches a data node either config or all.
Definition: ncx.c:13726
XP_RST_NONE
@ XP_RST_NONE
not set
Definition: xpath.h:434
ncx_next_backptr
ncx_backptr_t * ncx_next_backptr(ncx_backptr_t *curptr)
Get next back pointer struct.
Definition: ncx.c:11545
getcb_get2_child_obj_ex
status_t getcb_get2_child_obj_ex(ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *parentval, getcb_get2_t *parent_get2cb, obj_template_t *obj, boolean with_defaults, getcb_get2_walker_fn_t walkerfn, void *cookie, getcb_get2_t *force_get2cb, getcb_api_mode_t api_mode)
Process the instances of an object for the object itself and 0 or more nest levels of descendant node...
Definition: getcb.c:7602
obj_is_key
boolean obj_is_key(const obj_template_t *obj)
Check if object is being used as a key leaf within a list.
Definition: obj.c:14278
XP_RNT_GET2
@ XP_RNT_GET2
get2ptr
Definition: xpath.h:426
ERR_NCX_NO_INSTANCE
@ ERR_NCX_NO_INSTANCE
1009
Definition: status_enum.h:498
XP_FL_GET_WHEN
#define XP_FL_GET_WHEN
the parser is processing a when-stmt for a GET node so retrieve the value now instead of leaving the ...
Definition: xpath.h:277
VAL_NAME
#define VAL_NAME(V)
Access the value name.
Definition: val.h:399
XP_RST_GET2_SKIPPED
@ XP_RST_GET2_SKIPPED
GET2 callback skipped.
Definition: xpath.h:436
ncxconst.h
Contains NCX constants.
ncx_use_objptrs
boolean ncx_use_objptrs(void)
Get the use_objptrs flag.
Definition: ncx.c:12647
dlq_reverse_que
void dlq_reverse_que(dlq_hdr_t *que)
Reverse the order of all the entries in a Q.
Definition: dlq.c:1070
xpath1_get2_simulate_callback
status_t xpath1_get2_simulate_callback(xpath_pcb_t *pcb, xpath_get2_cb_t *cb, xpath1_walker_cookie_t *cookie)
Setup GET2 control block based on val value from the AIO control block, use valQ to contruct termQ an...
Definition: xpath1_get2.c:2444
ncx_first_objptr
ncx_backptr_t * ncx_first_objptr(void)
Get the first object pointer.
Definition: ncx.c:12662
xpath1_aio_setup_get2cb
status_t xpath1_aio_setup_get2cb(getcb_get2_t *get2cb, val_value_t *useval)
Setup GET2 control block based on val value from the AIO control block, use the value val to contruct...
Definition: xpath1_aio.c:670
obj_is_list
boolean obj_is_list(const obj_template_t *obj)
Check if object is a YANG list.
Definition: obj.c:13349
obj_is_action
boolean obj_is_action(const obj_template_t *obj)
Check if the object is a YANG 1.1 action.
Definition: obj.c:14028
dlq_insertAhead
void dlq_insertAhead(void *newP, void *nodeP)
insert the new queue entry before the current entry
Definition: dlq.c:447
log_info
void void void void void log_info(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_INFO log entry.
xmlns_id_t
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
log_debug2
void void void void void void void void void log_debug2(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG2 log entry.
xpath1.h
XPath 1.0 expression support.
obj_is_leafy
boolean obj_is_leafy(const obj_template_t *obj)
Check if object is a proper leaf or leaflist.
Definition: obj.c:13478
def_reg.h
Definition Registry module.
xpath_aio_cb_t_::obj
obj_template_t * obj
object for this subtree
Definition: xpath.h:1035
NO_ERR
@ NO_ERR
000
Definition: status_enum.h:188
xpath.h
Schema and data model Xpath search support.
getcb_get2_allowed
boolean getcb_get2_allowed(xml_msg_hdr_t *msg, obj_template_t *chobj)
Check if the current node and operation are allowed to use the GET2 callback if there is one; Used to...
Definition: getcb.c:8931
val_dump_value
void val_dump_value(val_value_t *val, int32 startindent, log_debug_t lvl)
Printf the specified val_value_t struct to the logfile, or stdout if none set Uses conf file format (...
Definition: val.c:5688
val_get_nsid
xmlns_id_t val_get_nsid(const val_value_t *val)
Get the namespace ID for the specified value node.
Definition: val.c:12277
log_debug4
void void void void void void void void void void void void void log_debug4(const char *fstr,...) __attribute__((format(printf
Generate a new LOG_DEBUG_DEBUG4 log entry.
obj_get_name
const xmlChar * obj_get_name(const obj_template_t *obj)
Get the name field for this obj.
Definition: obj.c:10511
ERR_NCX_OPERATION_FAILED
@ ERR_NCX_OPERATION_FAILED
274
Definition: status_enum.h:315
xpath_aio_cb_t_::parent_cb
struct xpath_aio_cb_t_ * parent_cb
parent AIO control block
Definition: xpath.h:1032
ncx_first_data_node
obj_template_t * ncx_first_data_node(boolean cfgonly)
Check if an obj_template_t in in any module that matches a data node either config or all.
Definition: ncx.c:13668
LOGDEBUG2
#define LOGDEBUG2
Check if at least log-level=debug2.
Definition: log.h:292
dlq_createSQue
void dlq_createSQue(dlq_hdrT *queAddr)
create a static queue header
Definition: dlq.c:177
ERR_INTERNAL_VAL
@ ERR_INTERNAL_VAL
004
Definition: status_enum.h:194
getcb_clone_keyQ
status_t getcb_clone_keyQ(dlq_hdr_t *srcQ, dlq_hdr_t *destQ)
Copy all the key val_value_t structs to the other queue.
Definition: getcb.c:8779
dlq_remove
void dlq_remove(void *nodeP)
remove the queue entry from its queue list entry MUST have been enqueued somehow before this function...
Definition: dlq.c:519
getcb_clean_get2_lookupQ
void getcb_clean_get2_lookupQ(dlq_hdr_t *lookupQ)
Clean a queue of getcb_get2_lookup_t.
Definition: getcb.c:7934
xpath1_aio_setup_aiocb
status_t xpath1_aio_setup_aiocb(xpath_pcb_t *pcb, getcb_get2_t *get2cb, obj_template_t *obj)
Setup AIO control block entries.
Definition: xpath1_aio.c:601
ERR_NCX_INVALID_VALUE
@ ERR_NCX_INVALID_VALUE
258
Definition: status_enum.h:299
xpath1_get2_new_node
xpath_get2_node_t * xpath1_get2_new_node(xpath_get2_cb_t *cb, val_value_t *val, xpath_get2_form_t get2_form)
Create a malloced XPath GET2 node.
Definition: xpath1_get2.c:2252
XPATH_ANY_CXT
#define XPATH_ANY_CXT(P)
test if context node is a value or get2 in xpath_pcb_t * (P)
Definition: xpath.h:313
log_debug_append
void void void void void void void void log_debug_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG log entry.
xpath1_res_free_resnode
void xpath1_res_free_resnode(xpath_pcb_t *pcb, xpath_resnode_t *resnode)
Free a result node struct: put in cache or free if cache maxed out.
Definition: xpath1_res.c:495
obj_next_child_deep_ex
obj_template_t * obj_next_child_deep_ex(obj_template_t *obj, boolean stopnext)
Get the next child object if the specified object has any children.
Definition: obj.c:7164
ERR_INTERNAL_MEM
@ ERR_INTERNAL_MEM
003
Definition: status_enum.h:193
XPATH_MHDR
#define XPATH_MHDR(P)
access the message header back pointer
Definition: xpath.h:322
IS_SKIP_MODE
#define IS_SKIP_MODE(pcb)
Check if skip mode is active.
Definition: xpath1.h:102
val_clone
val_value_t * val_clone(const val_value_t *val)
Clone a specified val_value_t struct and sub-trees.
Definition: val.c:7836
NCX_XPATH_TYPE_NACM
@ NCX_XPATH_TYPE_NACM
NACM data rule.
Definition: ncxtypes.h:1023
val_child.h
Value Node Child Access Support.
get_error_string
const char * get_error_string(status_t res)
Get the error message for a specific internal error.
Definition: status.c:239
getcb_free_get2cb
void getcb_free_get2cb(getcb_get2_t *get2cb)
Clean and free a malloced GET2 control block.
Definition: getcb.c:5694
xpath1_get2_expand_result
status_t xpath1_get2_expand_result(xpath_pcb_t *pcb, xpath_result_t *result, boolean leaflist_only)
Check the result for GET2 nodes that need to be retrieved.
Definition: xpath1_get2.c:2105
typ.h
Parameter Type Handler.
dlq_count
unsigned int dlq_count(const dlq_hdrT *listP)
get the number of queue entries in the listP queue list
Definition: dlq.c:994
getcb_match_keys_lookup
boolean getcb_match_keys_lookup(obj_template_t *useobj, val_value_t *useval, getcb_get2_lookup_t *lookup)
Match the requested list entry.
Definition: getcb.c:9012
yangconst.h
Contains YANG constants separated to prevent H file include loops.
obj_is_anydata
boolean obj_is_anydata(const obj_template_t *obj)
Check if object is an anydata.
Definition: obj.c:13284
dlq_nextEntry
#define dlq_nextEntry(nodeP)
get the next queue entry after the current entry
Definition: dlq.h:265
XP_RST_GET2_ERROR
@ XP_RST_GET2_ERROR
GET2 callback error happened.
Definition: xpath.h:439
ncx_last_backptr
ncx_backptr_t * ncx_last_backptr(dlq_hdr_t *que)
Get last back pointer struct.
Definition: ncx.c:11529
XP_RST_GET2_DONE
@ XP_RST_GET2_DONE
GET2 callback done.
Definition: xpath.h:438
xpath1_get2_new_cb
xpath_get2_cb_t * xpath1_get2_new_cb(obj_template_t *obj, val_value_t *parent_val, xpath_get2_cb_t *parent_cb)
Create a malloced XPath parser control block.
Definition: xpath1_get2.c:2190
XP_RNT_VAL
@ XP_RNT_VAL
valptr
Definition: xpath.h:424
getcb_new_parent_get2cb
getcb_get2_t * getcb_new_parent_get2cb(obj_template_t *obj, dlq_hdr_t *keyQ)
Create a new get2 control block for the parent Used for XGET operation to fill the list's parent get2...
Definition: getcb.c:8971
xpath1_get2_free_fake_nodes
void xpath1_get2_free_fake_nodes(dlq_hdr_t *resnodeQ)
Free the queue of dummy resnodes chain for XPath processing of a GET2 node as the context node.
Definition: xpath1_get2.c:2412
xpath_free_resnode
void xpath_free_resnode(xpath_resnode_t *resnode)
Free a malloced XPath result node struct.
Definition: xpath.c:3240
xpath1_aio_find_aiocb_pcb
xpath_aio_cb_t * xpath1_aio_find_aiocb_pcb(xpath_pcb_t *pcb, obj_template_t *obj)
Find AIO control block by object.
Definition: xpath1_aio.c:438
obj_is_anyxml
boolean obj_is_anyxml(const obj_template_t *obj)
Check if object is an anyxml.
Definition: obj.c:13271
xpath_aio_cb_t_::valQ
dlq_hdr_t valQ
Queue of val_value that represent the current complex level object.
Definition: xpath.h:1041
XP_RST_GET2_PENDING
@ XP_RST_GET2_PENDING
GET2 callback pending.
Definition: xpath.h:435
obj_is_container
boolean obj_is_container(const obj_template_t *obj)
Check if object is a YANG container.
Definition: obj.c:13405
xpath1_get2_free_node
void xpath1_get2_free_node(xpath_get2_node_t *node)
Free a malloced XPath GET2 node.
Definition: xpath1_get2.c:2275
obj_get_mod_name
const xmlChar * obj_get_mod_name(const obj_template_t *obj)
Get the module name for this object.
Definition: obj.c:12176
obj_find_child_fast
obj_template_t * obj_find_child_fast(obj_template_t *obj, xmlns_id_t nsid, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6239
obj_find_child
obj_template_t * obj_find_child(obj_template_t *obj, const xmlChar *modname, const xmlChar *objname)
Find a child object with the specified Qname.
Definition: obj.c:6116
XP_FL_NACM_GET2
#define XP_FL_NACM_GET2
set if the XPath parser is being called to cache a data rule but found a GET2 node,...
Definition: xpath.h:262
xpath1_keep_object
boolean xpath1_keep_object(obj_template_t *testobj, boolean textmode, xmlns_id_t nsid, const xmlChar *name)
Test if an object should be kept in a resnode node-test.
Definition: xpath1.c:6694
XP_AX_CHILD
@ XP_AX_CHILD
child axis (default)
Definition: ncxtypes.h:493
getcb_new_get2cb
getcb_get2_t * getcb_new_get2cb(void)
Malloc and init a new get2 control block.
Definition: getcb.c:5672
xml_strcmp
int xml_strcmp(const xmlChar *s1, const xmlChar *s2)
String compare for xmlChar.
Definition: xml_util.c:1746
obj_is_choice
boolean obj_is_choice(const obj_template_t *obj)
Check if object is a YANG choice.
Definition: obj.c:13425
LOGDEBUG4
#define LOGDEBUG4
Check if at least log-level=debug4.
Definition: log.h:302
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
xpath1_get2_set_resnode_parent
status_t xpath1_get2_set_resnode_parent(xpath_resnode_t *resnode)
Set the resnode to its parent.
Definition: xpath1_get2.c:2002
obj_is_leaf
boolean obj_is_leaf(const obj_template_t *obj)
Check if object is a proper leaf.
Definition: obj.c:13323
XP_DOC_RPC_REPLY
@ XP_DOC_RPC_REPLY
rpc-output context
Definition: xpath.h:365
xmlns_nc_id
xmlns_id_t xmlns_nc_id(void)
Get the ID for the NETCONF namespace or 0 if it doesn't exist.
Definition: xmlns.c:880
ERR_NCX_FOUND_GET2
@ ERR_NCX_FOUND_GET2
2006
Definition: status_enum.h:556
obj_get_langver
ncx_yang_version_t obj_get_langver(obj_template_t *obj)
Get the YANG version for this object.
Definition: obj.c:17655
obj_is_top_aio_get2
boolean obj_is_top_aio_get2(obj_template_t *obj)
Check if this object is a really top level holder of extension sil-aio-get2.
Definition: obj.c:18349
val_clean_valQ
void val_clean_valQ(dlq_hdr_t *valQ)
Clean a queue of val_value_t.
Definition: val.c:13911
dlq_deque
void * dlq_deque(dlq_hdrT *listP)
remove the first queue node from the queue list
Definition: dlq.c:286
val_get_first_child
val_value_t * val_get_first_child(const val_value_t *parent)
Get the first child node.
Definition: val.c:8477
XP_RNT_VALHDR
@ XP_RNT_VALHDR
valhdr
Definition: xpath.h:425
getcb_log_walker
void getcb_log_walker(const xmlChar *caller, getcb_walker_mode_t walker_mode, const xmlChar *objname, const xmlChar *valname)
Print some logging info for a GET2 walker consumer callback.
Definition: getcb.c:8725
xpath1_aio_find_aiocb_full
xpath_aio_cb_t * xpath1_aio_find_aiocb_full(dlq_hdr_t *aioQ, obj_template_t *obj, xpath_get2_cb_t *cb)
Find AIO control block by object and also check if the AIO CB is the correct control block with the s...
Definition: xpath1_aio.c:354
dlq_empty
#define dlq_empty(listP)
check if queue list is empty
Definition: dlq.h:367
xpath1_aio_get_first_aio_ptr
val_value_t * xpath1_aio_get_first_aio_ptr(xpath_aio_cb_t *cb)
Get the first AIO val value in the valQ Queue.
Definition: xpath1_aio.c:545
VAL_TYPE
#define VAL_TYPE(V)
Access the base type : same as VAL_BTYPE.
Definition: val.h:387
xpath1_check_resnode_exists
boolean xpath1_check_resnode_exists(xpath_pcb_t *pcb, dlq_hdr_t *resultQ, xpath_resnode_t *resnode)
Check if any ancestor-ot-self node is already in the specified Q.
Definition: xpath1.c:5989
obj_first_child_deep
obj_template_t * obj_first_child_deep(obj_template_t *obj)
Get the first child object if the specified object has any children.
Definition: obj.c:7084
ncx_get_backptr_node
void * ncx_get_backptr_node(ncx_backptr_t *backptr)
Get the back pointer node pointer.
Definition: ncx.c:11577
dlq_firstEntry
#define dlq_firstEntry(listP)
get the first entry in the queue list
Definition: dlq.h:337
val_new_value
val_value_t * val_new_value(void)
Malloc and initialize the fields in a val_value_t.
Definition: val.c:2697
getcb_find_get2_lookup
getcb_get2_lookup_t * getcb_find_get2_lookup(obj_template_t *obj, dlq_hdr_t *lookupQ)
Find a getcb_get2_lookup struct.
Definition: getcb.c:7964
VAL_OBJ
#define VAL_OBJ(V)
Access the object template.
Definition: val.h:381
xpath1_get2_create_fake_nodes
status_t xpath1_get2_create_fake_nodes(getcb_get2_t *parent_get2cb, dlq_hdr_t *resnodeQ, xpath_get2_cb_t **retcb)
@brief Create a dummy resnode chain for XPath processing of a GET2 node as the context node
Definition: xpath1_get2.c:2295
getcb_dump_get2cb
void getcb_dump_get2cb(getcb_get2_t *get2cb)
Print the interesting fields in a get2cb.
Definition: getcb.c:8117
ncx.h
YANG module utility functions.
obj.h
Data Object Support.
val_clone_valQ
status_t val_clone_valQ(dlq_hdr_t *valQ, dlq_hdr_t *return_valQ)
Clone all values in 1 valQ into the return_valQ.
Definition: val.c:13880
grp.h
YANG Grouping Statement Handler.
XP_FORM_GETCB_CHILD
@ XP_FORM_GETCB_CHILD
child node CB
Definition: xpath.h:450
xpath1_get2_set_nodeset_child
status_t xpath1_get2_set_nodeset_child(xpath_pcb_t *pcb, xpath_result_t *result, xmlns_id_t childnsid, const xmlChar *childname, boolean textmode, ncx_xpath_axis_t axis)
Check the current result nodeset and replace each node with a node for every child instead.
Definition: xpath1_get2.c:1876
XP_FORM_NONE
@ XP_FORM_NONE
not set
Definition: xpath.h:447
XPATH_VAL_CXT
#define XPATH_VAL_CXT(P)
test if context node is a value or get2 in xpath_pcb_t * (P)
Definition: xpath.h:310
xpath1_res.h
XPath 1.0 expression support; result support.
val_init_from_template
void val_init_from_template(val_value_t *val, struct obj_template_t_ *obj)
Initialize a value node from its object template.
ncx_find_object_nsid
obj_template_t * ncx_find_object_nsid(xmlns_id_t nsid, const xmlChar *objname)
Find a top level module object by module NSID.
Definition: ncx.c:4363
xpath1_get2_get_resnode_parent
void xpath1_get2_get_resnode_parent(xpath_get2_node_t *get2node, val_value_t **parentval, xpath_get2_cb_t **parent_cb)
Get the resnode parent.
Definition: xpath1_get2.c:2062
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
XP_RST_GET2_START
@ XP_RST_GET2_START
GET2 callback starting.
Definition: xpath.h:437
SET_ERROR
#define SET_ERROR(E)
macro SET_ERROR
Definition: status_enum.h:103
VAL_HDR
#define VAL_HDR(V)
Access the header backptr.
Definition: val.h:390
xmlns.h
XML namespace support.
XP_FORM_GETCB_TERM
@ XP_FORM_GETCB_TERM
terminal node CB
Definition: xpath.h:449
val_free_value
void val_free_value(val_value_t *val)
Scrub the memory in a val_value_t by freeing all the sub-fields and then freeing the entire struct it...
Definition: val.c:2842
obj_is_root
boolean obj_is_root(const obj_template_t *obj)
Check if object is marked as a root object.
Definition: obj.c:14152
XP_DOC_NONE
@ XP_DOC_NONE
not set
Definition: xpath.h:362
status.h
Global error messages for status code enumerations.
XP_DOC_RPC
@ XP_DOC_RPC
rpc-input context
Definition: xpath.h:364
log_debug3_append
void void void void void void void void void void void void log_debug3_append(const char *fstr,...) __attribute__((format(printf
Append to a LOG_DEBUG_DEBUG3 log entry.
obj_get_nsid
xmlns_id_t obj_get_nsid(const obj_template_t *obj)
Get the namespace ID for this object.
Definition: obj.c:12395
dlq.h
dlq provides general double-linked list and queue support:
ncx_new_backptr
ncx_backptr_t * ncx_new_backptr(void *node)
Malloc and initialize a new ncx_backptr_t struct.
Definition: ncx.c:11412
typ_has_children
boolean typ_has_children(ncx_btype_t btyp)
Check if this is a data type that uses the val.v.childQ.
Definition: typ.c:3056
LOGDEBUG3
#define LOGDEBUG3
Check if at least log-level=debug3.
Definition: log.h:297