32 #include "libssh/libssh.h"
33 #define SERVERBANNER CLIENTBANNER
39 enum ssh_bind_options_e {
40 SSH_BIND_OPTIONS_BINDADDR,
41 SSH_BIND_OPTIONS_BINDPORT,
42 SSH_BIND_OPTIONS_BINDPORT_STR,
43 SSH_BIND_OPTIONS_HOSTKEY,
44 SSH_BIND_OPTIONS_DSAKEY,
45 SSH_BIND_OPTIONS_RSAKEY,
46 SSH_BIND_OPTIONS_BANNER,
47 SSH_BIND_OPTIONS_LOG_VERBOSITY,
48 SSH_BIND_OPTIONS_LOG_VERBOSITY_STR
51 typedef struct ssh_bind_struct* ssh_bind;
149 enum ssh_bind_options_e type,
const void *value);
225 LIBSSH_API
int ssh_bind_accept(ssh_bind ssh_bind_o, ssh_session session);
244 LIBSSH_API
int ssh_message_reply_default(ssh_message msg);
246 LIBSSH_API
char *ssh_message_auth_user(ssh_message msg);
247 LIBSSH_API
char *ssh_message_auth_password(ssh_message msg);
248 LIBSSH_API ssh_public_key ssh_message_auth_publickey(ssh_message msg);
249 LIBSSH_API
enum ssh_publickey_state_e ssh_message_auth_publickey_state(ssh_message msg);
250 LIBSSH_API
int ssh_message_auth_reply_success(ssh_message msg,
int partial);
251 LIBSSH_API
int ssh_message_auth_reply_pk_ok(ssh_message msg, ssh_string algo, ssh_string pubkey);
252 LIBSSH_API
int ssh_message_auth_reply_pk_ok_simple(ssh_message msg);
254 LIBSSH_API
int ssh_message_auth_set_methods(ssh_message msg,
int methods);
256 LIBSSH_API
int ssh_message_service_reply_success(ssh_message msg);
257 LIBSSH_API
char *ssh_message_service_service(ssh_message msg);
259 LIBSSH_API
int ssh_message_global_request_reply_success(ssh_message msg,
260 uint16_t bound_port);
263 int(*ssh_bind_message_callback)(ssh_session session, ssh_message msg,
void *data),
265 LIBSSH_API
int ssh_execute_message_callbacks(ssh_session session);
267 LIBSSH_API
char *ssh_message_channel_request_open_originator(ssh_message msg);
268 LIBSSH_API
int ssh_message_channel_request_open_originator_port(ssh_message msg);
269 LIBSSH_API
char *ssh_message_channel_request_open_destination(ssh_message msg);
270 LIBSSH_API
int ssh_message_channel_request_open_destination_port(ssh_message msg);
272 LIBSSH_API ssh_channel ssh_message_channel_request_channel(ssh_message msg);
274 LIBSSH_API
char *ssh_message_channel_request_pty_term(ssh_message msg);
275 LIBSSH_API
int ssh_message_channel_request_pty_width(ssh_message msg);
276 LIBSSH_API
int ssh_message_channel_request_pty_height(ssh_message msg);
277 LIBSSH_API
int ssh_message_channel_request_pty_pxwidth(ssh_message msg);
278 LIBSSH_API
int ssh_message_channel_request_pty_pxheight(ssh_message msg);
280 LIBSSH_API
char *ssh_message_channel_request_env_name(ssh_message msg);
281 LIBSSH_API
char *ssh_message_channel_request_env_value(ssh_message msg);
283 LIBSSH_API
char *ssh_message_channel_request_command(ssh_message msg);
285 LIBSSH_API
char *ssh_message_channel_request_subsystem(ssh_message msg);
287 LIBSSH_API
char *ssh_message_global_request_address(ssh_message msg);
288 LIBSSH_API
int ssh_message_global_request_port(ssh_message msg);
290 LIBSSH_API
int ssh_channel_open_reverse_forward(ssh_channel channel,
const char *remotehost,
291 int remoteport,
const char *sourcehost,
int localport);
293 LIBSSH_API
int ssh_channel_request_send_exit_status(ssh_channel channel,
295 LIBSSH_API
int ssh_channel_request_send_exit_signal(ssh_channel channel,
300 LIBSSH_API
int ssh_channel_write_stderr(ssh_channel channel,
305 SSH_DEPRECATED LIBSSH_API
int ssh_accept(ssh_session session);
306 SSH_DEPRECATED LIBSSH_API
int channel_write_stderr(ssh_channel channel,
307 const void *data, uint32_t len);