yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
Remote Procedure Call (RPC)

NETCONF <rpc> Request and <rpc-reply> Response Messages. More...

Collaboration diagram for Remote Procedure Call (RPC):

Data Structures

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

Enumerations

enum  rpc_data_t {
  RPC_DATA_NONE ,
  RPC_DATA_STD ,
  RPC_DATA_YANG
}
 Type of the <rpc-reply> data source. More...
 
enum  rpc_rpytyp_t {
  RPC_RPYTYP_NONE ,
  RPC_RPYTYP_OK ,
  RPC_RPYTYP_ERROR ,
  RPC_RPYTYP_DATA
}
 Type of the <rpc-reply> sent to client. More...
 

Functions

rpc_msg_trpc_new_msg (void)
 Malloc and initialize a new rpc_msg_t struct. More...
 
rpc_msg_trpc_new_out_msg (void)
 Malloc and initialize a new rpc_msg_t struct for output or for dummy use. More...
 
void rpc_free_msg (rpc_msg_t *msg)
 Free all the memory used by the specified rpc_msg_t. More...
 
void rpc_msg_add_error_data (rpc_msg_t *msg, val_value_t *val)
 Add error data to the response message. More...
 
const xmlChar * rpc_msg_get_reply_type (rpc_rpytyp_t rpytyp)
 Get the reply type string from the message type. More...
 

Detailed Description

NETCONF <rpc> Request and <rpc-reply> Response Messages.

Format defined in RFC 6241.

Enumeration Type Documentation

◆ rpc_data_t

enum rpc_data_t

Type of the <rpc-reply> data source.

Enumerator
RPC_DATA_NONE 

not set

RPC_DATA_STD 

STD is used by <get> and <get-config> to force a <data> container in the NETCONF namespace.

RPC_DATA_YANG 

STD is used by YANG rpc or action stmts; no extra <data> container will be added to the <rpc-reply> container.

◆ rpc_rpytyp_t

Type of the <rpc-reply> sent to client.

Enumerator
RPC_RPYTYP_NONE 

not set

RPC_RPYTYP_OK 

reply is ok

RPC_RPYTYP_ERROR 

reply is error

RPC_RPYTYP_DATA 

reply is data

Function Documentation

◆ rpc_free_msg()

void rpc_free_msg ( rpc_msg_t msg)

Free all the memory used by the specified rpc_msg_t.

Parameters
msgrpc_msg_t to clean and delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rpc_msg_add_error_data()

void rpc_msg_add_error_data ( rpc_msg_t msg,
val_value_t val 
)

Add error data to the response message.

Used by the server only

Add a val_value_t node that will be used in the error response sent to the client

Parameters
msgrpc_msg_t to add data into
valmalloced error data node to add to error record error-info !!! This value node will be consumed and freed later !!!
Here is the call graph for this function:

◆ rpc_msg_get_reply_type()

const xmlChar * rpc_msg_get_reply_type ( rpc_rpytyp_t  rpytyp)

Get the reply type string from the message type.

Parameters
rpytypreply type
Returns
string version of the enum
Here is the caller graph for this function:

◆ rpc_new_msg()

rpc_msg_t * rpc_new_msg ( void  )

Malloc and initialize a new rpc_msg_t struct.

Returns
pointer to struct or NULL or memory error
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rpc_new_out_msg()

rpc_msg_t * rpc_new_out_msg ( void  )

Malloc and initialize a new rpc_msg_t struct for output or for dummy use.

Returns
pointer to struct or NULL or memory error
Here is the call graph for this function:
Here is the caller graph for this function: