40 #ifndef NC_MESSAGES_H_
41 #define NC_MESSAGES_H_
549 nc_rpc*
nc_rpc_subscribe(
const char* stream,
const struct nc_filter *filter,
const time_t* start,
const time_t* stop);
nc_reply * nc_reply_data(const char *data)
Create rpc-reply response with content (in urn:ietf:params:xml:ns:netconf:base:1.0 namespace).
NC_EDIT_ERROPT_TYPE
Enumeration of edit-config's element values.
Definition: netconf.h:308
nc_reply * nc_reply_ok(void)
Create rpc-reply response.
NC_EDIT_DEFOP_TYPE
Enumeration of edit-config's element values.
Definition: netconf.h:296
NC_REPLY_TYPE nc_reply_get_type(const nc_reply *reply)
Get the type of the rpc-reply message.
void nc_filter_free(struct nc_filter *filter)
Destroy the filter structure.
NC_DATASTORE
Enumeration of the supported types of datastores defined by NETCONF.
Definition: netconf.h:260
char * nc_rpc_get_ns(const nc_rpc *rpc)
Get user's rpc operation namespace.
struct nc_msg nc_reply
reply message.
Definition: netconf.h:62
char * nc_reply_get_data(const nc_reply *reply)
Get content of the element in .
nc_rpc * nc_rpc_commit(void)
Create NETCONF rpc message.
NC_EDIT_TESTOPT_TYPE nc_rpc_get_testopt(const nc_rpc *rpc)
Get test-option type, valid only for RPCs supporting :validate:1.1 capability.
nc_reply * nc_reply_merge(int count,...)
Merge reply messages. All messages MUST be of the same type.
nc_rpc * nc_rpc_getschema(const char *name, const char *version, const char *format)
Create NETCONF rpc message (RFC 6022).
char * nc_rpc_get_op_namespace(const nc_rpc *rpc)
Get operation namespace of the given rpc.
int nc_reply_error_add(nc_reply *reply, struct nc_err *error)
Add another error description into the existing rpc-reply with content.
NETCONF error handling functions.
void nc_rpc_free(nc_rpc *rpc)
Free rpc message.
nc_rpc * nc_rpc_validate(NC_DATASTORE source,...)
Create NETCONF rpc message.
struct nc_msg nc_rpc
rpc message.
Definition: netconf.h:56
NC_OP
Enumeration of supported operations.
Definition: netconf.h:179
NC_EDIT_ERROPT_TYPE nc_rpc_get_erropt(const nc_rpc *rpc)
Get error-option type, valid only for RPCs.
NC_OP nc_rpc_get_op(const nc_rpc *rpc)
Get operation of the given rpc.
nc_rpc * nc_rpc_subscribe(const char *stream, const struct nc_filter *filter, const time_t *start, const time_t *stop)
Create NETCONF rpc message.
void nc_reply_free(nc_reply *reply)
Free reply message.
const char * nc_reply_get_data_ns(const nc_reply *reply)
Get namespace of the element in .
nc_reply * nc_reply_data_ns(const char *data, const char *ns)
Create rpc-reply response with content in the specified namespace.
NC_DATASTORE nc_rpc_get_target(const nc_rpc *rpc)
Get the target datastore type (running, startup, candidate) of the rpc request.
nc_rpc * nc_rpc_deleteconfig(NC_DATASTORE target,...)
Create NETCONF rpc message.
NC_RPC_TYPE nc_rpc_get_type(const nc_rpc *rpc)
Get type of the rpc message.
nc_rpc * nc_rpc_killsession(const char *kill_sid)
Create NETCONF rpc message.
NC_DATASTORE nc_rpc_get_source(const nc_rpc *rpc)
Get the source datastore type (running, startup, candidate) of the rpc request.
char * nc_rpc_get_op_content(const nc_rpc *rpc)
Get content of the operation specification from the given rpc.
nc_rpc * nc_rpc_dup(const nc_rpc *rpc)
Duplicate message.
char * nc_rpc_get_op_name(const nc_rpc *rpc)
Get operation name of the given rpc.
int nc_rpc_capability_attr(nc_rpc *rpc, NC_CAP_ATTR attr,...)
Set the attribute of the given which is specific for some NETCONF capability.
struct nc_filter * nc_filter_new(NC_FILTER_TYPE type,...)
Create a new NETCONF filter of the specified type.
nc_reply * nc_reply_dup(const nc_reply *reply)
Duplicate message.
nc_rpc * nc_rpc_editconfig(NC_DATASTORE target, NC_DATASTORE source, NC_EDIT_DEFOP_TYPE default_operation, NC_EDIT_ERROPT_TYPE error_option, NC_EDIT_TESTOPT_TYPE test_option,...)
Create NETCONF rpc message.
char * nc_reply_dump(const nc_reply *reply)
Dump the rpc-reply message into a string.
nc_rpc * nc_rpc_unlock(NC_DATASTORE target)
Create NETCONF rpc message.
NC_EDIT_TESTOPT_TYPE
Enumeration of edit-config's element values.
Definition: netconf.h:322
nc_rpc * nc_rpc_copyconfig(NC_DATASTORE source, NC_DATASTORE target,...)
Create NETCONF rpc message.
const nc_msgid nc_rpc_get_msgid(const nc_rpc *rpc)
Get message-id of the given rpc.
#define nc_msgid
Type representing NETCONF message-id attribute.
Definition: netconf.h:91
const nc_msgid nc_reply_get_msgid(const nc_reply *reply)
Get message-id of the given rpc-reply.
nc_reply * nc_reply_error(struct nc_err *error)
Create rpc-reply response with content.
nc_rpc * nc_rpc_get(const struct nc_filter *filter)
Create NETCONF rpc message.
nc_rpc * nc_rpc_getconfig(NC_DATASTORE source, const struct nc_filter *filter)
Create NETCONF rpc message.
NC_REPLY_TYPE
Enumeration of types.
Definition: netconf.h:150
nc_rpc * nc_rpc_generic(const char *data)
Create a generic NETCONF rpc message with the specified content.
nc_reply * nc_reply_build(const char *reply_dump)
Build message from the string. This is the reverse function of the nc_reply_dump().
NC_RPC_TYPE
Enumeration of operation types.
Definition: netconf.h:162
struct nc_filter * nc_rpc_get_filter(const nc_rpc *rpc)
Get filter from or RPC.
char * nc_rpc_dump(const nc_rpc *rpc)
Dump the rpc message into a string.
NC_EDIT_DEFOP_TYPE nc_rpc_get_defop(const nc_rpc *rpc)
Get default-operation type, valid only for RPCs.
nc_rpc * nc_rpc_build(const char *rpc_dump, const struct nc_session *session)
Build message from the string. This is the reverse function of the nc_rpc_dump().
NC_FILTER_TYPE
Enumeration of supported NETCONF filter types.
Definition: netconf.h:273
NC_CAP_ATTR
RPC attributes list.
Definition: netconf.h:352
libnetconf's general public functions and structures definitions.
nc_rpc * nc_rpc_lock(NC_DATASTORE target)
Create NETCONF rpc message.
char * nc_rpc_get_config(const nc_rpc *rpc)
Get serialized content of the config parameter ( itself is not a part of the returned data)...
const char * nc_reply_get_errormsg(const nc_reply *reply)
Get error-message from the server's reply.
nc_rpc * nc_rpc_discardchanges(void)
Create NETCONF rpc message.