session_client_ch.h
Go to the documentation of this file.
#ifndef NC_SESSION_CLIENT_CH_H_
#define NC_SESSION_CLIENT_CH_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <libyang/libyang.h>
#ifdef NC_ENABLED_SSH
# include <libssh/libssh.h>
#endif
#include "messages_client.h"
#include "netconf.h"
#include "session.h"
#if defined (NC_ENABLED_SSH) || defined (NC_ENABLED_TLS)
int nc_accept_callhome(int timeout, struct ly_ctx *ctx, struct nc_session **session);
#endif /* NC_ENABLED_SSH || NC_ENABLED_TLS */
#ifdef NC_ENABLED_SSH
void nc_client_ssh_ch_set_auth_hostkey_check_clb(int (*auth_hostkey_check)(const char *hostname, ssh_session session, void *priv),
void *priv);
void nc_client_ssh_ch_get_auth_hostkey_check_clb(int (**auth_hostkey_check)(const char *hostname, ssh_session session, void *priv),
void **priv);
void nc_client_ssh_ch_set_auth_password_clb(char *(*auth_password)(const char *username, const char *hostname, void *priv),
void *priv);
void nc_client_ssh_ch_get_auth_password_clb(char *(**auth_password)(const char *username, const char *hostname, void *priv),
void **priv);
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);
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);
void nc_client_ssh_ch_set_auth_privkey_passphrase_clb(char *(*auth_privkey_passphrase)(const char *privkey_path, void *priv),
void *priv);
void nc_client_ssh_ch_get_auth_privkey_passphrase_clb(char *(**auth_privkey_passphrase)(const char *privkey_path, void *priv),
void **priv);
int nc_client_ssh_ch_add_bind_listen(const char *address, uint16_t port);
int nc_client_ssh_ch_del_bind(const char *address, uint16_t port);
int nc_client_ssh_ch_add_keypair(const char *pub_key, const char *priv_key);
int nc_client_ssh_ch_del_keypair(int idx);
int nc_client_ssh_ch_get_keypair_count(void);
int nc_client_ssh_ch_get_keypair(int idx, const char **pub_key, const char **priv_key);
void nc_client_ssh_ch_set_auth_pref(NC_SSH_AUTH_TYPE auth_type, int16_t pref);
int16_t nc_client_ssh_ch_get_auth_pref(NC_SSH_AUTH_TYPE auth_type);
int nc_client_ssh_ch_set_username(const char *username);
const char *nc_client_ssh_ch_get_username(void);
#endif /* NC_ENABLED_SSH */
#ifdef NC_ENABLED_TLS
int nc_client_tls_ch_add_bind_listen(const char *address, uint16_t port);
int nc_client_tls_ch_del_bind(const char *address, uint16_t port);
int nc_client_tls_ch_set_cert_key_paths(const char *client_cert, const char *client_key);
void nc_client_tls_ch_get_cert_key_paths(const char **client_cert, const char **client_key);
int nc_client_tls_ch_set_trusted_ca_paths(const char *ca_file, const char *ca_dir);
void nc_client_tls_ch_get_trusted_ca_paths(const char **ca_file, const char **ca_dir);
int nc_client_tls_ch_set_crl_paths(const char *crl_file, const char *crl_dir);
void nc_client_tls_ch_get_crl_paths(const char **crl_file, const char **crl_dir);
#endif /* NC_ENABLED_TLS */
#ifdef __cplusplus
}
#endif
#endif /* NC_SESSION_CLIENT_CH_H_ */
nc_client_ssh_ch_get_auth_pref
int16_t nc_client_ssh_ch_get_auth_pref(NC_SSH_AUTH_TYPE auth_type)
Get SSH Call Home authentication method preference.
nc_client_ssh_ch_set_auth_privkey_passphrase_clb
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.
nc_client_ssh_ch_add_keypair
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.
nc_client_ssh_ch_set_auth_password_clb
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.
nc_client_ssh_ch_get_auth_hostkey_check_clb
void nc_client_ssh_ch_get_auth_hostkey_check_clb(int(**auth_hostkey_check)(const char *hostname, ssh_session session, void *priv), void **priv)
Get currently set SSH Call Home authentication hostkey check (knownhosts) callback and its private da...
nc_client_ssh_ch_set_auth_pref
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_client_ssh_ch_add_bind_listen
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.
nc_client_ssh_ch_del_keypair
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.
nc_client_ssh_ch_get_keypair_count
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.
nc_client_ssh_ch_get_auth_interactive_clb
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_client_ssh_ch_set_auth_interactive_clb
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.
nc_client_ssh_ch_del_bind
int nc_client_ssh_ch_del_bind(const char *address, uint16_t port)
Remove an SSH listening client bind.
nc_client_ssh_ch_get_keypair
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.
nc_client_ssh_ch_get_auth_privkey_passphrase_clb
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...
nc_client_ssh_ch_set_username
int nc_client_ssh_ch_set_username(const char *username)
Set client Call Home SSH username used for authentication.
nc_client_ssh_ch_set_auth_hostkey_check_clb
void nc_client_ssh_ch_set_auth_hostkey_check_clb(int(*auth_hostkey_check)(const char *hostname, ssh_session session, void *priv), void *priv)
Set SSH Call Home authentication hostkey check (knownhosts) callback.
nc_client_ssh_ch_get_username
const char * nc_client_ssh_ch_get_username(void)
Get client Call Home SSH username used for authentication.
nc_client_ssh_ch_get_auth_password_clb
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 ...
nc_client_tls_ch_add_bind_listen
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.
nc_client_tls_ch_get_crl_paths
void nc_client_tls_ch_get_crl_paths(const char **crl_file, const char **crl_dir)
Get client Call Home Certificate Revocation Lists.
nc_client_tls_ch_set_crl_paths
int nc_client_tls_ch_set_crl_paths(const char *crl_file, const char *crl_dir)
Set client Call Home Certificate Revocation Lists.
nc_client_tls_ch_del_bind
int nc_client_tls_ch_del_bind(const char *address, uint16_t port)
Remove a TLS listening client bind.
nc_client_tls_ch_get_cert_key_paths
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.
nc_client_tls_ch_set_trusted_ca_paths
int nc_client_tls_ch_set_trusted_ca_paths(const char *ca_file, const char *ca_dir)
Set client Call Home trusted CA certificates.
nc_client_tls_ch_get_trusted_ca_paths
void nc_client_tls_ch_get_trusted_ca_paths(const char **ca_file, const char **ca_dir)
Get client Call Home trusted CA certificates.
nc_client_tls_ch_set_cert_key_paths
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.
nc_accept_callhome
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.
messages_client.h
libnetconf2's public functions and structures of NETCONF client messages.
netconf.h
libnetconf2's general public functions and structures definitions.
session.h
libnetconf2 session manipulation
NC_SSH_AUTH_TYPE
NC_SSH_AUTH_TYPE
Enumeration of NETCONF SSH authentication methods.
Definition: session.h:29