yumapro
23.10T-12
YumaPro SDK
|
NETCONF RPC Error Handling. More...
Functions | |
rpc_err_rec_t * | agt_rpcerr_gen_error (ncx_layer_t layer, status_t interr, const xml_node_t *errnode, ncx_node_t parmtyp, const void *error_parm, xmlChar *error_path) |
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer. More... | |
rpc_err_rec_t * | agt_rpcerr_gen_error_errinfo (ncx_layer_t layer, status_t interr, const xml_node_t *errnode, ncx_node_t parmtyp, const void *error_parm, xmlChar *error_path, const ncx_errinfo_t *errinfo) |
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer. More... | |
rpc_err_rec_t * | agt_rpcerr_gen_error_ex (ncx_layer_t layer, status_t interr, const xml_node_t *errnode, ncx_node_t parmtyp, const void *error_parm, xmlChar *error_path, const ncx_errinfo_t *errinfo, ncx_node_t nodetyp, void *error_path_raw, boolean is_error) |
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer. More... | |
rpc_err_rec_t * | agt_rpcerr_gen_insert_error (ncx_layer_t layer, status_t interr, val_value_t *errval, xmlChar *error_path) |
Generate an internal <rpc-error> record for an element for an insert operation failed error. More... | |
rpc_err_rec_t * | agt_rpcerr_gen_unique_error (xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t interr, dlq_hdr_t *valuniqueQ, xmlChar *error_path, val_value_t *errval) |
Generate an internal <rpc-error> record for an element for a unique-stmt failed error (data-not-unique) More... | |
rpc_err_rec_t * | agt_rpcerr_gen_attr_error (ncx_layer_t layer, status_t interr, const xml_attr_t *attr, const xml_node_t *errnode, val_value_t *errnodeval, const xmlChar *badns, xmlChar *error_path) |
Generate an internal <rpc-error> record for an attribute. More... | |
rpc_err_t | agt_rpcerr_get_rpcerr (status_t intres) |
Translate the status_t to a rpc_err_t. More... | |
uint32 | agt_rpcerr_get_http_status_code (status_t res) |
Translate the rpc_err_t to an HTTP code. More... | |
const xmlChar * | agt_rpcerr_get_http_status_string (uint32 status) |
Translate the HTTP status code to an HTTP status line. More... | |
status_t | agt_rpcerr_add_user_data (rpc_err_rec_t *err, dlq_hdr_t *dataQ) |
Add data nodes to return in the <error-info> section of an error record. More... | |
NETCONF RPC Error Handling.
Uses the hacky horrible rpc error interface that cast pointers as void * in order to allow all kinds of data structures to be used to extract error data from. Use APIs carefully!
status_t agt_rpcerr_add_user_data | ( | rpc_err_rec_t * | err, |
dlq_hdr_t * | dataQ | ||
) |
Add data nodes to return in the <error-info> section of an error record.
The data will be moved to the rpc_err_rec_t in individual rpc_err_info_t records
err | rpc error record to add data into |
dataQ | Q of val_value_t nodes to add !!! This queue of value nodes will be consumed !!! |
rpc_err_rec_t * agt_rpcerr_gen_attr_error | ( | ncx_layer_t | layer, |
status_t | interr, | ||
const xml_attr_t * | attr, | ||
const xml_node_t * | errnode, | ||
val_value_t * | errnodeval, | ||
const xmlChar * | badns, | ||
xmlChar * | error_path | ||
) |
Generate an internal <rpc-error> record for an attribute.
layer | protocol layer where the error occurred |
interr | internal error code if NO_ERR than use the rpcerr only |
attr | attribute that had the error |
errnode | XML node where error occurred NULL then there is no valid XML node (maybe the error!) |
errnodeval | valuse struct for the error node id errnode NULL NULL if not used |
badns | URI string of the namespace that is bad (or NULL) |
error_path | malloced string of the value (or type, etc.) instance ID string in NCX_IFMT_XPATH format; this will be added to the rpc_err_rec_t and freed later NULL if not available |
rpc_err_rec_t * agt_rpcerr_gen_error | ( | ncx_layer_t | layer, |
status_t | interr, | ||
const xml_node_t * | errnode, | ||
ncx_node_t | parmtyp, | ||
const void * | error_parm, | ||
xmlChar * | error_path | ||
) |
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer.
layer | protocol layer where the error occurred |
interr | internal error code if NO_ERR than use the rpcerr only |
errnode | XML node where error occurred NULL then there is no valid XML node (maybe the error!) |
parmtyp | type of node contained in error_parm |
error_parm | pointer to the extra parameter expected for this type of error. (void *)pointer to session_id for lock-denied errors (void *) pointer to the bad-value string to use for some other errors |
error_path | malloced string of the value (or type, etc.) instance ID string in NCX_IFMT_XPATH format; this will be added to the rpc_err_rec_t and freed later NULL if not available |
rpc_err_rec_t * agt_rpcerr_gen_error_errinfo | ( | ncx_layer_t | layer, |
status_t | interr, | ||
const xml_node_t * | errnode, | ||
ncx_node_t | parmtyp, | ||
const void * | error_parm, | ||
xmlChar * | error_path, | ||
const ncx_errinfo_t * | errinfo | ||
) |
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer.
Add errinfo.
layer | protocol layer where the error occurred |
interr | internal error code if NO_ERR than use the rpcerr only |
errnode | XML node where error occurred NULL then there is no valid XML node (maybe the error!) |
parmtyp | type of node contained in error_parm |
error_parm | pointer to the extra parameter expected for this type of error. (void *)pointer to session_id for lock-denied errors (void *) pointer to the bad-value string to use for some other errors |
error_path | malloced string of the value (or type, etc.) instance ID string in NCX_IFMT_XPATH format; this will be added to the rpc_err_rec_t and freed later NULL if not available |
errinfo | error info struct to use for whatever fields are set |
rpc_err_rec_t * agt_rpcerr_gen_error_ex | ( | ncx_layer_t | layer, |
status_t | interr, | ||
const xml_node_t * | errnode, | ||
ncx_node_t | parmtyp, | ||
const void * | error_parm, | ||
xmlChar * | error_path, | ||
const ncx_errinfo_t * | errinfo, | ||
ncx_node_t | nodetyp, | ||
void * | error_path_raw, | ||
boolean | is_error | ||
) |
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer.
Add errinfo. Extended.
layer | protocol layer where the error occurred |
interr | internal error code if NO_ERR than use the rpcerr only |
errnode | XML node where error occurred NULL then there is no valid XML node (maybe the error!) |
parmtyp | type of node contained in error_parm |
error_parm | pointer to the extra parameter expected for this type of error. (void *)pointer to session_id for lock-denied errors (void *) pointer to the bad-value string to use for some other errors |
error_path | malloced string of the value (or type, etc.) instance ID string in NCX_IFMT_XPATH format; this will be added to the rpc_err_rec_t and freed later NULL if not available |
errinfo | error info struct to use for whatever fields are set |
nodetyp | type of node contained in error_path_raw |
error_path_raw | pointer to the extra parameter expected for this type of error. |
is_error | TRUE if error-severity=error; FALSE if it is warning |
rpc_err_rec_t * agt_rpcerr_gen_insert_error | ( | ncx_layer_t | layer, |
status_t | interr, | ||
val_value_t * | errval, | ||
xmlChar * | error_path | ||
) |
Generate an internal <rpc-error> record for an element for an insert operation failed error.
layer | protocol layer where the error occurred |
interr | internal error code if NO_ERR than use the rpcerr only |
errval | pointer to the node with the insert error |
error_path | malloced string of the value (or type, etc.) instance ID string in NCX_IFMT_XPATH format; this will be added to the rpc_err_rec_t and freed later NULL if not available |
rpc_err_rec_t * agt_rpcerr_gen_unique_error | ( | xml_msg_hdr_t * | msghdr, |
ncx_layer_t | layer, | ||
status_t | interr, | ||
dlq_hdr_t * | valuniqueQ, | ||
xmlChar * | error_path, | ||
val_value_t * | errval | ||
) |
Generate an internal <rpc-error> record for an element for a unique-stmt failed error (data-not-unique)
msghdr | message header to use for prefix storage |
layer | protocol layer where the error occurred |
interr | internal error code if NO_ERR than use the rpcerr only |
valuniqueQ | Q of ncx_backptr_t to val_value_t use for <non-unique> elements |
error_path | malloced string of the value (or type, etc.) instance ID string in NCX_IFMT_XPATH format; this will be added to the rpc_err_rec_t and freed later NULL if not available |
errval | pointer to the node with the insert error |
uint32 agt_rpcerr_get_http_status_code | ( | status_t | res | ) |
Translate the rpc_err_t to an HTTP code.
res | return status |
const xmlChar * agt_rpcerr_get_http_status_string | ( | uint32 | status | ) |
Translate the HTTP status code to an HTTP status line.
status | HTTP status code to translate |