Loading...
Searching...
No Matches
Call Home Server Configuration Functions
Server » Server Configuration » Call Home Server Configuration

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.
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.
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.
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.
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.
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.
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.
int | nc_server_config_del_ch_client (const char *client_name, struct lyd_node **config)
| Deletes a Call Home client from the YANG data.
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.
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.
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.
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.

## Detailed Description

Call Home server configuration functions.

Call Home Server Configuration

## Function Documentation

## nc_server_config_add_ch_address_port()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_del_ch_client()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_del_ch_endpt()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_add_ch_persistent()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_add_ch_period()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_del_ch_period()

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_name | Identifier of an existing Call Home client.
  [in,out] | config | Modified configuration YANG data tree.

Returns
  0 on success, non-zero otherwise.

## nc_server_config_add_ch_anchor_time()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_del_ch_anchor_time()

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_name | Identifier of an existing Call Home client.
  [in,out] | config | Modified configuration YANG data tree.

Returns
  0 on success, non-zero otherwise.

## nc_server_config_add_ch_idle_timeout()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_del_ch_idle_timeout()

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_name | Identifier of an existing Call Home client.
  [in,out] | config | Modified configuration YANG data tree.

Returns
  0 on success, non-zero otherwise.

## nc_server_config_add_ch_reconnect_strategy()

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

Returns
  0 on success, non-zero otherwise.

## nc_server_config_del_ch_reconnect_strategy()

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_name | Identifier of an existing Call Home client.
  [in,out] | config | Modified configuration YANG data tree.

Returns
  0 on success, non-zero otherwise.