Loading...
Searching...
No Matches
Client Messages
Client

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

Collaboration diagram for Client Messages:

## Data Structures

struct | nc_err
| NETCONF error structure representation. More...
struct | nc_rpc
| NETCONF client RPC object. More...

## Enumerations

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_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...
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_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 , NC_RPC_ESTABLISHSUB , NC_RPC_MODIFYSUB ,
NC_RPC_DELETESUB , NC_RPC_KILLSUB , NC_RPC_ESTABLISHPUSH , NC_RPC_MODIFYPUSH ,
NC_RPC_RESYNCSUB
}

| Enumeration of RPC types. More...

## Functions

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_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_cancel (const char *persist_id, NC_PARAMTYPE paramtype)
| Create NETCONF RPC <cancel-commit>
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_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_delete (NC_DATASTORE target, const char *url, NC_PARAMTYPE paramtype)
| Create NETCONF RPC <delete-config>
struct nc_rpc * | nc_rpc_deletesub (uint32_t id)
| Create NETCONF RPC <delete-subscription>
struct nc_rpc * | nc_rpc_discard (void)
| Create NETCONF RPC <discard-changes>
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_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_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 subscription.
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 subscription.
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>
void | nc_rpc_free (struct nc_rpc *rpc)
| Free the NETCONF RPC object.
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_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_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>
struct nc_rpc * | nc_rpc_getschema (const char *identifier, const char *version, const char *format, NC_PARAMTYPE paramtype)
| Create NETCONF RPC <get-schema>
struct nc_rpc * | nc_rpc_kill (uint32_t session_id)
| Create NETCONF RPC <kill-session>
struct nc_rpc * | nc_rpc_killsub (uint32_t id)
| Create NETCONF RPC <kill-subscription>
struct nc_rpc * | nc_rpc_lock (NC_DATASTORE target)
| Create NETCONF RPC <lock>
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 subscription.
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 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_resyncsub (uint32_t id)
| Create NETCONF RPC <resync-subscription>
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>
struct nc_rpc * | nc_rpc_unlock (NC_DATASTORE target)
| Create NETCONF RPC <unlock>
struct nc_rpc * | nc_rpc_validate (NC_DATASTORE source, const char *url_or_config, NC_PARAMTYPE paramtype)
| Create NETCONF RPC <validate>

## Detailed Description

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

## Data Structure Documentation

## nc_err

struct nc_err

NETCONF error structure representation.

Definition at line 113 of file messages_client.h.

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

## nc_rpc

struct nc_rpc

NETCONF client RPC object.

Note that any stored parameters are not checked for validity because it is performed 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. An RPC object can be sent via any NETCONF session which supports all the needed NETCONF capabilities for the RPC.

## Enumeration Type Documentation

## NC_RPC_EDIT_DFLTOP

enum NC_RPC_EDIT_DFLTOP

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 83 of file messages_client.h.

## NC_RPC_EDIT_ERROPT

enum NC_RPC_EDIT_ERROPT

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 103 of file messages_client.h.

## NC_RPC_EDIT_TESTOPT

enum NC_RPC_EDIT_TESTOPT

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 93 of file messages_client.h.

## NC_RPC_TYPE

enum NC_RPC_TYPE

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.
NC_RPC_ESTABLISHSUB | <establish-subscription> RPC.
NC_RPC_MODIFYSUB | <modify-subscription> RPC.
NC_RPC_DELETESUB | <delete-subscription> RPC.
NC_RPC_KILLSUB | <kill-subscription> RPC.
NC_RPC_ESTABLISHPUSH | <establish-subscription> RPC with augments.
NC_RPC_MODIFYPUSH | <modify-subscription> RPC with augments.
NC_RPC_RESYNCSUB | <resync-subscription> RPC.

Definition at line 40 of file messages_client.h.

## Function Documentation

## nc_rpc_act_generic()

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`.

Note
  In case of action, the <action> element is added automatically and should not be in `data`.

Parameters

  [in] | data | NETCONF RPC data as a data tree.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_act_generic_xml()

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.

For details, see nc_rpc.

Note
  In case of action, the <action> element is added automatically and should not be in `xml_str`.

Parameters

  [in] | xml_str | NETCONF RPC data as an XML string.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_cancel()

struct nc_rpc * nc_rpc_cancel | ( | const char * | persist_id,
|  | NC_PARAMTYPE | paramtype
| ) |  |

Create NETCONF RPC <cancel-commit>

For details, see nc_rpc.

Parameters

  [in] | persist_id | Optional identification string of a persistent confirmed commit.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_commit()

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>

For details, see nc_rpc.

Parameters

  [in] | confirmed | Whether the commit is to be confirmed.
  [in] | confirm_timeout | Optional confirm timeout.
  [in] | persist | Optional identification string of a new persistent confirmed commit.
  [in] | persist_id | Optional identification string of a persistent confirmed commit to be commited.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_copy()

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>

For details, see nc_rpc.

Parameters

  [in] | target | Target datastore.
  [in] | url_trg | Used instead `target` if the target is an URL.
  [in] | source | Source datastore.
  [in] | url_or_config_src | Used instead `source` if the source is an URL or a config.
  [in] | wd_mode | Optional with-defaults capability mode.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_delete()

struct nc_rpc * nc_rpc_delete | ( | NC_DATASTORE | target,
|  | const char * | url,
|  | NC_PARAMTYPE | paramtype
| ) |  |

Create NETCONF RPC <delete-config>

For details, see nc_rpc.

Parameters

  [in] | target | Target datastore to delete.
  [in] | url | Used instead `target` if the target is an URL.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_deletesub()

struct nc_rpc * nc_rpc_deletesub | ( | uint32_t | id | ) |

Create NETCONF RPC <delete-subscription>

For details, see nc_rpc.

Parameters

  [in] | id | Subscription ID to delete.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_discard()

struct nc_rpc * nc_rpc_discard | ( | void |  | ) |

Create NETCONF RPC <discard-changes>

For details, see nc_rpc.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_edit()

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>

For details, see nc_rpc.

Parameters

  [in] | target | Target datastore being edited.
  [in] | default_op | Optional default operation.
  [in] | test_opt | Optional test option.
  [in] | error_opt | Optional error option.
  [in] | edit_content | Config or URL where the config to perform is to be found.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_editdata()

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>

For details, see nc_rpc.

Parameters

  [in] | datastore | Source datastore, foreign identity so a module name prefix is required.
  [in] | default_op | Optional default operation.
  [in] | edit_content | Config or URL where the config to perform is to be found.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_establishpush_onchange()

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 subscription.

For details, see nc_rpc.

Parameters

  [in] | datastore | Source datastore, foreign identity so a module name prefix is required.
  [in] | filter | Optional filter data, an XML subtree, XPath expression (with JSON prefixes), or filter reference, selected based on the first character.
  [in] | stop_time | Optional YANG datetime identifying the end of the subscription.
  [in] | encoding | Optional specific encoding to use.
  [in] | dampening_period | Optional dampening period of the notifications.
  [in] | sync_on_start | Whether to send a full push-update notification on subscription start.
  [in] | excluded_change | Optional NULL-terminated array of excluded changes.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_establishpush_periodic()

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 subscription.

For details, see nc_rpc.

Parameters

  [in] | datastore | Source datastore, foreign identity so a module name prefix is required.
  [in] | filter | Optional filter data, an XML subtree, XPath expression (with JSON prefixes), or filter reference, selected based on the first character.
  [in] | stop_time | Optional YANG datetime identifying the end of the subscription.
  [in] | encoding | Optional specific encoding to use.
  [in] | period | Subscription period in centiseconds (0.01s).
  [in] | anchor_time | Optional anchor datetime for the period.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_establishsub()

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>

For details, see nc_rpc.

Parameters

  [in] | filter | Optional filter data, an XML subtree, XPath expression (with JSON prefixes), or filter reference, selected based on the first character.
  [in] | stream_name | Name of a NETCONF stream to subscribe to.
  [in] | start_time | Optional YANG datetime identifying the start of the subscription.
  [in] | stop_time | Optional YANG datetime identifying the end of the subscription.
  [in] | encoding | Optional specific encoding to use.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_free()

void nc_rpc_free | ( | struct nc_rpc * | rpc | ) |

Free the NETCONF RPC object.

Parameters

  [in] | rpc | Object to free.

## nc_rpc_get()

struct nc_rpc * nc_rpc_get | ( | const char * | filter,
|  | NC_WD_MODE | wd_mode,
|  | NC_PARAMTYPE | paramtype
| ) |  |

Create NETCONF RPC <get>

For details, see nc_rpc.

Parameters

  [in] | filter | Optional filter data, an XML subtree or XPath expression (with JSON prefixes).
  [in] | wd_mode | Optional with-defaults capability mode.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_get_type()

NC_RPC_TYPE nc_rpc_get_type | ( | const struct nc_rpc * | rpc | ) |

Get the type of the RPC.

Parameters

  [in] | rpc | RPC to check the type of.

Returns
  Type of `rpc`.

## nc_rpc_getconfig()

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>

For details, see nc_rpc.

Parameters

  [in] | source | Source datastore being queried.
  [in] | filter | Optional filter data, an XML subtree or XPath expression (with JSON prefixes).
  [in] | wd_mode | Optional with-defaults capability mode.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_getdata()

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>

For details, see nc_rpc.

Parameters

  [in] | datastore | Source datastore, foreign identity so a module name prefix is required.
  [in] | filter | Optional filter data, an XML subtree or XPath expression (with JSON prefixes).
  [in] | config_filter | Optional config filter, "true" for config-only data, "false" for state-only data.
  [in] | origin_filter | Optional origin filter array, selects only nodes of this or derived origin.
  [in] | origin_filter_count | Count of filters is `origin_filter`.
  [in] | neg_origin_filter | Whether origin filters are negated or not.
  [in] | max_depth | Maximum depth of returned subtrees, 0 for unlimited.
  [in] | with_origin | Whether return data origin.
  [in] | wd_mode | Optional with-defaults capability mode.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_getschema()

struct nc_rpc * nc_rpc_getschema | ( | const char * | identifier,
|  | const char * | version,
|  | const char * | format,
|  | NC_PARAMTYPE | paramtype
| ) |  |

Create NETCONF RPC <get-schema>

For details, see nc_rpc.

Parameters

  [in] | identifier | Requested model identifier.
  [in] | version | Optional model version, either YANG version (1.0/1.1) or revision date.
  [in] | format | Optional format of the model (default is YANG).
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_kill()

struct nc_rpc * nc_rpc_kill | ( | uint32_t | session_id | ) |

Create NETCONF RPC <kill-session>

For details, see nc_rpc.

Parameters

  [in] | session_id | Session ID of the session to kill.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_killsub()

struct nc_rpc * nc_rpc_killsub | ( | uint32_t | id | ) |

Create NETCONF RPC <kill-subscription>

For details, see nc_rpc.

Parameters

  [in] | id | Subscription ID to kill.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_lock()

struct nc_rpc * nc_rpc_lock | ( | NC_DATASTORE | target | ) |

Create NETCONF RPC <lock>

For details, see nc_rpc.

Parameters

  [in] | target | Target datastore of the operation.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_modifypush_onchange()

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 subscription.

For details, see nc_rpc.

Parameters

  [in] | id | Subscription ID to modify.
  [in] | datastore | Source datastore, foreign identity so a module name prefix is required.
  [in] | filter | Optional filter data, an XML subtree, XPath expression (with JSON prefixes), or filter reference, selected based on the first character.
  [in] | stop_time | Optional YANG datetime identifying the end of the subscription.
  [in] | dampening_period | Optional dampening period of the notifications.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_modifypush_periodic()

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 subscription.

For details, see nc_rpc.

Parameters

  [in] | id | Subscription ID to modify.
  [in] | datastore | Source datastore, foreign identity so a module name prefix is required.
  [in] | filter | Optional filter data, an XML subtree, XPath expression (with JSON prefixes), or filter reference, selected based on the first character.
  [in] | stop_time | Optional YANG datetime identifying the end of the subscription.
  [in] | period | Subscription period in centiseconds (0.01s).
  [in] | anchor_time | Optional anchor datetime for the period.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_modifysub()

struct nc_rpc * nc_rpc_modifysub | ( | uint32_t | id,
|  | const char * | filter,
|  | const char * | stop_time,
|  | NC_PARAMTYPE | paramtype
| ) |  |

Create NETCONF RPC <modify-subscription>

For details, see nc_rpc.

Parameters

  [in] | id | Subscription ID to modify.
  [in] | filter | Optional new filter data, an XML subtree, XPath expression (with JSON prefixes), or filter reference, selected based on the first character.
  [in] | stop_time | Optional new YANG datetime identifying the end of the subscription.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_resyncsub()

struct nc_rpc * nc_rpc_resyncsub | ( | uint32_t | id | ) |

Create NETCONF RPC <resync-subscription>

For details, see nc_rpc.

Parameters

  [in] | id | Subscription ID to resync.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_subscribe()

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>

For details, see nc_rpc.

Parameters

  [in] | stream_name | Optional name of a NETCONF stream to subscribe to.
  [in] | filter | Optional filter data, an XML subtree or XPath expression (with JSON prefixes).
  [in] | start_time | Optional YANG datetime identifying the start of the subscription.
  [in] | stop_time | Optional YANG datetime identifying the end of the subscription.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_unlock()

struct nc_rpc * nc_rpc_unlock | ( | NC_DATASTORE | target | ) |

Create NETCONF RPC <unlock>

For details, see nc_rpc.

Parameters

  [in] | target | Target datastore of the operation.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.

## nc_rpc_validate()

struct nc_rpc * nc_rpc_validate | ( | NC_DATASTORE | source,
|  | const char * | url_or_config,
|  | NC_PARAMTYPE | paramtype
| ) |  |

Create NETCONF RPC <validate>

For details, see nc_rpc.

Parameters

  [in] | source | Source datastore being validated.
  [in] | url_or_config | Used instead `source` if the source is an URL or a config.
  [in] | paramtype | How to further manage data parameters.

Returns
  Created RPC object to send via a NETCONF session or NULL in case of (memory allocation) error.