libnetconf  0.9.1-1
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
callbacks_ssh.h
Go to the documentation of this file.
1 
40 #ifndef NC_CALLBACKS_SSH_H_
41 #define NC_CALLBACKS_SSH_H_
42 
43 #ifndef DISABLE_LIBSSH
44 
45 #include <libssh2.h>
46 
47 #include "netconf.h"
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
66 void nc_callback_sshauth_interactive(void (*func)(const char* name,
67  int name_len,
68  const char* instruction,
69  int instruction_len,
70  int num_prompts,
71  const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts,
72  LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses,
73  void** abstract));
74 
87 void nc_callback_sshauth_password(char* (*func)(const char* username,
88  const char* hostname));
89 
101 void nc_callback_sshauth_passphrase(char* (*func)(const char* username,
102  const char* hostname, const char* priv_key_file));
103 
116 void nc_callback_ssh_host_authenticity_check(int (*func)(const char* hostname,
117  LIBSSH2_SESSION *session));
118 
129 void nc_set_keypair_path(const char* privkey, const char* pubkey);
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* DISABLE_LIBSSH */
136 
137 #endif /* NC_CALLBACKS_SSH_H_ */
void nc_callback_sshauth_interactive(void(*func)(const char *name, int name_len, const char *instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, void **abstract))
Set a callback function for passing user credentials into the libssh2's keyboard-interactive authenti...
void nc_callback_sshauth_passphrase(char *(*func)(const char *username, const char *hostname, const char *priv_key_file))
Set a callback function for passing the user password into the libssh2's publickey authentication met...
void nc_callback_ssh_host_authenticity_check(int(*func)(const char *hostname, LIBSSH2_SESSION *session))
Set a callback function to authorize authenticity of the remote host.
void nc_callback_sshauth_password(char *(*func)(const char *username, const char *hostname))
Set a callback function for passing the user password into the libssh2's password authentication meth...
void nc_set_keypair_path(const char *privkey, const char *pubkey)
Set path to a private and a public key file used in case of SSH authentication via a publickey mechan...
libnetconf's general public functions and structures definitions.