yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
xml_msg_hdr_t Struct Reference

Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR 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_tactionval
 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_tnmda_params
 NMDA suport for get-data.
 
dlq_hdr_t * aiocbQ
 BACK POINTER TO 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_tedit_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.
 
ncx_sm_mpid_tsm_mpid
 Mount Point Instance used in an RPC or ACTION. More...
 
ncx_sid_t sid_lower
 YANG SID lower bound filter. More...
 
ncx_sid_t sid_upper
 YANG SID upper bound filter. More...
 
boolean sid_skip
 Flag to indicate YANG SID SKIP DATA Mode is active.
 
ncx_sid_t parent_sid
 YANG Parent SID to use when outputing data in pieces and callbacks instead of from a val_value_t or obj_template_t parent.
 
boolean skip_empty_npcon
 support return-empty-npcontainers=false only set in rpc-reply if OK to skip empty NP containers. More...
 
dlq_hdr_t revcount_revQ
 internal processing of revision count backptr to found modules->rev in revision count search processing More...
 

Detailed Description

Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR 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

◆ revcount_revQ

dlq_hdr_t revcount_revQ

internal processing of revision count backptr to found modules->rev in revision count search processing

Q of backptr pointers

◆ selectQ

dlq_hdr_t* selectQ

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

ptr to Q of getcb_get2_lookup_t

◆ sid_lower

ncx_sid_t sid_lower

YANG SID lower bound filter.

  • Only used if WITH_YANG_CBOR is set
  • Used by get-yang-sid-data data_cb callback

◆ sid_upper

ncx_sid_t sid_upper

YANG SID upper bound filter.

  • Only used if WITH_YANG_CBOR is set
  • Used by get-yang-sid-data data_cb callback

◆ skip_empty_npcon

boolean skip_empty_npcon

support return-empty-npcontainers=false only set in rpc-reply if OK to skip empty NP containers.

They are only returned normally for default-style=report-all or with-defaults=report-all*

◆ sm_mpid

ncx_sm_mpid_t* sm_mpid

Mount Point Instance used in an RPC or ACTION.

If a schema-mount mount point instance is used in the request then this backptr to the MPID value node MPI will be set Only used if WITH_SCHEMA_MOUNT=1 and request is in the top-level server for an RPC or action in a mounted YANG module. For SIL-SA the MPID will be fake, just setup in the message. There will be no mpidval because no valroot present

◆ 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: