yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
Protocol Message Handler

RESTCONF protocol operation support. More...

Collaboration diagram for Protocol Message Handler:

Functions

status_t agt_restconf_setup_fields_nodes (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg, boolean *errdone)
 Setup fields nodes if parameter is used. More...
 
status_t agt_restconf_validate_method_params (ses_cb_t *scb, yangapi_cb_t *rcb, rpc_msg_t *msg)
 validate that the operation is supported for the URI parameters given. More...
 
status_t agt_restconf_init (void)
 Initialize the agt_restconf module. More...
 
void agt_restconf_cleanup (void)
 Cleanup the agt_yangapi module. More...
 
boolean agt_restconf_dispatch (ses_cb_t *scb)
 Dispatch an incoming RESTCONF request. More...
 
boolean agt_restconf_dispatch_ex (ses_cb_t *scb, boolean scb_is_static)
 Dispatch an incoming RESTCONF request (Extended) More...
 
boolean agt_restconf_dispatch_gnmi_get (ses_cb_t *scb)
 Dispatch an incoming gNMI GET request with help of RESTCONF. More...
 
agt_restconf_data_tagt_restconf_get_context (void)
 Get the RESTCONF Context structure. More...
 
val_value_tagt_restconf_get_root (void)
 Get the RESTCONF Context root val_value_t node. More...
 
status_t agt_restconf_static_restmon_init1 (void)
 Load the ietf-restconf-monitoring SIL even if it is statically linked. More...
 
status_t agt_restconf_static_restmon_init2 (void)
 Call the ietf-restconf-monitoring init2 function. More...
 
void agt_restconf_static_restmon_cleanup (void)
 Call the cleanup function for the ietf-restconf-monitoring module. More...
 

Detailed Description

RESTCONF protocol operation support.

Handle request URIs by mapping to a request control block. Then process with RESTCONF and/or NETCONF response handling code

Function Documentation

◆ agt_restconf_cleanup()

void agt_restconf_cleanup ( void  )

Cleanup the agt_yangapi module.

Called by the server during shutdown.

◆ agt_restconf_dispatch()

boolean agt_restconf_dispatch ( ses_cb_t scb)

Dispatch an incoming RESTCONF request.

Parameters
scbsession control block
Returns
TRUE if scb is still valid
FALSE if scb has been deleted during this call
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_restconf_dispatch_ex()

boolean agt_restconf_dispatch_ex ( ses_cb_t scb,
boolean  scb_is_static 
)

Dispatch an incoming RESTCONF request (Extended)

Parameters
scbsession control block
if scb->type already set to SES_TYPE_COAP then the IO will be collected in the session
scb_is_statictrue if this is a static scb entry, such as CoAP
Returns
TRUE if scb is still valid
FALSE if scb has been deleted during this call
Here is the caller graph for this function:

◆ agt_restconf_dispatch_gnmi_get()

boolean agt_restconf_dispatch_gnmi_get ( ses_cb_t scb)

Dispatch an incoming gNMI GET request with help of RESTCONF.

The output will not be written into the stream.

scb->stream_output = FALSE !!!

The server will generate &scb->outQ Queue with output buffers, gNMI agent will utilize this buffers to write the actual output to connected subsystem.

Parameters
scbsession control block
Returns
TRUE if scb is still valid
FALSE if scb has been deleted during this call
Here is the call graph for this function:

◆ agt_restconf_get_context()

agt_restconf_data_t * agt_restconf_get_context ( void  )

Get the RESTCONF Context structure.

Returns
RESTCONF namespace context
Here is the caller graph for this function:

◆ agt_restconf_get_root()

val_value_t * agt_restconf_get_root ( void  )

Get the RESTCONF Context root val_value_t node.

Returns
Context structure data root

◆ agt_restconf_init()

status_t agt_restconf_init ( void  )

Initialize the agt_restconf module.

Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_restconf_setup_fields_nodes()

status_t agt_restconf_setup_fields_nodes ( ses_cb_t scb,
yangapi_cb_t rcb,
rpc_msg_t msg,
boolean *  errdone 
)

Setup fields nodes if parameter is used.

Parameters
scbsession to use
rcbrestapi control block to use
msgmessage in progress
[out]errdoneaddress of error done flag
*errdone TRUE if error already recorded
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_restconf_static_restmon_cleanup()

void agt_restconf_static_restmon_cleanup ( void  )

Call the cleanup function for the ietf-restconf-monitoring module.

Only present if STATIC_LINK=1

◆ agt_restconf_static_restmon_init1()

status_t agt_restconf_static_restmon_init1 ( void  )

Load the ietf-restconf-monitoring SIL even if it is statically linked.

Only present if STATIC_LINK=1

Returns
status
Here is the caller graph for this function:

◆ agt_restconf_static_restmon_init2()

status_t agt_restconf_static_restmon_init2 ( void  )

Call the ietf-restconf-monitoring init2 function.

Only present if STATIC_LINK=1

Returns
status

◆ agt_restconf_validate_method_params()

status_t agt_restconf_validate_method_params ( ses_cb_t scb,
yangapi_cb_t rcb,
rpc_msg_t msg 
)

validate that the operation is supported for the URI parameters given.

Errors are recorded by this function. Do not call record_error again if error returned

Parameters
scbsession control block to use
rcbrestapi control block to use
msgmsg to use for storing error records
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function: