libnetconf2
1.1.48
NETCONF library for clients and servers
|
libnetconf2's functions and structures of server NETCONF messages. More...
Go to the source code of this file.
Typedefs | |
typedef enum NC_ERROR | NC_ERR |
Enumeration of NETCONF errors. More... | |
typedef enum NC_ERROR_TYPE | NC_ERR_TYPE |
Enumeration of NETCONF error type (layer) More... | |
Enumerations | |
enum | NC_ERROR { NC_ERR_UNKNOWN = 0, NC_ERR_IN_USE, NC_ERR_INVALID_VALUE, NC_ERR_TOO_BIG, NC_ERR_MISSING_ATTR, NC_ERR_BAD_ATTR, NC_ERR_UNKNOWN_ATTR, NC_ERR_MISSING_ELEM, NC_ERR_BAD_ELEM, NC_ERR_UNKNOWN_ELEM, NC_ERR_UNKNOWN_NS, NC_ERR_ACCESS_DENIED, NC_ERR_LOCK_DENIED, NC_ERR_RES_DENIED, NC_ERR_ROLLBACK_FAILED, NC_ERR_DATA_EXISTS, NC_ERR_DATA_MISSING, NC_ERR_OP_NOT_SUPPORTED, NC_ERR_OP_FAILED, NC_ERR_MALFORMED_MSG } |
Enumeration of NETCONF errors. More... | |
enum | NC_ERROR_TYPE { NC_ERR_TYPE_UNKNOWN = 0, NC_ERR_TYPE_TRAN, NC_ERR_TYPE_RPC, NC_ERR_TYPE_PROT, NC_ERR_TYPE_APP } |
Enumeration of NETCONF error type (layer) More... | |
Functions | |
struct nc_server_reply * | nc_server_reply_ok (void) |
Create an OK rpc-reply object. More... | |
struct nc_server_reply * | nc_server_reply_data (struct lyd_node *data, NC_WD_MODE wd, NC_PARAMTYPE paramtype) |
Create a DATA rpc-reply object. More... | |
struct nc_server_reply * | nc_server_reply_err (struct nc_server_error *err) |
Create an ERROR rpc-reply object. More... | |
int | nc_server_reply_add_err (struct nc_server_reply *reply, struct nc_server_error *err) |
Add another error to an ERROR rpc-reply object. It will be freed with the returned object. More... | |
struct nc_server_error * | nc_server_reply_get_last_err (const struct nc_server_reply *reply) |
Get last error from an ERROR rpy-reply object. More... | |
struct nc_server_error * | nc_err (int tag,...) |
Create a server error structure. Its <error-message> is filled with a general description of the specific error. More... | |
struct nc_server_error * | nc_err_libyang (struct ly_ctx *ctx) |
Create a server error structure based on libyang error. More... | |
NC_ERR_TYPE | nc_err_get_type (const struct nc_server_error *err) |
Get the <error-type> of a server error. More... | |
NC_ERR | nc_err_get_tag (const struct nc_server_error *err) |
Get the <error-tag> of a server error. More... | |
int | nc_err_set_app_tag (struct nc_server_error *err, const char *error_app_tag) |
Set the <error-app-tag> element of an error. Any previous value will be overwritten. More... | |
const char * | nc_err_get_app_tag (const struct nc_server_error *err) |
Get the <error-app-tag> of a server error. More... | |
int | nc_err_set_path (struct nc_server_error *err, const char *error_path) |
Set the <error-path> element of an error. Any previous value will be overwritten. More... | |
const char * | nc_err_get_path (const struct nc_server_error *err) |
Get the <error-path> of a server error. More... | |
int | nc_err_set_msg (struct nc_server_error *err, const char *error_message, const char *lang) |
Set the <error-message> element of an error. Any previous value will be overwritten. More... | |
const char * | nc_err_get_msg (const struct nc_server_error *err) |
Get the <error-message> of a server error. More... | |
int | nc_err_set_sid (struct nc_server_error *err, uint32_t session_id) |
Set the <session-id> element of an error. Any previous value will be overwritten. More... | |
int | nc_err_add_bad_attr (struct nc_server_error *err, const char *attr_name) |
Add a <bad-attribute> element to an error. More... | |
int | nc_err_add_bad_elem (struct nc_server_error *err, const char *elem_name) |
Add a <bad-element> element to an error. More... | |
int | nc_err_add_bad_ns (struct nc_server_error *err, const char *ns_name) |
Add a <bad-namespace> element to an error. More... | |
int | nc_err_add_info_other (struct nc_server_error *err, struct lyxml_elem *other) |
Add an additional custom element to an error. More... | |
void | nc_server_reply_free (struct nc_server_reply *reply) |
Free a server rpc-reply object. More... | |
void | nc_err_free (struct nc_server_error *err) |
Free a server error structure. More... | |
struct nc_server_notif * | nc_server_notif_new (struct lyd_node *event, char *eventtime, NC_PARAMTYPE paramtype) |
Create Event Notification object to be sent to the subscribed client(s). More... | |
NC_MSG_TYPE | nc_server_notif_send (struct nc_session *session, struct nc_server_notif *notif, int timeout) |
Send NETCONF Event Notification via the session. More... | |
void | nc_server_notif_free (struct nc_server_notif *notif) |
Free a server Event Notification object. More... | |
const char * | nc_server_notif_get_time (const struct nc_server_notif *notif) |
Get the notification timestamp. More... | |
libnetconf2's functions and structures of server NETCONF messages.
This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at
https://opensource.org/licenses/BSD-3-Clause
Definition in file messages_server.h.