yumapro
24.10-2
YumaPro SDK
|
XPath parser control block. More...
#include <xpath.h>
Data Fields | |
dlq_hdr_t | qhdr |
queue header in case saved in a Q | |
tk_chain_t * | tkc |
token chain for exprstr, Often saved and reset each evaluation so the parse is done only once | |
xpath_source_t | source |
the prefixes in the QNames in the exprstr MUST be resolved in different contexts. More... | |
ncx_errinfo_t | errinfo |
must-stmt error info. More... | |
boolean | logerrors |
T: use log_error F: suppress error messages. More... | |
boolean | logwrongtype |
T: log wrong-type warnings. More... | |
boolean | missing_errors |
T: missing node is error. | |
obj_template_t * | targobj |
these parms are used to parse leafref path-arg limited object tree syntax allowed only targobj is bptr to result object | |
obj_template_t * | altobj |
bptr to pred. More... | |
obj_template_t * | varobj |
bptr to key-expr LHS object | |
xpath_curmode_t | curmode |
select targ/alt/var obj | |
obj_template_t * | obj |
these parms are used by leafref and XPath1 parsing obj is a bptr to start object | |
ncx_module_t * | objmod |
module containing obj. More... | |
ncx_module_t * | impmod |
[sub]module containing obj | |
ncx_module_t * | rootmod |
YPW-1416: track module in progress during deviation validation of leafref type replacement. More... | |
obj_template_t * | docroot |
document root. More... | |
obj_template_t * | startobj |
start object set for rpc,notif validation | |
val_value_t * | val |
saved state for the current() function result | |
val_value_t * | val_docroot |
cfg->root for db | |
xpath_document_t | doctype |
document context for this evaluation | |
struct xpath_get2_node_t_ * | val_get2 |
YPW-1342 the context node can be one of the following nodes. More... | |
uint32 | flags |
internal processing flags for managing XPath state | |
xpath_result_t * | result |
The XPath result for this evaluation. More... | |
xpath_resnode_t | context |
additive XPath1 context back- pointer to current step results. More... | |
xpath_result_t * | context_result |
internal context result during processing | |
xpath_getvar_fn_t | getvar_fn |
The getvar_fn callback function may be set to allow user variables to be supported in this XPath expression. | |
void * | cookie |
The cookie registered with the getvar_fn. | |
dlq_hdr_t | varbindQ |
The varbindQ may be used instead of the getvar_fn to store user variables to be supported in this XPath expression. | |
const struct xpath_fncb_t_ * | functions |
The function Q is a copy of the global Q It is not hardwired in case app-specific extensions are added later – array of xpath_fncb_t. | |
dlq_hdr_t | result_cacheQ |
Performance Caches. More... | |
dlq_hdr_t | resnode_cacheQ |
Q of xpath_resnode_t. More... | |
uint32 | result_count |
The count of entries in the result_cacheQ. | |
uint32 | resnode_count |
The count of entries in the resnode_cacheQ. | |
boolean | backptrs_mode |
must/when/data-rule obj_template_t backptr caching support backptrs in use | |
boolean | backptrs_manual_clear |
manual clear of backptrs needed | |
uint8 | backptrs_flags |
internal state for backptr handling | |
ncx_xpath_type_t | xpath_type |
expression context | |
boolean | xpath_predicate |
true when processing a predicate | |
status_t | parseres |
first and second pass parsing results. More... | |
status_t | validateres |
validation stage result | |
status_t | valueres |
evaluation stage result | |
ncx_error_t | tkerr |
saved error info for the agent to process | |
boolean | seen |
internal yangdiff support | |
void * | yang_pcb |
backptr to yang parser control block in progress used to force an inline import instead of returning a mod-not-found error | |
dlq_hdr_t | get2_cbQ |
if GET2 callbacks needed to process the XPath expression then they will be stored in this queue and xpath_resnode_t structs will point at the get2 control block inside this Q that was used to retrieve the value | |
ses_cb_t * | scb |
backptr to session control block in progress. More... | |
xml_msg_hdr_t * | mhdr |
backptr to the message header in progress if processing an XPath select filter for NETCONF | |
struct getcb_get2_t_ * | get2cb |
the getcb for a NACM data rule test | |
dlq_hdr_t | pred_entQ |
Internal state processing, Q of xpath_pred_ent_t. | |
obj_template_t * | nonconfig_warn_obj |
backptr to object causing nonconfig warning if that is being checked in the obj_walker_fn callback in xpath1.c | |
dlq_hdr_t | get2_aio_cbQ |
if AIO GET2 callbacks needed to process the XPath expression then The Subtree returned from AIO GET2 callback will be split into separate level nodes and stored in this Queue. More... | |
boolean | disabled_obj_ok |
YPW-1774: need to ignore if-feature=false while validating leafref path-stmt. More... | |
ncx_sm_rootcb_t * | rootcb |
YPW-2079: backptr for current ROOTCB; used in leafref processing. | |
obj_template_t * | when_obj |
check special context rules for when-stmt If the when_obj is set then the original context and this object are checked to make sure the correct child nodes are visible as required in RFC 7950, sec. More... | |
XPath parser control block.
This is the main control block used by external code.
An xpath_pcb_t is saved in a val_value_t when the node is parsed in XML. This is required so the namespace ID mappings can be gathered,
This struct is also saved in YANG validation code, especially for must, when, and leafref validation. Results are often cached in an xpath_result_t and saved with this struct
obj_template_t* altobj |
bptr to pred.
RHS object
xpath_resnode_t context |
additive XPath1 context back- pointer to current step results.
initially NULL and modified until the expression is done relative context
boolean disabled_obj_ok |
YPW-1774: need to ignore if-feature=false while validating leafref path-stmt.
It is possible and valid if both the pointing-at leafref and the pointed-at leaf are both disabled with the same if-feature-stmt in both leafs
obj_template_t* docroot |
document root.
Usually a bptr to <config> obj
ncx_errinfo_t errinfo |
must-stmt error info.
Extracted from the YANG module. Only used if this evaluation is for a must-stmt
dlq_hdr_t get2_aio_cbQ |
if AIO GET2 callbacks needed to process the XPath expression then The Subtree returned from AIO GET2 callback will be split into separate level nodes and stored in this Queue.
So the xpath_resnode_t structs will point at the getcb that will be constructed using the values inside this Q that was used to retrieve the value Q of xpath_aio_cb_t
boolean logerrors |
T: use log_error F: suppress error messages.
The parser is used for YANG validation, client validation server validation, and server datastore searches. Errors and warnings are often suppressed by the server.
boolean logwrongtype |
T: log wrong-type warnings.
ncx_module_t* objmod |
module containing obj.
This is an important parameter for YANG validation and generating error messages for the correct module
status_t parseres |
first and second pass parsing results.
the next phase will not execute until all previous phases have a NO_ERR status
dlq_hdr_t resnode_cacheQ |
Q of xpath_resnode_t.
This is used to avoid malloc and free constantly while processing each step in a path expression.
xpath_result_t* result |
The XPath result for this evaluation.
Not always used
dlq_hdr_t result_cacheQ |
Performance Caches.
The xpath_result_t and xpath_resnode_t structs are used in many intermediate operations
These Qs are used to cache these structs instead of calling malloc and free constantly
The XPATH_RESULT_CACHE_MAX and XPATH_RESNODE_CACHE_MAX constants are used to control the max cache sizes This is not user-configurable (TBD).
The result_cacheQ is a Q of xpath_result_t used when intermediate results are needed.
ncx_module_t* rootmod |
YPW-1416: track module in progress during deviation validation of leafref type replacement.
dev for this mod-in progress
ses_cb_t* scb |
backptr to session control block in progress.
If GET2 nodes processing, it's required to SCB to be available, so the GET2 nodes processing can supply GET2 callback functions with SCB
xpath_source_t source |
the prefixes in the QNames in the exprstr MUST be resolved in different contexts.
For must/when/leafref XPath, the prefix is a module prefix which must match an import statement in the 'mod' import Q
For XML context (NETCONF PDU 'select' attribute) the prefix is part of an extended name, representing XML namespace for the module that defines that node
struct xpath_get2_node_t_* val_get2 |
YPW-1342 the context node can be one of the following nodes.
obj_template_t --> pcb->obj val_value_t --> pcb->val xpath_get2_node_t --> pcb->val_get2
obj_template_t* when_obj |
check special context rules for when-stmt If the when_obj is set then the original context and this object are checked to make sure the correct child nodes are visible as required in RFC 7950, sec.
7.21.5