libnetconf2
3.5.1
NETCONF server and client library in C.
|
Call Home server configuration functions. More...
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... | |
Call Home server configuration functions.
Call Home Server Configuration
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.
[in] | ctx | libyang context. |
[in] | client_name | Arbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed. |
[in] | endpt_name | Arbitrary identifier of the client's endpoint. If the client's endpoint with this identifier already exists, its contents will be changed. |
[in] | transport | Transport protocol to be used on this endpoint - either SSH or TLS. |
[in] | address | Address to connect to. |
[in] | port | Port to connect to. |
[in,out] | config | Configuration 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. |
int nc_server_config_del_ch_client | ( | const char * | client_name, |
struct lyd_node ** | config | ||
) |
Deletes a Call Home client from the YANG data.
[in] | client_name | Optional identifier of a client to be deleted. If NULL, all of the Call Home clients will be deleted. |
[in,out] | config | Modified configuration YANG data tree. |
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.
[in] | client_name | Identifier of an existing Call Home client. |
[in] | endpt_name | Optional 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] | config | Modified configuration YANG data tree. |
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.
[in] | ctx | libyang context. |
[in] | client_name | Arbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed. |
[in,out] | config | Configuration 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. |
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.
[in] | ctx | libyang context. |
[in] | client_name | Arbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed. |
[in] | period | Duration between periodic connections in minutes. |
[in,out] | config | Configuration 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. |
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.
[in] | client_name | Identifier of an existing Call Home client. |
[in,out] | config | Modified configuration YANG data tree. |
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.
[in] | ctx | libyang context. |
[in] | client_name | Arbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed. |
[in] | anchor_time | Timestamp before or after which a series of periodic connections are determined. |
[in,out] | config | Configuration 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. |
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.
[in] | client_name | Identifier of an existing Call Home client. |
[in,out] | config | Modified configuration YANG data tree. |
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.
[in] | ctx | libyang context. |
[in] | client_name | Arbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed. |
[in] | idle_timeout | Specifies the maximum number of seconds that a session may remain idle. |
[in,out] | config | Configuration 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. |
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.
[in] | client_name | Identifier of an existing Call Home client. |
[in,out] | config | Modified configuration YANG data tree. |
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.
[in] | ctx | libyang context. |
[in] | client_name | Arbitrary identifier of the Call Home client. If a Call Home client with this identifier already exists, its contents will be changed. |
[in] | start_with | Specifies which endpoint to try if a connection is unsuccessful. Default value is NC_CH_FIRST_LISTED. |
[in] | max_wait | The number of seconds after which a connection to an endpoint is deemed unsuccessful. Default value if 5. |
[in] | max_attempts | The number of unsuccessful connection attempts before moving to the next endpoint. Default value is 3. |
[in,out] | config | Configuration 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. |
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.
[in] | client_name | Identifier of an existing Call Home client. |
[in,out] | config | Modified configuration YANG data tree. |