libnetconf2  3.5.4
NETCONF server and client library in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
session_client_ch.h
Go to the documentation of this file.
1 
16 #ifndef NC_SESSION_CLIENT_CH_H_
17 #define NC_SESSION_CLIENT_CH_H_
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #include <libyang/libyang.h>
24 
25 #ifdef NC_ENABLED_SSH_TLS
26 # include <libssh/libssh.h>
27 #endif /* NC_ENABLED_SSH_TLS */
28 
29 #include "messages_client.h"
30 #include "netconf.h"
31 #include "session.h"
32 
33 #ifdef NC_ENABLED_SSH_TLS
34 
54 int nc_accept_callhome(int timeout, struct ly_ctx *ctx, struct nc_session **session);
55 
74 
85 int nc_client_ssh_ch_set_knownhosts_path(const char *path);
86 
98 void nc_client_ssh_ch_set_auth_password_clb(char *(*auth_password)(const char *username, const char *hostname, void *priv),
99  void *priv);
100 
108 void nc_client_ssh_ch_get_auth_password_clb(char *(**auth_password)(const char *username, const char *hostname, void *priv),
109  void **priv);
110 
122 void nc_client_ssh_ch_set_auth_interactive_clb(char *(*auth_interactive)(const char *auth_name, const char *instruction,
123  const char *prompt, int echo, void *priv),
124  void *priv);
125 
133 void nc_client_ssh_ch_get_auth_interactive_clb(char *(**auth_interactive)(const char *auth_name, const char *instruction,
134  const char *prompt, int echo, void *priv),
135  void **priv);
136 
148 void nc_client_ssh_ch_set_auth_privkey_passphrase_clb(char *(*auth_privkey_passphrase)(const char *privkey_path, void *priv),
149  void *priv);
150 
158 void nc_client_ssh_ch_get_auth_privkey_passphrase_clb(char *(**auth_privkey_passphrase)(const char *privkey_path, void *priv),
159  void **priv);
160 
168 int nc_client_ssh_ch_add_bind_listen(const char *address, uint16_t port);
169 
177 int nc_client_ssh_ch_del_bind(const char *address, uint16_t port);
178 
188 int nc_client_ssh_ch_add_keypair(const char *pub_key, const char *priv_key);
189 
196 int nc_client_ssh_ch_del_keypair(int idx);
197 
204 
213 int nc_client_ssh_ch_get_keypair(int idx, const char **pub_key, const char **priv_key);
214 
226 void nc_client_ssh_ch_set_auth_pref(NC_SSH_AUTH_TYPE auth_type, int16_t pref);
227 
235 
242 int nc_client_ssh_ch_set_username(const char *username);
243 
249 const char *nc_client_ssh_ch_get_username(void);
250 
268 int nc_client_tls_ch_add_bind_listen(const char *address, uint16_t port);
269 
278 int nc_client_tls_ch_add_bind_hostname_listen(const char *address, uint16_t port, const char *hostname);
279 
287 int nc_client_tls_ch_del_bind(const char *address, uint16_t port);
288 
297 int nc_client_tls_ch_set_cert_key_paths(const char *client_cert, const char *client_key);
298 
305 void nc_client_tls_ch_get_cert_key_paths(const char **client_cert, const char **client_key);
306 
316 int nc_client_tls_ch_set_trusted_ca_paths(const char *ca_file, const char *ca_dir);
317 
324 void nc_client_tls_ch_get_trusted_ca_paths(const char **ca_file, const char **ca_dir);
325 
329 int nc_client_tls_ch_set_crl_paths(const char *crl_file, const char *crl_dir);
330 
334 void nc_client_tls_ch_get_crl_paths(const char **crl_file, const char **crl_dir);
335 
338 #endif /* NC_ENABLED_SSH_TLS */
339 
340 #ifdef __cplusplus
341 }
342 #endif
343 
344 #endif /* NC_SESSION_CLIENT_CH_H_ */
int nc_client_tls_ch_add_bind_listen(const char *address, uint16_t port)
Add a new client bind and start listening on it for TLS Call Home connections.
int nc_client_ssh_ch_del_keypair(int idx)
Remove an SSH public and private key pair that was used for Call Home client authentication.
void nc_client_ssh_ch_set_auth_pref(NC_SSH_AUTH_TYPE auth_type, int16_t pref)
Set SSH Call Home authentication method preference.
NC_SSH_AUTH_TYPE
Enumeration of NETCONF SSH authentication methods.
Definition: session.h:31
int nc_client_ssh_ch_set_knownhosts_path(const char *path)
Set SSH Call Home path to the known_hosts file for connections.
void nc_client_ssh_ch_set_knownhosts_mode(NC_SSH_KNOWNHOSTS_MODE mode)
Set SSH Call Home behaviour of checking the host key and adding/reading entries to/from the known_hos...
void nc_client_ssh_ch_get_auth_password_clb(char *(**auth_password)(const char *username, const char *hostname, void *priv), void **priv)
Get currently set SSH Call Home password authentication callback and its private data previously set ...
libnetconf2&#39;s public functions and structures of NETCONF client messages.
libnetconf2 session manipulation
const char * nc_client_ssh_ch_get_username(void)
Get client Call Home SSH username used for authentication.
int nc_client_ssh_ch_add_keypair(const char *pub_key, const char *priv_key)
Add an SSH public and private key pair to be used for Call Home client authentication.
int16_t nc_client_ssh_ch_get_auth_pref(NC_SSH_AUTH_TYPE auth_type)
Get SSH Call Home authentication method preference.
void nc_client_ssh_ch_get_auth_interactive_clb(char *(**auth_interactive)(const char *auth_name, const char *instruction, const char *prompt, int echo, void *priv), void **priv)
Get currently set SSH Call Home interactive authentication callback and its private data previously s...
NC_SSH_KNOWNHOSTS_MODE
Enumeration of host key checking and known_hosts entry adding modes.
Definition: session.h:40
int nc_client_ssh_ch_get_keypair_count(void)
Get the number of public an private key pairs set to be used for Call Home client authentication...
int nc_client_tls_ch_set_crl_paths(const char *crl_file, const char *crl_dir)
Deprecated.
int nc_client_tls_ch_del_bind(const char *address, uint16_t port)
Remove a TLS listening client bind.
int nc_client_tls_ch_set_trusted_ca_paths(const char *ca_file, const char *ca_dir)
Set client Call Home trusted CA certificates.
void nc_client_ssh_ch_set_auth_interactive_clb(char *(*auth_interactive)(const char *auth_name, const char *instruction, const char *prompt, int echo, void *priv), void *priv)
Set SSH Call Home interactive authentication callback.
int nc_client_ssh_ch_del_bind(const char *address, uint16_t port)
Remove an SSH listening client bind.
int nc_client_ssh_ch_add_bind_listen(const char *address, uint16_t port)
Add a new client bind and start listening on it for SSH Call Home connections.
int nc_client_ssh_ch_set_username(const char *username)
Set client Call Home SSH username used for authentication.
void nc_client_tls_ch_get_crl_paths(const char **crl_file, const char **crl_dir)
Deprecated.
void nc_client_tls_ch_get_trusted_ca_paths(const char **ca_file, const char **ca_dir)
Get client Call Home trusted CA certificates.
int nc_client_ssh_ch_get_keypair(int idx, const char **pub_key, const char **priv_key)
Get a specific keypair set to be used for Call Home client authentication.
int nc_client_tls_ch_add_bind_hostname_listen(const char *address, uint16_t port, const char *hostname)
Add a new client bind and start listening on it for TLS Call Home connections coming from the specifi...
void nc_client_ssh_ch_set_auth_privkey_passphrase_clb(char *(*auth_privkey_passphrase)(const char *privkey_path, void *priv), void *priv)
Set SSH Call Home publickey authentication encrypted private key passphrase callback.
int nc_accept_callhome(int timeout, struct ly_ctx *ctx, struct nc_session **session)
Accept a Call Home connection on any of the listening binds.
void nc_client_ssh_ch_get_auth_privkey_passphrase_clb(char *(**auth_privkey_passphrase)(const char *privkey_path, void *priv), void **priv)
Get currently set SSH Call Home publickey authentication encrypted private key passphrase callback an...
libnetconf2&#39;s general public functions and structures definitions.
int nc_client_tls_ch_set_cert_key_paths(const char *client_cert, const char *client_key)
Set client Call Home authentication identity - a certificate and a private key.
void nc_client_tls_ch_get_cert_key_paths(const char **client_cert, const char **client_key)
Get client Call Home authentication identity - a certificate and a private key.
void nc_client_ssh_ch_set_auth_password_clb(char *(*auth_password)(const char *username, const char *hostname, void *priv), void *priv)
Set SSH Call Home password authentication callback.