15 #ifndef NC_SESSION_SERVER_CH_H_
16 #define NC_SESSION_SERVER_CH_H_
23 #include <libyang/libyang.h>
28 #if defined(NC_ENABLED_SSH) || defined(NC_ENABLED_TLS)
138 int max_probes,
int probe_interval);
203 void (*session_clb)(
const char *client_name,
struct nc_session *new_session));
209 #ifdef NC_ENABLED_SSH
252 const char *key_after);
298 #ifdef NC_ENABLED_TLS
367 const char *crl_dir);
int nc_server_ch_client_endpt_set_address(const char *client_name, const char *endpt_name, const char *address)
Change Call Home client endpoint listening address.
int nc_server_ssh_ch_client_endpt_mov_hostkey(const char *client_name, const char *endpt_name, const char *key_mov, const char *key_after)
Move Call Home SSH host key.
int nc_server_ch_client_endpt_set_port(const char *client_name, const char *endpt_name, uint16_t port)
Change Call Home client endpoint listening port.
int nc_server_ssh_ch_client_endpt_del_hostkey(const char *client_name, const char *endpt_name, const char *name, int16_t idx)
Delete Call Home SSH host keys. Their order is preserved.
int nc_server_ch_add_client(const char *name)
Add a new Call Home client.
int nc_server_ssh_ch_client_endpt_add_hostkey(const char *client_name, const char *endpt_name, const char *name, int16_t idx)
Add Call Home SSH host keys the server will identify itself with. Only the name is set...
int nc_server_ch_client_periodic_set_anchor_time(const char *client_name, time_t anchor_time)
Set Call Home client periodic connection period anchor time.
libnetconf2 session manipulation
int nc_server_tls_ch_client_endpt_add_trusted_cert_list(const char *client_name, const char *endpt_name, const char *name)
Add a Call Home trusted certificate list. Can be both a CA or a client one.
int nc_server_ssh_ch_client_endpt_get_auth_methods(const char *client_name, const char *endpt_name)
Get accepted Call Home SSH authentication methods.
NC_TRANSPORT_IMPL
Enumeration of transport implementations (ways how libnetconf implements NETCONF transport protocol) ...
int nc_server_ssh_ch_client_endpt_set_auth_attempts(const char *client_name, const char *endpt_name, uint16_t auth_attempts)
Set Call Home SSH authentication attempts of every client. 3 by default.
int nc_server_ch_del_client(const char *name)
Drop any connections, stop connecting and remove a client.
int nc_server_tls_ch_client_endpt_set_crl_paths(const char *client_name, const char *endpt_name, const char *crl_file, const char *crl_dir)
Set Call Home Certificate Revocation List locations. There can only be one file and one directory...
int nc_server_ch_client_periodic_set_idle_timeout(const char *client_name, uint16_t idle_timeout)
Set Call Home client periodic connection idle timeout.
int nc_server_tls_ch_client_endpt_get_ctn(const char *client_name, const char *endpt_name, uint32_t *id, char **fingerprint, NC_TLS_CTN_MAPTYPE *map_type, char **name)
Get a Call Home cert-to-name entry.
int nc_server_ch_client_set_start_with(const char *client_name, NC_CH_START_WITH start_with)
Set Call Home client start-with policy.
int nc_server_ch_client_periodic_set_period(const char *client_name, uint16_t period)
Set Call Home client periodic connection period for reconnecting.
int nc_server_tls_ch_client_endpt_add_ctn(const char *client_name, const char *endpt_name, uint32_t id, const char *fingerprint, NC_TLS_CTN_MAPTYPE map_type, const char *name)
Add a cert-to-name entry.
NC_CH_CONN_TYPE
Enumeration of Call Home connection types.
int nc_server_tls_ch_client_endpt_del_trusted_cert_list(const char *client_name, const char *endpt_name, const char *name)
Remove a set Call Home trusted certificate list. CRLs and CTN entries are not affected.
int nc_server_tls_ch_client_endpt_del_ctn(const char *client_name, const char *endpt_name, int64_t id, const char *fingerprint, NC_TLS_CTN_MAPTYPE map_type, const char *name)
Remove a Call Home cert-to-name entry.
int nc_server_tls_ch_client_endpt_set_server_cert(const char *client_name, const char *endpt_name, const char *name)
Set the server Call Home TLS certificate. Only the name is set, the certificate itself wil be retriev...
int nc_connect_ch_client_dispatch(const char *client_name, void(*session_clb)(const char *client_name, struct nc_session *new_session))
Establish a Call Home connection with a listening NETCONF client.
int nc_server_ch_client_set_conn_type(const char *client_name, NC_CH_CONN_TYPE conn_type)
Set Call Home client connection type.
void nc_server_tls_ch_client_endpt_clear_crls(const char *client_name, const char *endpt_name)
Destroy and clean Call Home CRLs. Call Home certificates, private keys, and CTN entries are not affec...
int nc_server_ch_client_is_endpt(const char *client_name, const char *endpt_name)
Check if an endpoint of a Call Home client exists.
int nc_server_ch_client_add_endpt(const char *client_name, const char *endpt_name, NC_TRANSPORT_IMPL ti)
Add a new Call Home client endpoint.
int nc_server_ssh_ch_client_endpt_set_auth_timeout(const char *client_name, const char *endpt_name, uint16_t auth_timeout)
Set Call Home SSH authentication timeout. 30 seconds by default.
int nc_server_ch_client_del_endpt(const char *client_name, const char *endpt_name, NC_TRANSPORT_IMPL ti)
Remove a Call Home client endpoint.
int nc_server_ch_client_set_max_attempts(const char *client_name, uint8_t max_attempts)
Set Call Home client overall max attempts.
int nc_server_ssh_ch_client_endpt_set_auth_methods(const char *client_name, const char *endpt_name, int auth_methods)
Set accepted Call Home SSH authentication methods. All (publickey, password, interactive) are support...
NC_TLS_CTN_MAPTYPE
Enumeration of cert-to-name mapping types.
NC_CH_START_WITH
Enumeration of Call Home client priority policy.
int nc_server_ch_client_endpt_set_keepalives(const char *client_name, const char *endpt_name, int idle_time, int max_probes, int probe_interval)
Change Call Home client endpoint keepalives parameters. Affects only new connections.
int nc_server_tls_ch_client_endpt_set_trusted_ca_paths(const char *client_name, const char *endpt_name, const char *ca_file, const char *ca_dir)
Set trusted Call Home Certificate Authority certificate locations. There can only be one file and one...
libnetconf2's general public functions and structures definitions.
int nc_server_ch_is_client(const char *name)
Check if a Call Home client exists.
int nc_server_ch_client_endpt_enable_keepalives(const char *client_name, const char *endpt_name, int enable)
Change Call Home client endpoint keepalives state. Affects only new connections.