libnetconf2  3.5.1
NETCONF server and client library in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Call Home Server Configuration Functions

Call Home server configuration functions. More...

Collaboration diagram for Call Home Server Configuration Functions:

Functions

int nc_server_config_add_ch_address_port (const struct ly_ctx *ctx, const char *client_name, const char *endpt_name, NC_TRANSPORT_IMPL transport, const char *address, const char *port, struct lyd_node **config)
 Creates new YANG configuration data nodes for a Call Home client's address and port. More...
 
int nc_server_config_add_ch_anchor_time (const struct ly_ctx *ctx, const char *client_name, const char *anchor_time, struct lyd_node **config)
 Creates new YANG configuration data nodes for the anchor time parameter of the Call Home periodic connection type. More...
 
int nc_server_config_add_ch_idle_timeout (const struct ly_ctx *ctx, const char *client_name, uint16_t idle_timeout, struct lyd_node **config)
 Creates new YANG configuration data nodes for the idle timeout parameter of the Call Home periodic connection type. More...
 
int nc_server_config_add_ch_period (const struct ly_ctx *ctx, const char *client_name, uint16_t period, struct lyd_node **config)
 Creates new YANG configuration data nodes for the period parameter of the Call Home periodic connection type. More...
 
int nc_server_config_add_ch_persistent (const struct ly_ctx *ctx, const char *client_name, struct lyd_node **config)
 Creates new YANG configuration data nodes for the Call Home persistent connection type. More...
 
int nc_server_config_add_ch_reconnect_strategy (const struct ly_ctx *ctx, const char *client_name, NC_CH_START_WITH start_with, uint16_t max_wait, uint8_t max_attempts, struct lyd_node **config)
 Creates new YANG configuration data nodes for the Call Home reconnect strategy. More...
 
int nc_server_config_del_ch_anchor_time (const char *client_name, struct lyd_node **config)
 Deletes the Call Home anchor time parameter of the periodic connection type from the YANG data. More...
 
int nc_server_config_del_ch_client (const char *client_name, struct lyd_node **config)
 Deletes a Call Home client from the YANG data. More...
 
int nc_server_config_del_ch_endpt (const char *client_name, const char *endpt_name, struct lyd_node **config)
 Deletes a Call Home endpoint from the YANG data. More...
 
int nc_server_config_del_ch_idle_timeout (const char *client_name, struct lyd_node **config)
 Deletes the Call Home idle timeout parameter of the periodic connection type from the YANG data. More...
 
int nc_server_config_del_ch_period (const char *client_name, struct lyd_node **config)
 Deletes the Call Home period parameter of the periodic connection type from the YANG data. More...
 
int nc_server_config_del_ch_reconnect_strategy (const char *client_name, struct lyd_node **config)
 Resets the values of the Call Home reconnect strategy nodes to their defaults. More...
 

Detailed Description

Call Home server configuration functions.

Call Home Server Configuration

Function Documentation

int nc_server_config_add_ch_address_port ( const struct ly_ctx *  ctx,
const char *  client_name,
const char *  endpt_name,
NC_TRANSPORT_IMPL  transport,
const char *  address,
const char *  port,
struct lyd_node **  config 
)

Creates new YANG configuration data nodes for a Call Home client's address and port.

Parameters
[in]ctxlibyang context.
[in]client_nameArbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed.
[in]endpt_nameArbitrary identifier of the client's endpoint. If the client's endpoint with this identifier already exists, its contents will be changed.
[in]transportTransport protocol to be used on this endpoint - either SSH or TLS.
[in]addressAddress to connect to.
[in]portPort to connect to.
[in,out]configConfiguration YANG data tree. If *config is NULL, it will be created. Otherwise the new YANG data will be added to the previous data and may override it.
Returns
0 on success, non-zero otherwise.
int nc_server_config_del_ch_client ( const char *  client_name,
struct lyd_node **  config 
)

Deletes a Call Home client from the YANG data.

Parameters
[in]client_nameOptional identifier of a client to be deleted. If NULL, all of the Call Home clients will be deleted.
[in,out]configModified configuration YANG data tree.
Returns
0 on success, non-zero otherwise.
int nc_server_config_del_ch_endpt ( const char *  client_name,
const char *  endpt_name,
struct lyd_node **  config 
)

Deletes a Call Home endpoint from the YANG data.

Parameters
[in]client_nameIdentifier of an existing Call Home client.
[in]endpt_nameOptional identifier of a CH endpoint to be deleted. If NULL, all of the CH endpoints which belong to the given client will be deleted.
[in,out]configModified configuration YANG data tree.
Returns
0 on success, non-zero otherwise.
int nc_server_config_add_ch_persistent ( const struct ly_ctx *  ctx,
const char *  client_name,
struct lyd_node **  config 
)

Creates new YANG configuration data nodes for the Call Home persistent connection type.

This is the default connection type. If periodic connection type was set before, it will be unset.

Parameters
[in]ctxlibyang context.
[in]client_nameArbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed.
[in,out]configConfiguration YANG data tree. If *config is NULL, it will be created. Otherwise the new YANG data will be added to the previous data and may override it.
Returns
0 on success, non-zero otherwise.
int nc_server_config_add_ch_period ( const struct ly_ctx *  ctx,
const char *  client_name,
uint16_t  period,
struct lyd_node **  config 
)

Creates new YANG configuration data nodes for the period parameter of the Call Home periodic connection type.

If called, the persistent connection type will be replaced by periodic.

Parameters
[in]ctxlibyang context.
[in]client_nameArbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed.
[in]periodDuration between periodic connections in minutes.
[in,out]configConfiguration YANG data tree. If *config is NULL, it will be created. Otherwise the new YANG data will be added to the previous data and may override it.
Returns
0 on success, non-zero otherwise.
int nc_server_config_del_ch_period ( const char *  client_name,
struct lyd_node **  config 
)

Deletes the Call Home period parameter of the periodic connection type from the YANG data.

This behaves the same as setting the period to 60 minutes, which is the default value of this node.

Parameters
[in]client_nameIdentifier of an existing Call Home client.
[in,out]configModified configuration YANG data tree.
Returns
0 on success, non-zero otherwise.
int nc_server_config_add_ch_anchor_time ( const struct ly_ctx *  ctx,
const char *  client_name,
const char *  anchor_time,
struct lyd_node **  config 
)

Creates new YANG configuration data nodes for the anchor time parameter of the Call Home periodic connection type.

If called, the persistent connection type will be replaced by periodic.

Parameters
[in]ctxlibyang context.
[in]client_nameArbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed.
[in]anchor_timeTimestamp before or after which a series of periodic connections are determined.
[in,out]configConfiguration YANG data tree. If *config is NULL, it will be created. Otherwise the new YANG data will be added to the previous data and may override it.
Returns
0 on success, non-zero otherwise.
int nc_server_config_del_ch_anchor_time ( const char *  client_name,
struct lyd_node **  config 
)

Deletes the Call Home anchor time parameter of the periodic connection type from the YANG data.

Parameters
[in]client_nameIdentifier of an existing Call Home client.
[in,out]configModified configuration YANG data tree.
Returns
0 on success, non-zero otherwise.
int nc_server_config_add_ch_idle_timeout ( const struct ly_ctx *  ctx,
const char *  client_name,
uint16_t  idle_timeout,
struct lyd_node **  config 
)

Creates new YANG configuration data nodes for the idle timeout parameter of the Call Home periodic connection type.

If called, the persistent connection type will be replaced by periodic.

Parameters
[in]ctxlibyang context.
[in]client_nameArbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed.
[in]idle_timeoutSpecifies the maximum number of seconds that a session may remain idle.
[in,out]configConfiguration YANG data tree. If *config is NULL, it will be created. Otherwise the new YANG data will be added to the previous data and may override it.
Returns
0 on success, non-zero otherwise.
int nc_server_config_del_ch_idle_timeout ( const char *  client_name,
struct lyd_node **  config 
)

Deletes the Call Home idle timeout parameter of the periodic connection type from the YANG data.

This behaves the same as setting the timeout to 180 seconds, which is the default value of this node.

Parameters
[in]client_nameIdentifier of an existing Call Home client.
[in,out]configModified configuration YANG data tree.
Returns
0 on success, non-zero otherwise.
int nc_server_config_add_ch_reconnect_strategy ( const struct ly_ctx *  ctx,
const char *  client_name,
NC_CH_START_WITH  start_with,
uint16_t  max_wait,
uint8_t  max_attempts,
struct lyd_node **  config 
)

Creates new YANG configuration data nodes for the Call Home reconnect strategy.

Parameters
[in]ctxlibyang context.
[in]client_nameArbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed.
[in]start_withSpecifies which endpoint to try if a connection is unsuccessful. Default value is NC_CH_FIRST_LISTED.
[in]max_waitThe number of seconds after which a connection to an endpoint is deemed unsuccessful. Default value if 5.
[in]max_attemptsThe number of unsuccessful connection attempts before moving to the next endpoint. Default value is 3.
[in,out]configConfiguration YANG data tree. If *config is NULL, it will be created. Otherwise the new YANG data will be added to the previous data and may override it.
Returns
0 on success, non-zero otherwise.
int nc_server_config_del_ch_reconnect_strategy ( const char *  client_name,
struct lyd_node **  config 
)

Resets the values of the Call Home reconnect strategy nodes to their defaults.

The default values are: start-with = NC_CH_FIRST_LISTED, max-wait = 5 and max-attempts = 3.

Parameters
[in]client_nameIdentifier of an existing Call Home client.
[in,out]configModified configuration YANG data tree.
Returns
0 on success, non-zero otherwise.