libnetconf2  1.1.48
NETCONF library for clients and servers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Client Messages

Functions to create NETCONF RPCs (or actions) and process replies received from the server. More...

Data Structures

struct  nc_err
 NETCONF error structure representation. More...
 
struct  nc_reply
 NETCONF client rpc-reply object. More...
 
struct  nc_reply_data
 NETCONF client data rpc-reply object. More...
 
struct  nc_reply_error
 NETCONF client error rpc-reply object. More...
 
struct  nc_notif
 NETCONF client notification object. More...
 

Enumerations

enum  NC_RPC_TYPE {
  NC_RPC_UNKNOWN = 0, NC_RPC_ACT_GENERIC, NC_RPC_GETCONFIG, NC_RPC_EDIT,
  NC_RPC_COPY, NC_RPC_DELETE, NC_RPC_LOCK, NC_RPC_UNLOCK,
  NC_RPC_GET, NC_RPC_KILL, NC_RPC_COMMIT, NC_RPC_DISCARD,
  NC_RPC_CANCEL, NC_RPC_VALIDATE, NC_RPC_GETSCHEMA, NC_RPC_SUBSCRIBE,
  NC_RPC_GETDATA, NC_RPC_EDITDATA
}
 Enumeration of RPC types. More...
 
enum  NC_RPC_EDIT_DFLTOP { NC_RPC_EDIT_DFLTOP_UNKNOWN = 0, NC_RPC_EDIT_DFLTOP_MERGE, NC_RPC_EDIT_DFLTOP_REPLACE, NC_RPC_EDIT_DFLTOP_NONE }
 Enumeration of <edit-config> default operation. More...
 
enum  NC_RPC_EDIT_TESTOPT { NC_RPC_EDIT_TESTOPT_UNKNOWN = 0, NC_RPC_EDIT_TESTOPT_TESTSET, NC_RPC_EDIT_TESTOPT_SET, NC_RPC_EDIT_TESTOPT_TEST }
 Enumeration of <edit-config> test option. More...
 
enum  NC_RPC_EDIT_ERROPT { NC_RPC_EDIT_ERROPT_UNKNOWN = 0, NC_RPC_EDIT_ERROPT_STOP, NC_RPC_EDIT_ERROPT_CONTINUE, NC_RPC_EDIT_ERROPT_ROLLBACK }
 Enumeration of <edit-config> error option. More...
 

Functions

NC_RPC_TYPE nc_rpc_get_type (const struct nc_rpc *rpc)
 Get the type of the RPC. More...
 
struct nc_rpc * nc_rpc_act_generic (const struct lyd_node *data, NC_PARAMTYPE paramtype)
 Create a generic NETCONF RPC or action. More...
 
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. More...
 
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> More...
 
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> More...
 
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> More...
 
struct nc_rpc * nc_rpc_delete (NC_DATASTORE target, const char *url, NC_PARAMTYPE paramtype)
 Create NETCONF RPC <delete-config> More...
 
struct nc_rpc * nc_rpc_lock (NC_DATASTORE target)
 Create NETCONF RPC <lock> More...
 
struct nc_rpc * nc_rpc_unlock (NC_DATASTORE target)
 Create NETCONF RPC <unlock> More...
 
struct nc_rpc * nc_rpc_get (const char *filter, NC_WD_MODE wd_mode, NC_PARAMTYPE paramtype)
 Create NETCONF RPC <get> More...
 
struct nc_rpc * nc_rpc_kill (uint32_t session_id)
 Create NETCONF RPC <kill-session> More...
 
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> More...
 
struct nc_rpc * nc_rpc_discard (void)
 Create NETCONF RPC <discard-changes> More...
 
struct nc_rpc * nc_rpc_cancel (const char *persist_id, NC_PARAMTYPE paramtype)
 Create NETCONF RPC <cancel-commit> More...
 
struct nc_rpc * nc_rpc_validate (NC_DATASTORE source, const char *url_or_config, NC_PARAMTYPE paramtype)
 Create NETCONF RPC <validate> More...
 
struct nc_rpc * nc_rpc_getschema (const char *identifier, const char *version, const char *format, NC_PARAMTYPE paramtype)
 Create NETCONF RPC <get-schema> More...
 
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> More...
 
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> More...
 
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> More...
 
void nc_rpc_free (struct nc_rpc *rpc)
 Free the NETCONF RPC object. More...
 
void nc_reply_free (struct nc_reply *reply)
 Free the NETCONF RPC reply object. More...
 
void nc_notif_free (struct nc_notif *notif)
 Free the NETCONF Notification object. More...
 

Detailed Description

Functions to create NETCONF RPCs (or actions) and process replies received from the server.


Data Structure Documentation

struct nc_err

NETCONF error structure representation.

Definition at line 102 of file messages_client.h.

Data Fields
const char * type <error-type>, error layer where the error occurred.
const char * tag <error-tag>.
const char * severity <error-severity>.
const char * apptag <error-app-tag>, the data-model-specific or implementation-specific error condition, if one exists.
const char * path <error-path>, XPATH expression identifying the element with the error.
const char * message <error-message>, Human-readable description of the error.
const char * message_lang xml:lang attribute of the error-message.
const char * sid <session-id>, session ID of the session holding the requested lock. Part of <error-info>.
const char ** attr <bad-attr>, array of the names of the data-model-specific XML attributes that caused the error. Part of <error-info>.
const char ** elem <bad-element>, array of the names of the data-model-specific XML element that caused the error. Part of <error-info>.
const char ** ns <bad-namespace>, array of the unexpected XML namespaces that caused the error. Part of <error-info>.
struct lyxml_elem ** other Array of the remaining non-standard elements.
uint16_t attr_count Number of items in the attr array.
uint16_t elem_count Number of items in the elem array.
uint16_t ns_count Number of items in the ns array.
uint16_t other_count Number of items in the other array.
struct nc_reply

NETCONF client rpc-reply object.

Definition at line 149 of file messages_client.h.

Data Fields
NC_RPL type

reply type

struct nc_reply_data

NETCONF client data rpc-reply object.

Definition at line 156 of file messages_client.h.

Data Fields
NC_RPL type

NC_RPL_DATA

struct lyd_node * data

libyang RPC reply data tree (output of an RPC), <get> and <get-config> replies are special, in those cases there is the configuration itself, it should be validated as such (using LYD_OPT_GET or LYD_OPT_GETCONFIG), and it can be NULL in a valid reply.

struct nc_reply_error

NETCONF client error rpc-reply object.

Definition at line 168 of file messages_client.h.

Data Fields
NC_RPL type

NC_RPL_ERROR

struct nc_err * err

errors, any of the values inside can be NULL

uint32_t count

number of error structures

struct nc_notif

NETCONF client notification object.

Definition at line 177 of file messages_client.h.

Data Fields
NC_RPL type

NC_RPL_NOTIF

const char * datetime

eventTime of the notification

struct lyd_node * tree

libyang data tree of the message

Enumeration Type Documentation

Enumeration of RPC types.

Note that NC_RPC_CLOSE is not defined since sending <close-session> is done implicitly by nc_session_free()

Enumerator
NC_RPC_UNKNOWN 

invalid RPC.

NC_RPC_ACT_GENERIC 

user-defined generic RPC/action.

NC_RPC_GETCONFIG 

<get-config> RPC.

NC_RPC_EDIT 

<edit-config> RPC.

NC_RPC_COPY 

<copy-config> RPC.

NC_RPC_DELETE 

<delete-config> RPC.

NC_RPC_LOCK 

<lock> RPC.

NC_RPC_UNLOCK 

<unlock> RPC.

NC_RPC_GET 

<get> RPC.

NC_RPC_KILL 

<kill-session> RPC.

NC_RPC_COMMIT 

<commit> RPC.

NC_RPC_DISCARD 

<discard-changes> RPC.

NC_RPC_CANCEL 

<cancel-commit> RPC.

NC_RPC_VALIDATE 

<validate> RPC.

NC_RPC_GETSCHEMA 

<get-schema> RPC.

NC_RPC_SUBSCRIBE 

<create-subscription> RPC.

NC_RPC_GETDATA 

<get-data> RPC.

NC_RPC_EDITDATA 

<edit-data> RPC.

Definition at line 40 of file messages_client.h.

Enumeration of <edit-config> default operation.

Enumerator
NC_RPC_EDIT_DFLTOP_UNKNOWN 

unknown default operation

NC_RPC_EDIT_DFLTOP_MERGE 

default operation merge

NC_RPC_EDIT_DFLTOP_REPLACE 

default operation replace

NC_RPC_EDIT_DFLTOP_NONE 

default operation none

Definition at line 72 of file messages_client.h.

Enumeration of <edit-config> test option.

Enumerator
NC_RPC_EDIT_TESTOPT_UNKNOWN 

unknown test option

NC_RPC_EDIT_TESTOPT_TESTSET 

test-then-set option

NC_RPC_EDIT_TESTOPT_SET 

set option

NC_RPC_EDIT_TESTOPT_TEST 

test-only option

Definition at line 82 of file messages_client.h.

Enumeration of <edit-config> error option.

Enumerator
NC_RPC_EDIT_ERROPT_UNKNOWN 

unknown error option

NC_RPC_EDIT_ERROPT_STOP 

stop-on-error option

NC_RPC_EDIT_ERROPT_CONTINUE 

continue-on-error option

NC_RPC_EDIT_ERROPT_ROLLBACK 

rollback-on-error option

Definition at line 92 of file messages_client.h.

Function Documentation

NC_RPC_TYPE nc_rpc_get_type ( const struct nc_rpc *  rpc)

Get the type of the RPC.

Parameters
[in]rpcRPC to check the type of.
Returns
Type of rpc.
struct nc_rpc* nc_rpc_act_generic ( const struct lyd_node *  data,
NC_PARAMTYPE  paramtype 
)

Create a generic NETCONF RPC or action.

Note that created object can be sent via any NETCONF session that shares the context of the data.

Parameters
[in]dataNETCONF RPC data as a data tree.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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.

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]xml_strNETCONF RPC data as an XML string.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]sourceSource datastore being queried.
[in]filterOptional filter data, an XML subtree or XPath expression (with JSON prefixes).
[in]wd_modeOptional with-defaults capability mode.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]targetTarget datastore being edited.
[in]default_opOptional default operation.
[in]test_optOptional test option.
[in]error_optOptional error option.
[in]edit_contentConfig or URL where the config to perform is to be found.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]targetTarget datastore.
[in]url_trgUsed instead target if the target is an URL.
[in]sourceSource datastore.
[in]url_or_config_srcUsed instead source if the source is an URL or a config.
[in]wd_modeOptional with-defaults capability mode.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_delete ( NC_DATASTORE  target,
const char *  url,
NC_PARAMTYPE  paramtype 
)

Create NETCONF RPC <delete-config>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]targetTarget datastore to delete.
[in]urlUsed instead target if the target is an URL.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_lock ( NC_DATASTORE  target)

Create NETCONF RPC <lock>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]targetTarget datastore of the operation.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_unlock ( NC_DATASTORE  target)

Create NETCONF RPC <unlock>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]targetTarget datastore of the operation.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_get ( const char *  filter,
NC_WD_MODE  wd_mode,
NC_PARAMTYPE  paramtype 
)

Create NETCONF RPC <get>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]filterOptional filter data, an XML subtree or XPath expression (with JSON prefixes).
[in]wd_modeOptional with-defaults capability mode.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_kill ( uint32_t  session_id)

Create NETCONF RPC <kill-session>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]session_idSession ID of the session to kill.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]confirmedWhether the commit is to be confirmed.
[in]confirm_timeoutOptional confirm timeout.
[in]persistOptional identification string of a new persistent confirmed commit.
[in]persist_idOptional identification string of a persistent confirmed commit to be commited.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_discard ( void  )

Create NETCONF RPC <discard-changes>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_cancel ( const char *  persist_id,
NC_PARAMTYPE  paramtype 
)

Create NETCONF RPC <cancel-commit>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]persist_idOptional identification string of a persistent confirmed commit.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_validate ( NC_DATASTORE  source,
const char *  url_or_config,
NC_PARAMTYPE  paramtype 
)

Create NETCONF RPC <validate>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]sourceSource datastore being validated.
[in]url_or_configUsed instead source if the source is an URL or a config.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
struct nc_rpc* nc_rpc_getschema ( const char *  identifier,
const char *  version,
const char *  format,
NC_PARAMTYPE  paramtype 
)

Create NETCONF RPC <get-schema>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]identifierRequested model identifier.
[in]versionOptional model version, either YANG version (1.0/1.1) or revision date.
[in]formatOptional format of the model (default is YANG).
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]stream_nameOptional name of a NETCONF stream to subscribe to.
[in]filterOptional filter data, an XML subtree or XPath expression (with JSON prefixes).
[in]start_timeOptional YANG datetime identifying the start of the subscription.
[in]stop_timeOptional YANG datetime identifying the end of the subscription.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]datastoreSource datastore, foreign identity so a module name prefix is required.
[in]filterOptional filter data, an XML subtree or XPath expression (with JSON prefixes).
[in]config_filterOptional config filter, "true" for config-only data, "false" for state-only data.
[in]origin_filterOptional origin filter array, selects only nodes of this or derived origin.
[in]origin_filter_countCount of filters is origin_filter.
[in]neg_origin_filterWhether origin filters are negated or not.
[in]max_depthMaximum depth of returned subtrees, 0 for unlimited.
[in]with_originWhether return data origin.
[in]wd_modeOptional with-defaults capability mode.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
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>

Note that functions to create any RPC object do not check validity of the provided parameters. It is checked later while sending the RPC via a specific NETCONF session (nc_send_rpc()) since the NETCONF capabilities of the session are needed for such a check. Created object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

Parameters
[in]datastoreSource datastore, foreign identity so a module name prefix is required.
[in]default_opOptional default operation.
[in]edit_contentConfig or URL where the config to perform is to be found.
[in]paramtypeHow to further manage data parameters.
Returns
Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.
void nc_rpc_free ( struct nc_rpc *  rpc)

Free the NETCONF RPC object.

Parameters
[in]rpcObject to free.
void nc_reply_free ( struct nc_reply reply)

Free the NETCONF RPC reply object.

Parameters
[in]replyObject to free.
void nc_notif_free ( struct nc_notif notif)

Free the NETCONF Notification object.

Parameters
[in]notifObject to free.