libnetconf2 2.0.24
NETCONF server and client library in C.
Loading...
Searching...
No Matches
messages_client.h
Go to the documentation of this file.
1
16#ifndef NC_MESSAGES_CLIENT_H_
17#define NC_MESSAGES_CLIENT_H_
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <stdint.h>
24
25#include "netconf.h"
26
79
89
99
109
113struct nc_err {
115 const char *type;
117 const char *tag;
119 const char *severity;
121 const char *apptag;
123 const char *path;
125 const char *message;
127 const char *message_lang;
128
129 /* <error-info> */
130
132 const char *sid;
134 const char **attr;
136 const char **elem;
138 const char **ns;
140 struct lyd_node *other;
141
143 uint16_t attr_count;
145 uint16_t elem_count;
147 uint16_t ns_count;
149 uint16_t other_count;
150};
151
161struct nc_rpc;
162
170
183struct nc_rpc *nc_rpc_act_generic(const struct lyd_node *data, NC_PARAMTYPE paramtype);
184
196struct nc_rpc *nc_rpc_act_generic_xml(const char *xml_str, NC_PARAMTYPE paramtype);
197
209struct nc_rpc *nc_rpc_getconfig(NC_DATASTORE source, const char *filter, NC_WD_MODE wd_mode,
210 NC_PARAMTYPE paramtype);
211
226 NC_RPC_EDIT_ERROPT error_opt, const char *edit_content, NC_PARAMTYPE paramtype);
227
241struct nc_rpc *nc_rpc_copy(NC_DATASTORE target, const char *url_trg, NC_DATASTORE source,
242 const char *url_or_config_src, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype);
243
254struct nc_rpc *nc_rpc_delete(NC_DATASTORE target, const char *url, NC_PARAMTYPE paramtype);
255
265
275
286struct nc_rpc *nc_rpc_get(const char *filter, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype);
287
296struct nc_rpc *nc_rpc_kill(uint32_t session_id);
297
310struct nc_rpc *nc_rpc_commit(int confirmed, uint32_t confirm_timeout, const char *persist, const char *persist_id,
311 NC_PARAMTYPE paramtype);
312
320struct nc_rpc *nc_rpc_discard(void);
321
331struct nc_rpc *nc_rpc_cancel(const char *persist_id, NC_PARAMTYPE paramtype);
332
343struct nc_rpc *nc_rpc_validate(NC_DATASTORE source, const char *url_or_config, NC_PARAMTYPE paramtype);
344
356struct nc_rpc *nc_rpc_getschema(const char *identifier, const char *version, const char *format, NC_PARAMTYPE paramtype);
357
370struct nc_rpc *nc_rpc_subscribe(const char *stream_name, const char *filter, const char *start_time,
371 const char *stop_time, NC_PARAMTYPE paramtype);
372
390struct nc_rpc *nc_rpc_getdata(const char *datastore, const char *filter, const char *config_filter, char **origin_filter,
391 int origin_filter_count, int neg_origin_filter, uint16_t max_depth, int with_origin, NC_WD_MODE wd_mode,
392 NC_PARAMTYPE paramtype);
393
405struct nc_rpc *nc_rpc_editdata(const char *datastore, NC_RPC_EDIT_DFLTOP default_op, const char *edit_content,
406 NC_PARAMTYPE paramtype);
407
422struct nc_rpc *nc_rpc_establishsub(const char *filter, const char *stream_name, const char *start_time,
423 const char *stop_time, const char *encoding, NC_PARAMTYPE paramtype);
424
437struct nc_rpc *nc_rpc_modifysub(uint32_t id, const char *filter, const char *stop_time, NC_PARAMTYPE paramtype);
438
447struct nc_rpc *nc_rpc_deletesub(uint32_t id);
448
457struct nc_rpc *nc_rpc_killsub(uint32_t id);
458
474struct nc_rpc *nc_rpc_establishpush_periodic(const char *datastore, const char *filter, const char *stop_time,
475 const char *encoding, uint32_t period, const char *anchor_time, NC_PARAMTYPE paramtype);
476
493struct nc_rpc *nc_rpc_establishpush_onchange(const char *datastore, const char *filter, const char *stop_time,
494 const char *encoding, uint32_t dampening_period, int sync_on_start, const char **excluded_change,
495 NC_PARAMTYPE paramtype);
496
512struct nc_rpc *nc_rpc_modifypush_periodic(uint32_t id, const char *datastore, const char *filter, const char *stop_time,
513 uint32_t period, const char *anchor_time, NC_PARAMTYPE paramtype);
514
529struct nc_rpc *nc_rpc_modifypush_onchange(uint32_t id, const char *datastore, const char *filter, const char *stop_time,
530 uint32_t dampening_period, NC_PARAMTYPE paramtype);
531
540struct nc_rpc *nc_rpc_resyncsub(uint32_t id);
541
547void nc_rpc_free(struct nc_rpc *rpc);
548
551#ifdef __cplusplus
552}
553#endif
554
555#endif /* NC_MESSAGES_CLIENT_H_ */
uint16_t elem_count
Number of items in the elem array.
const char * tag
<error-tag>.
const char ** attr
<bad-attr>, array of the names of the data-model-specific XML attributes that caused the error....
const char * message
<error-message>, Human-readable description of the error.
const char * sid
<session-id>, session ID of the session holding the requested lock. Part of <error-info>.
const char * path
<error-path>, XPATH expression identifying the element with the error.
const char ** ns
<bad-namespace>, array of the unexpected XML namespaces that caused the error. Part of <error-info>.
uint16_t other_count
Number of items in the other array.
const char * message_lang
xml:lang attribute of the error-message.
struct lyd_node * other
List of the remaining non-standard opaque nodes.
const char * apptag
<error-app-tag>, the data-model-specific or implementation-specific error condition,...
uint16_t ns_count
Number of items in the ns array.
const char * severity
<error-severity>.
uint16_t attr_count
Number of items in the attr array.
const char * type
<error-type>, error layer where the error occurred.
const char ** elem
<bad-element>, array of the names of the data-model-specific XML element that caused the error....
struct nc_rpc * nc_rpc_getschema(const char *identifier, const char *version, const char *format, NC_PARAMTYPE paramtype)
Create NETCONF RPC <get-schema>
NC_RPC_EDIT_ERROPT
Enumeration of <edit-config> error option.
NC_RPC_EDIT_TESTOPT
Enumeration of <edit-config> test option.
struct nc_rpc * nc_rpc_delete(NC_DATASTORE target, const char *url, NC_PARAMTYPE paramtype)
Create NETCONF RPC <delete-config>
struct nc_rpc * nc_rpc_getdata(const char *datastore, const char *filter, const char *config_filter, char **origin_filter, int origin_filter_count, int neg_origin_filter, uint16_t max_depth, int with_origin, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype)
Create NETCONF RPC <get-data>
NC_RPC_EDIT_DFLTOP
Enumeration of <edit-config> default operation.
void nc_rpc_free(struct nc_rpc *rpc)
Free the NETCONF RPC object.
struct nc_rpc * nc_rpc_killsub(uint32_t id)
Create NETCONF RPC <kill-subscription>
struct nc_rpc * nc_rpc_unlock(NC_DATASTORE target)
Create NETCONF RPC <unlock>
struct nc_rpc * nc_rpc_subscribe(const char *stream_name, const char *filter, const char *start_time, const char *stop_time, NC_PARAMTYPE paramtype)
Create NETCONF RPC <create-subscription>
NC_RPC_TYPE
Enumeration of RPC types.
struct nc_rpc * nc_rpc_deletesub(uint32_t id)
Create NETCONF RPC <delete-subscription>
struct nc_rpc * nc_rpc_act_generic(const struct lyd_node *data, NC_PARAMTYPE paramtype)
Create a generic NETCONF RPC or action.
struct nc_rpc * nc_rpc_establishpush_onchange(const char *datastore, const char *filter, const char *stop_time, const char *encoding, uint32_t dampening_period, int sync_on_start, const char **excluded_change, NC_PARAMTYPE paramtype)
Create NETCONF RPC <establish-subscription> with augments from ietf-yang-push for an on-change subscr...
struct nc_rpc * nc_rpc_get(const char *filter, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype)
Create NETCONF RPC <get>
NC_RPC_TYPE nc_rpc_get_type(const struct nc_rpc *rpc)
Get the type of the RPC.
struct nc_rpc * nc_rpc_editdata(const char *datastore, NC_RPC_EDIT_DFLTOP default_op, const char *edit_content, NC_PARAMTYPE paramtype)
Create NETCONF RPC <get-data>
struct nc_rpc * nc_rpc_lock(NC_DATASTORE target)
Create NETCONF RPC <lock>
struct nc_rpc * nc_rpc_kill(uint32_t session_id)
Create NETCONF RPC <kill-session>
struct nc_rpc * nc_rpc_resyncsub(uint32_t id)
Create NETCONF RPC <resync-subscription>
struct nc_rpc * nc_rpc_getconfig(NC_DATASTORE source, const char *filter, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype)
Create NETCONF RPC <get-config>
struct nc_rpc * nc_rpc_validate(NC_DATASTORE source, const char *url_or_config, NC_PARAMTYPE paramtype)
Create NETCONF RPC <validate>
struct nc_rpc * nc_rpc_edit(NC_DATASTORE target, NC_RPC_EDIT_DFLTOP default_op, NC_RPC_EDIT_TESTOPT test_opt, NC_RPC_EDIT_ERROPT error_opt, const char *edit_content, NC_PARAMTYPE paramtype)
Create NETCONF RPC <edit-config>
struct nc_rpc * nc_rpc_cancel(const char *persist_id, NC_PARAMTYPE paramtype)
Create NETCONF RPC <cancel-commit>
struct nc_rpc * nc_rpc_establishpush_periodic(const char *datastore, const char *filter, const char *stop_time, const char *encoding, uint32_t period, const char *anchor_time, NC_PARAMTYPE paramtype)
Create NETCONF RPC <establish-subscription> with augments from ietf-yang-push for a periodic subscrip...
struct nc_rpc * nc_rpc_discard(void)
Create NETCONF RPC <discard-changes>
struct nc_rpc * nc_rpc_commit(int confirmed, uint32_t confirm_timeout, const char *persist, const char *persist_id, NC_PARAMTYPE paramtype)
Create NETCONF RPC <commit>
struct nc_rpc * nc_rpc_modifypush_onchange(uint32_t id, const char *datastore, const char *filter, const char *stop_time, uint32_t dampening_period, NC_PARAMTYPE paramtype)
Create NETCONF RPC <modify-subscription> with augments from ietf-yang-push for an on-change subscript...
struct nc_rpc * nc_rpc_act_generic_xml(const char *xml_str, NC_PARAMTYPE paramtype)
Create a generic NETCONF RPC or action from an XML string.
struct nc_rpc * nc_rpc_establishsub(const char *filter, const char *stream_name, const char *start_time, const char *stop_time, const char *encoding, NC_PARAMTYPE paramtype)
Create NETCONF RPC <establish-subscription>
struct nc_rpc * nc_rpc_modifysub(uint32_t id, const char *filter, const char *stop_time, NC_PARAMTYPE paramtype)
Create NETCONF RPC <modify-subscription>
struct nc_rpc * nc_rpc_copy(NC_DATASTORE target, const char *url_trg, NC_DATASTORE source, const char *url_or_config_src, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype)
Create NETCONF RPC <copy-config>
struct nc_rpc * nc_rpc_modifypush_periodic(uint32_t id, const char *datastore, const char *filter, const char *stop_time, uint32_t period, const char *anchor_time, NC_PARAMTYPE paramtype)
Create NETCONF RPC <modify-subscription> with augments from ietf-yang-push for a periodic subscriptio...
@ NC_RPC_EDIT_ERROPT_STOP
@ NC_RPC_EDIT_ERROPT_CONTINUE
@ NC_RPC_EDIT_ERROPT_UNKNOWN
@ NC_RPC_EDIT_ERROPT_ROLLBACK
@ NC_RPC_EDIT_TESTOPT_TESTSET
@ NC_RPC_EDIT_TESTOPT_TEST
@ NC_RPC_EDIT_TESTOPT_UNKNOWN
@ NC_RPC_EDIT_TESTOPT_SET
@ NC_RPC_EDIT_DFLTOP_UNKNOWN
@ NC_RPC_EDIT_DFLTOP_MERGE
@ NC_RPC_EDIT_DFLTOP_NONE
@ NC_RPC_EDIT_DFLTOP_REPLACE
@ NC_RPC_KILL
@ NC_RPC_DISCARD
@ NC_RPC_ACT_GENERIC
@ NC_RPC_COPY
@ NC_RPC_UNLOCK
@ NC_RPC_ESTABLISHPUSH
@ NC_RPC_MODIFYSUB
@ NC_RPC_GETCONFIG
@ NC_RPC_GETDATA
@ NC_RPC_CANCEL
@ NC_RPC_DELETESUB
@ NC_RPC_GET
@ NC_RPC_COMMIT
@ NC_RPC_KILLSUB
@ NC_RPC_EDITDATA
@ NC_RPC_MODIFYPUSH
@ NC_RPC_LOCK
@ NC_RPC_SUBSCRIBE
@ NC_RPC_EDIT
@ NC_RPC_VALIDATE
@ NC_RPC_ESTABLISHSUB
@ NC_RPC_UNKNOWN
@ NC_RPC_DELETE
@ NC_RPC_RESYNCSUB
@ NC_RPC_GETSCHEMA
NETCONF error structure representation.
NETCONF client RPC object.
enum NC_WITHDEFAULTS_MODE NC_WD_MODE
Enumeration of NETCONF with-defaults capability modes.
enum NC_DATASTORE_TYPE NC_DATASTORE
Enumeration of the supported types of datastores defined by NETCONF.
NC_PARAMTYPE
Enumeration of function parameter treatments.
Definition netconf.h:122
libnetconf2's general public functions and structures definitions.