yumapro  24.10-1
YumaPro SDK
Loading...
Searching...
No Matches
rpc_msg_t Struct Reference

NETCONF Server and Client RPC Request/Reply Message Header. More...

#include <rpc.h>

Collaboration diagram for rpc_msg_t:

Data Fields

dlq_hdr_t qhdr
 Queue header to store RPC messages in a queue (within the session header)
 
xml_msg_hdr_t mhdr
 generic XML message header Most in-message state is kept in the mhdr There are several places in the code where the mhdr is used alone so there is no coupling to the RPC layer. More...
 
xml_attrs_trpc_in_attrs
 incoming: top-level rpc element data Queue of xml_attr_t representing any XML attributes that were present in the <rpc> element. More...
 
struct obj_template_t_ * rpc_method
 incoming: Back-pointer to the object template for this RPC operation. More...
 
int rpc_agt_state
 incoming: SERVER RPC processing state Enum value (0, 1, 2) for the current RPC callback phase.
 
op_errop_t rpc_err_option
 Enum value for the <error-option> parameter. More...
 
op_editop_t rpc_top_editop
 Enum value for the <default-operation> parameter. More...
 
val_value_trpc_input
 Value tree representing the container of 'input' parameters for this RPC operation. More...
 
struct sil_sa_cb_t_ * rpc_sil_sa_cb
 backptr to SIL-SA edit control block if WITH_YCONTROL=1
 
dlq_hdr_t rpc_inputQ
 the rpc_inputQ is used with JSON encoded input since an array is allowed at the top-level; it is used instead of rpc_input if encoding == JSON, even if only 1 array node is parsed; More...
 
void * rpc_user1
 Void pointer that can be used by method routines to save context or whatever to store SIL-specific data. More...
 
void * rpc_user2
 Same use as rpc_user1.
 
uint32 rpc_returncode
 Internal return code used to control nested callbacks.
 
rpc_data_t rpc_data_type
 incoming: get method reply handling builtin For RPC operations that return data, this enumeration MUST be set to indicate which type of data is returned. More...
 
void * rpc_datacb
 For operations that return streamed data, this pointer is set to the desired callback function to use for generated the data portion of the <rpc-reply> XML response. More...
 
dlq_hdr_t rpc_dataQ
 For operations that return stored data, this queue of val_value_t structures can be used to provide the response data. More...
 
op_filter_t rpc_filter
 Internal structure for optimizing subtree and XPath retrieval operations. More...
 
struct agt_cfg_transaction_t_ * rpc_txcb
 incoming: agent database edit transaction control block must be freed by an upper layer if set to malloced data
 
boolean rpc_parse_errors
 load-config parse-error and –startup-error=continue flag if the val_purge_errors_from_root function is needed
 
xmlChar * rpc_message_id
 debugging and audit message string. More...
 
xmlChar * rpc_trace_id
 debugging and audit message string. More...
 
boolean rpc_replay_config
 TRUE if this RPC is being called in replay config mode.
 
boolean rpc_with_template
 –with-template parameter was seen in the validate phase
 
dlq_hdr_t hook_inputQ
 points to add_edit_value node comming from the users freed in the end of transaction. More...
 
boolean rpc_defer_reply
 YPSERVER mode is skipping the regular rpc-reply phase and will send the reply after doing the remote task.
 
xml_attrs_t rpc_defer_in_attrs
 the top->attrs gets deleted so a deferred rpc-reply needs to save the rpc_in_attrs. More...
 
rpc_rpytyp_t rpc_reply_type
 saved reply type needed for audit record
 
status_t rpc_status
 saved processing status for audit record
 
time_t rpc_start_time
 saved timestamp when started for audit record
 
const xmlChar * subrpc_filespec
 saved by agt_db_api.c so the ycontrol callback function can generate an external value with the DB-API subrpc response message
 

Detailed Description

NETCONF Server and Client RPC Request/Reply Message Header.

Field Documentation

◆ hook_inputQ

dlq_hdr_t hook_inputQ

points to add_edit_value node comming from the users freed in the end of transaction.

Used only with set-hook. Contains Q of val_value_t.

◆ mhdr

generic XML message header Most in-message state is kept in the mhdr There are several places in the code where the mhdr is used alone so there is no coupling to the RPC layer.

Contains XML message prefix map and other data used to parse the request and generate the reply.

◆ rpc_data_type

rpc_data_t rpc_data_type

incoming: get method reply handling builtin For RPC operations that return data, this enumeration MUST be set to indicate which type of data is returned.

  • RPC_DATA_STD: A <data> container will be used to encapsulate any returned data, within the <rpc-reply> element.
  • RPC_DATA_YANG: The <rpc-reply> element will be the only container encapsulated any returned data. If the rpc_datacb is non-NULL then it will be used as a callback to generate the rpc-reply inline, instead of buffering the output. The rpc_data and rpc_filter parameters are optionally used by the rpc_datacb function to generate a reply.

◆ rpc_datacb

void* rpc_datacb

For operations that return streamed data, this pointer is set to the desired callback function to use for generated the data portion of the <rpc-reply> XML response.

The template for this callback is agt_rpc_data_cb_t, found in agt_rpc.h

◆ rpc_dataQ

dlq_hdr_t rpc_dataQ

For operations that return stored data, this queue of val_value_t structures can be used to provide the response data.

Each val_value_t structure will be encoded as one of the corresponding RPC output parameters. The data will be returned in order. The val_value_t nodes will be freed when the rpc_msg_t is freed

◆ rpc_defer_in_attrs

xml_attrs_t rpc_defer_in_attrs

the top->attrs gets deleted so a deferred rpc-reply needs to save the rpc_in_attrs.

This is malloced and cleaned when rpc-msg_t is freed

◆ rpc_err_option

op_errop_t rpc_err_option

Enum value for the <error-option> parameter.

This is only set if an edit operation is in progress.

◆ rpc_filter

op_filter_t rpc_filter

Internal structure for optimizing subtree and XPath retrieval operations.

backptrs for get* methods.

◆ rpc_in_attrs

xml_attrs_t* rpc_in_attrs

incoming: top-level rpc element data Queue of xml_attr_t representing any XML attributes that were present in the <rpc> element.

A callback function may add xml_attr_t structs to this queue to send in the reply.

◆ rpc_input

val_value_t* rpc_input

Value tree representing the container of 'input' parameters for this RPC operation.

For an action, the rpc_input node is not used. Instead the rpc_actionval backptr is used instead. This is malloced in rpc_new_msg but not filled in.

◆ rpc_inputQ

dlq_hdr_t rpc_inputQ

the rpc_inputQ is used with JSON encoded input since an array is allowed at the top-level; it is used instead of rpc_input if encoding == JSON, even if only 1 array node is parsed;

Q of val_value_t *

◆ rpc_message_id

xmlChar* rpc_message_id

debugging and audit message string.

Contains the message-id attribute found in the <rpc> header. backptr into rpc_in_attrs.

◆ rpc_method

struct obj_template_t_* rpc_method

incoming: Back-pointer to the object template for this RPC operation.

2nd-level method name element data, used in agt_output_filter to check get or get-config; cannot import obj.h here! The object template type will be OBJ_TYP_RPC for an RPC method For an action this will be the top-level <action> RPC wrapper in the YANG namespace

◆ rpc_top_editop

op_editop_t rpc_top_editop

Enum value for the <default-operation> parameter.

This is only set if an edit operation is in progress.

◆ rpc_trace_id

xmlChar* rpc_trace_id

debugging and audit message string.

Contains the trace-id attribute found in the <rpc> header. backptr into rpc_in_attrs.

◆ rpc_user1

void* rpc_user1

Void pointer that can be used by method routines to save context or whatever to store SIL-specific data.

This pointer is preserved, transferred from validate to invoke so data does not need to be regenerated or retrieved


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