yumapro  20.10-13
YumaPro SDK
xml_msg_hdr_t_ Struct Reference

Common Encoding Message Header No longer XML specific!! Used by JSON parsing as well!! Allows common rendering and error handlers. More...

#include <xml_msg.h>

Collaboration diagram for xml_msg_hdr_t_:

Data Fields

uint16 flags
 internal message flags
 
ncx_withdefaults_t withdef
 with-defaults value
 
dlq_hdr_t prefixQ
 prefixQ: (incoming) All the namespace decls that were in the <rpc> request are used in the <rpc-reply>, so the same prefixes will be used, and the XML on the wire will be easier to debug by examining packet traces More...
 
dlq_hdr_t errQ
 errors are collected in this queue when agt_record_error is invoked More...
 
dlq_hdr_t filptr_cleanupQ
 internal processing of filter parameters More...
 
dlq_hdr_t error_dataQ
 Q of nodes to add to the <error-info> element each node must be a proper val_value_t; A valid module name and namespace ID needs to be used You may want to use ncx:abstract to generate hidden data leafs for uuse in error info. More...
 
dlq_hdr_t * lookupQ
 GET2 lookup parameters provide ancestor keys. More...
 
dlq_hdr_t * matchQ
 GET2 matchQ used to select only specific nodes. More...
 
dlq_hdr_t * selectQ
 GET2 selectQ used in alternate way to select only specific nodes. More...
 
struct agt_acm_cache_t_ * acm_cache
 server access control for database reads and writes; !!! shadow pointer to per-session cache, not malloced
 
uint32 msgid
 incremented on every initialized message header rolls over at MAX_UINT32 back to zero used by agt_acm_ietf to cache message-ids to speed up data rule processing for read requests
 
ncx_cfg_t cfgid
 the xml_msg_set_cfgid function is used by the retrieval operation (e.g., <get>, <get-config> to set the cfgid field
 
boolean cfgid_valid
 flag needed since ncx_cfg_t uses value zero for running config
 
void * acm_cbfn
 agent access control read authorization callback function: xml_msg_authfn_t
 
uint32 max_depth
 max-depth value, 0=ignore
 
uint32 start_depth
 for nested GET2, 0=ignore
 
uint32 cur_depth
 current depth value
 
time_t match_tstamp
 match timestamp used for RESTCONF conditionals
 
ncx_etag_t match_etag
 match ETag used for RESTCONF conditionals
 
ncx_display_mode_t input_encoding
 RESTCONF input encoding.
 
ncx_display_mode_t output_encoding
 RESTCONF output encoding.
 
struct tk_chain_t_tkc
 used for RESTCONF JSON parsing
 
void * val_error_fn
 xml_msg_val_error_fn_t val_error_fn
 
void * val_errinfo_fn
 xml_msg_val_error_errinfo_fn_t val_error_fn
 
void * obj_error_fn
 xml_msg_obj_error_fn_t obj_error_fn
 
void * record_error
 xml_msg_record_error_fn_t record_error
 
void * record_error_errinfo
 xml_msg_record_error_errinfo_fn_t record_error_errinfo
 
void * record_attr_error
 xml_msg_record_attr_error_fn_t record_attr_error
 
val_value_t * actionval
 support for the YANG 1.1 <action> data tree that is used to derive keys during invocation of the callbacks
 
struct getbulk_cb_t_getbulk_cb
 getbulk control block to save parameters and state for <getbulk>
 
struct obj_template_t_get2_target
 GET2 nested target needs to be saved so callback code can filter out nodes that are not being requested in the GET response.
 
struct getcb_get2_t_get2cb
 GET2 control block needed in NACM data rule processing set and cleared for each ACM check needed; back-ptr.
 
dlq_hdr_t modtagQ
 Q of backptr to module-tag filter control block.
 
struct ypgnmi_get_cb_t_gnmi_getcb
 gnmi control block to save parameters and state for gnmi <get>
 
struct ypgnmi_edit_cb_t_gnmi_editcb
 gnmi control block to save parameters and state for gnmi <get>
 
boolean prune_bad_data
 flag set if parsing a config file prune bad data for startup-error=continue
 
boolean xget_request
 flag set if <get> request is for XPath filtering. More...
 
boolean all_in_one_mode
 TRUE if this is All in One mode.
 
struct ncx_filptr_t_get2_filptr
 The last GET2 Filter Pointer; may be used in case there are some All in One nodes still left.
 
ncx_nmda_params_t * nmda_params
 NMDA suport for get-data.
 
dlq_hdr_t aiocbQ
 Q of backptr AIO control blocks.
 
struct obj_template_t_anyxml_obj
 object pointer used by server to track real object properties for certain anyxml or anydata nodes such as <filter> in ietf-netconf.
 
val_value_t * edit_config_root
 if this is an edit request then the <config> root needs to be saved in the message header to allow NACM to test data rules for create access against the incoming message this is a back-pointer into the message and may not persist
 
struct obj_template_t_depth_target
 GET2 nested depth target needs to be saved so xml_msg_test_max_depth can produce a correct response according to RFC 8040 rules.
 

Detailed Description

Common Encoding Message Header No longer XML specific!! Used by JSON parsing as well!! Allows common rendering and error handlers.

This data structure is used by various server features for passing parameters to nested functions for processing. These parameter are per-request and only expected to have the lifetime of 1 RPC request and response.

Field Documentation

◆ error_dataQ

dlq_hdr_t error_dataQ

Q of nodes to add to the <error-info> element each node must be a proper val_value_t; A valid module name and namespace ID needs to be used You may want to use ncx:abstract to generate hidden data leafs for uuse in error info.

   leaf my-error-leaf {
     ncx:abstract;
     ...
   }

The ncx_find_any_object and obj_find_child functions can be used to find the obj_template_t for the abstract data

This error_dataQ is filled by the SIL code only and then added to the rpc-error error-info for the next call of agt_record_error (all forms) Q of val_value_t

◆ errQ

dlq_hdr_t errQ

errors are collected in this queue when agt_record_error is invoked

Q of rpc_err_rec_t

◆ filptr_cleanupQ

dlq_hdr_t filptr_cleanupQ

internal processing of filter parameters

Q of filter pointers

◆ lookupQ

dlq_hdr_t* lookupQ

GET2 lookup parameters provide ancestor keys.

ptr to Q of getcb_get2_lookup_t

◆ matchQ

dlq_hdr_t* matchQ

GET2 matchQ used to select only specific nodes.

ptr to Q of getcb_get2_lookup_t

◆ prefixQ

dlq_hdr_t prefixQ

prefixQ: (incoming) All the namespace decls that were in the <rpc> request are used in the <rpc-reply>, so the same prefixes will be used, and the XML on the wire will be easier to debug by examining packet traces

Q of xmlns_pmap_t

◆ selectQ

dlq_hdr_t* selectQ

GET2 selectQ used in alternate way to select only specific nodes.

ptr to Q of getcb_get2_lookup_t

◆ xget_request

boolean xget_request

flag set if <get> request is for XPath filtering.

Used in GET2 processing


The documentation for this struct was generated from the following file: