/* ****************************************************************************** * HEADER FILE * * Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipssh_connection.h,v $ $Revision: 1.6.52.1 $ * $Source: /home/interpeak/CVSRoot/ipssh/src/ipssh_connection.h,v $ * $Author: svc-cmnet $ $Date: 2013-03-13 07:45:43 $ * $State: Exp $ $Locker: $ * * INTERPEAK_COPYRIGHT_STRING * Design and implementation by Roger Boden ****************************************************************************** */ #ifndef ipssh_connection_h #define ipssh_connection_h /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* **************************************************************************** * 4 DEFINES **************************************************************************** */ /* **************************************************************************** * 5 TYPES **************************************************************************** */ /* **************************************************************************** * 6 FUNCTIONS **************************************************************************** */ IP_GLOBAL Ipssh_pkt_handler ipssh_connection_get_handler(Ip_s32 pkt_type); /* Functions for processing incoming ssh messages */ IP_GLOBAL Ip_err ipssh_msg_channel_request(Ipssh_conn* ssh_conn); IP_GLOBAL Ip_err ipssh_msg_global_request(Ipssh_conn* ssh_conn); IP_GLOBAL Ip_err ipssh_send_request_success_msg(Ipssh_conn* ssh_conn); IP_GLOBAL Ip_err ipssh_send_request_failure_msg(Ipssh_conn* ssh_conn); /* Misc */ IP_GLOBAL Ip_s32 ipssh_read_terminal_data(Ip_fd stdio_sock, Ipcom_buffer* pkt, Ipssh_channel* channel, Ip_s32 req_bytes); IP_GLOBAL Ip_s32 ipssh_store_echo_char(Ipcom_buffer* buf, Ipssh_term_modes* term_modes, Ip_u8 chr, Ip_u8* last_chr); /* Port forwarding */ IP_GLOBAL Ip_err ipssh_port_fwd_listen_handler(Ip_fd sock, Ipssh_conn_ctx* ctx, Ipssh_map_entry* map_entry); IP_GLOBAL Ip_err ipssh_port_fwd_handler_s2c(Ip_fd sock, Ipssh_conn_ctx* ctx, Ipssh_map_entry* map_entry); IP_GLOBAL Ip_err ipssh_channel2sock_handler(Ipssh_channel* channel, Ipcom_buffer* msg); IP_GLOBAL Ip_err ipssh_open_tcp_conn(const char* host, Ip_u32 port, Ip_fd* sock); IP_GLOBAL Ip_err ipssh_setup_listen_sock(const char* addr_str, Ip_u32 port, Ip_fd* sockp); IP_GLOBAL void ipssh_set_default_term_modes(Ipssh_term_modes* term_modes); IP_GLOBAL Ip_err ipssh_shell_exit2(Ipssh_conn* ssh_conn, Ip_fd shell_fd); IP_GLOBAL Ip_err ipssh_handle_exec_cmd(Ipssh_conn* ssh_conn, Ipssh_channel* channel, const char* exec_cmd); #ifdef __cplusplus } #endif #endif /* **************************************************************************** * END OF FILE **************************************************************************** */