yumapro  22.10T-8
YumaPro SDK
No Matches

Restapi Control Block Used by RESTCONF to hold parse and request processing state. More...

#include <yangapi.h>

Collaboration diagram for yangapi_cb_t:

Data Fields

dlq_hdr_t qhdr
 queue header in case added to a queue
dlq_hdr_t paramQ
 Q of yangapi_param_t.
dlq_hdr_t keyvalQ
 Q of getcb_keyval_t.
dlq_hdr_t acceptQ
 Q of yangapi_accept_t.
dlq_hdr_t sorted_acceptQ
 Q of sorted accept header.
xmlChar * accept
 saved Accept header string
xmlChar * request_method
 request method
xmlChar * request_uri
 saved request URI
xmlChar * request_patch_path
 request patch path
boolean request_force_patch_root
 forced patch root
boolean netconf_getbulk
 RESTCONF get-bulk active, not RESTCONF at all!
 request URI parsed in XPath control block
 search result for request URI
uint32 request_xpath_result_count
 search result count for request URI
boolean request_xpath_result_flat
 flag flatten result already done
 backptr inside root_tree
 backptr inside root_tree to SM MPI value
 backptr inside root_tree->obj
xmlChar * request_target_name
 malloced VAL_NAME
 backptr inside schema_tree
 final GET2 target
yangapi_launchpt_t request_launchpt
 request launch point
 backptr inside root tree to launch point
 backptr inside root tree to top of data
 backptr inside root tree to tarminal val_value_t found
boolean query_config
 TRUE for config=true, FALSE for config=false.
boolean query_config_set
 TRUE if the config query parameter is present.
uint32 query_depth
 depth query parameter
ncx_display_mode_t query_format
 format query parameter
op_insertop_t query_insert
 insert query parameter
xmlChar * query_point
 back-ptr into paramQ to insertion point
xmlChar * query_select
 back-ptr into paramQ to select parameter
 select parameter parsed as XPath
 result for select parameter search
uint32 query_select_xpath_result_count
 result count for select parameter search
xmlChar * query_start
 back-ptr into request_uri, start parameter
time_t query_tstamp
 converted timestamp
ncx_etag_t query_etag
 converted etag
xmlChar * query_test
 back-ptr into paramQ, test parameter
 test parameter parsed as XPath
 result for test parameter Xpath
uint32 query_test_xpath_result_count
 result count for test parameter Xpath
xmlChar * query_persist
 start parameters for confirmed-commit extension persist parameter for confirmed-commit back-ptr into paramQ
xmlChar * query_persist_id
 persist-id parameter for the confirmed-commit
uint32 query_confirm_timeout
 confirm-timeout parameter for the confirmed-commit
boolean query_confirmed
 flag that confirm-commit is be completed
xmlChar * content_type
 input content type
xmlChar * content_length
 input content length (not always set)
xmlChar * if_modified_since
 If-Modified-Since parameter.
xmlChar * if_unmodified_since
 If-Unmodified-Since parameter.
xmlChar * if_match
 If-Match parameter.
xmlChar * if_none_match
 If-None-Match parameter.
int content_len
 actual content length
yangapi_method_t method
 HTTP method enumeration.
xmlChar * fragment
 back-ptr to fragment if any
uint32 pathlen
 len from request_uri of resource path
boolean db_api_patch
 TRUE if this is an edit from DB-API.
boolean get2_read
 TRUE if a GET2 read needed.
dlq_hdr_t get2_lookupQ
 Q of getcb_get2_lookup_t.
dlq_hdr_t get2_selectQ
 Q of getcb_get2_select_t.
uint32 return_code
 HTTP return code to send to client.
op_editop_t editop
 edit operation
 curmode being processed
boolean skip_read
 TRUE to skip read during response because conditional was not met (e.g., If-Match.
boolean empty_read
 TRUE if there is nothing to read because filters did not produce any output.
boolean is_delta
 internal is delta flag
boolean target_is_config
 TRUE if target data is config=true.
ncx_display_mode_t accept_format
 accepted output encoding
boolean norm_header
 TRUE if header entry is normative.
boolean is_restconf
 TRUE if RESTCONF method or a NETCONF <get-bulk> is in progress
FALSE if a YANG-API method is in progress.
restconf_content_t query_content
 Start RESTCONF specific Query parameters entries query_content value // config/nonconfig/all.
 filter element to use
xmlChar * query_filter
 URL encoded filter string.
xmlChar * query_starttime
 used to trigger the notification replay feature and indicate that the replay should start at the time specified. More...
xmlChar * starttime_utc
 utc converted query_starttime
xmlChar * query_stoptime
 The 'stop-time' parameter is used with the replay feature to indicate the newest notifications of interest. More...
xmlChar * stoptime_utc
 utc converted query_stoptime
boolean futurestop
 flag if future stop notifications
ncx_withdefaults_t query_withdef
 with-defaults default
const xmlChar * query_fields
 Fields query Parameter entries URL encoded str; backptr to ?
xmlChar * fields_buff
 malloced URL-decoded query_fields
 malloced based on fields_buff
xmlChar * index_string
 index string used to build Location header for list
boolean empty_edit
 TRUE if request is an empty edit.
boolean is_action
 RESTCONF Action requested.
 malloced pointer to action root
 backptr inside targroot to action node
boolean is_replace_datastore
 TRUE if Replace a Datastore Resource.
boolean yang_patch
 TRUE if YANG PATCH is in progress.
xmlChar * patch_id
 value used in the request
xmlChar * edit_id
 value represents failed edit ID
boolean is_ypcoap
 request from RESTCONF over CoAP
uint16 http_status
 HTTP status code.
uint8 coap_accept_type
 CoAP accept-type code.
uint8 coap_content_type
 CoAP content-type code.
uint16 coap_etag_len
 input CoAP ETag length
xmlChar * coap_etag
 input CoAP ETag (binary)
xmlChar * http_location
 if Location-Path needed
xmlChar * http_etag
 output CoAP ETag (not binary)
xmlChar * coap_data
 output message body or block1 input
size_t coap_datalen
 output message body len
boolean coap_save
 T: need to cache coap_data, not free.
boolean coap_is_block1
 T: request uses Blo0ck1.
uint8 coap_block_szx
 filled if coap_is_block1
boolean coap_block_m
 filled if coap_is_block1
uint16 coap_block_num
 filled if coap_is_block1
boolean is_snmp
 request header used for SNMP
uint8 snmp_pdu_code
 SNMP PDU command code: More...
 back pointer to target object (target leaf ONLY obj)
 Requested OID, for snmpget is the actual requested OID, For snmpgetnext will be the next OID wether next index OID or next obj OID For snmpget is the return OID back-ptr.
boolean snmp_key_walk
 TRUE if need to walk all the list entries first in order to process getnext request on tabular instance.
boolean snmp_return_value_set
 TRUE if instance node and value found and set FALSE otherwise.
 target index OID More...
dlq_hdr_t snmp_getnext_listQ
 Q of malloced val_value struc Q of list entries with only keys in it. More...
dlq_hdr_t snmp_target_keyvalQ
 Q of malloced val_value_t. More...
 malloced requested list value that holds all keys
uint32 snmp_index_length
 the length of the index, Specifies how many .k1.k2.k3 appended after the base table OID
 back pointer to target table object of the target leaf node
boolean snmpget2_index_match
 GET2 boolean TRUE if found matching list entry FALSE, if no entry found.
 matched list value to use during get2 walking Used to find matching terminal value
boolean is_gnmi
 Request is for YP-gNMI

status_t res
 gNMI GET status
boolean lock_done
 gNMI lock done
boolean gnmi_patch
 gNMI patch request

Detailed Description

Restapi Control Block Used by RESTCONF to hold parse and request processing state.

Field Documentation

◆ query_starttime

xmlChar* query_starttime

used to trigger the notification replay feature and indicate that the replay should start at the time specified.

This parameter is only allowed for GET methods on a text/event-stream data resource.

◆ query_stoptime

xmlChar* query_stoptime

The 'stop-time' parameter is used with the replay feature to indicate the newest notifications of interest.

This parameter MUST be used with and have a value later than the 'start-time' parameter

◆ snmp_getnext_listQ

dlq_hdr_t snmp_getnext_listQ

Q of malloced val_value struc Q of list entries with only keys in it.

Used to find the best getnext match

◆ snmp_pdu_code

uint8 snmp_pdu_code

SNMP PDU command code:


◆ snmp_target_index_oid

obj_oid_t* snmp_target_index_oid

target index OID

  E.g.:  .10.10.11
   |   base OID        | index OID (key) or instance

In the above example there are 3 indexes (keys) 10, 10, 11

snmp_target_index_oid is malloced, and is the requested index OID for snmpget/getnext. OR a new return index OID for getnext instance

◆ snmp_target_keyvalQ

dlq_hdr_t snmp_target_keyvalQ

Q of malloced val_value_t.

Q of keys. Converted from snmp_target_index_oid Contains all the keys from the requested OID or all the keys for the getnext instance

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