25 #if !defined(__LWS_PLUGIN_SSH_H__)
26 #define __LWS_PLUGIN_SSH_H__
28 #define LWS_CALLBACK_SSH_UART_SET_RXFLOW (LWS_CALLBACK_USER + 800)
30 #define LWS_SSH_OPS_VERSION 2
42 #define SSHMO_TTY_OP_END 0
48 #define SSHMO_VERASE 3
55 #define SSHMO_VSTART 8
58 #define SSHMO_VSUSP 10
59 #define SSHMO_VDSUSP 11
60 #define SSHMO_VREPRINT 12
61 #define SSHMO_VWERASE 13
62 #define SSHMO_VLNEXT 14
64 #define SSHMO_VFLUSH 15
65 #define SSHMO_VSWTCH 16
66 #define SSHMO_VSTATUS 17
68 #define SSHMO_VDISCARD 18
69 #define SSHMO_IGNPAR 30
72 #define SSHMO_PARMRK 31
73 #define SSHMO_INPCK 32
74 #define SSHMO_ISTRIP 33
75 #define SSHMO_INLCR 34
76 #define SSHMO_IGNCR 35
77 #define SSHMO_ICRNL 36
78 #define SSHMO_IUCLC 37
80 #define SSHMO_IXANY 39
81 #define SSHMO_IXOFF 40
82 #define SSHMO_IMAXBEL 41
84 #define SSHMO_ICANON 51
85 #define SSHMO_XCASE 52
89 #define SSHMO_ECHOE 54
90 #define SSHMO_ECHOK 55
91 #define SSHMO_ECHONL 56
92 #define SSHMO_NOFLSH 57
93 #define SSHMO_TOSTOP 58
94 #define SSHMO_IEXTEN 59
95 #define SSHMO_ECHOCTL 60
96 #define SSHMO_ECHOKE 61
97 #define SSHMO_PENDIN 62
98 #define SSHMO_OPOST 70
99 #define SSHMO_OLCUC 71
100 #define SSHMO_ONLCR 72
101 #define SSHMO_OCRNL 73
102 #define SSHMO_ONOCR 74
103 #define SSHMO_ONLRET 75
106 #define SSHMO_PARENB 92
107 #define SSHMO_PARODD 93
108 #define SSHMO_TTY_OP_ISPEED 128
110 #define SSHMO_TTY_OP_OSPEED 129
133 typedef void (*lws_ssh_finish_exec)(
void *handle,
int retcode);
173 int (*
rx)(
void *priv,
struct lws *wsi,
const uint8_t *buf, uint32_t len);
206 size_t (*
tx)(
void *priv,
int stdch, uint8_t *buf,
size_t len);
220 size_t (*
get_server_key)(
struct lws *wsi, uint8_t *buf,
size_t len);
232 size_t (*
set_server_key)(
struct lws *wsi, uint8_t *buf,
size_t len);
243 int (*
set_env)(
void *priv,
const char *name,
const char *value);
256 int (*
exec)(
void *priv,
struct lws *wsi,
const char *command, lws_ssh_finish_exec finish,
void *finish_handle);
269 int (*
shell)(
void *priv,
struct lws *wsi, lws_ssh_finish_exec finish,
void *finish_handle);
314 const char *desc_lang);
333 const char *type,
const uint8_t *peer,
int peer_len);
352 size_t (*
banner)(
char *buf,
size_t max_len,
char *lang,
353 size_t max_lang_len);
Definition: lws-plugin-ssh.h:121
int(* channel_destroy)(void *priv)
Definition: lws-plugin-ssh.h:147
int(* channel_create)(struct lws *wsi, void **priv)
Definition: lws-plugin-ssh.h:137
int(* rx)(void *priv, struct lws *wsi, const uint8_t *buf, uint32_t len)
Definition: lws-plugin-ssh.h:159
int(* set_env)(void *priv, const char *name, const char *value)
Definition: lws-plugin-ssh.h:229
int(* child_process_terminated)(void *priv, struct lws *wsi)
Definition: lws-plugin-ssh.h:287
int(* exec)(void *priv, struct lws *wsi, const char *command, lws_ssh_finish_exec finish, void *finish_handle)
Definition: lws-plugin-ssh.h:242
size_t(* banner)(char *buf, size_t max_len, char *lang, size_t max_lang_len)
Definition: lws-plugin-ssh.h:338
int(* tx_waiting)(void *priv)
Definition: lws-plugin-ssh.h:174
size_t(* set_server_key)(struct lws *wsi, uint8_t *buf, size_t len)
Definition: lws-plugin-ssh.h:218
int(* is_pubkey_authorized)(const char *username, const char *type, const uint8_t *peer, int peer_len)
Definition: lws-plugin-ssh.h:318
int(* child_process_io)(void *priv, struct lws *wsi, struct lws_cgi_args *args)
Definition: lws-plugin-ssh.h:276
void(* disconnect_reason)(uint32_t reason, const char *desc, const char *desc_lang)
Definition: lws-plugin-ssh.h:299
char api_version
Definition: lws-plugin-ssh.h:354
const char * server_string
Definition: lws-plugin-ssh.h:345
int(* pty_req)(void *priv, struct lws_ssh_pty *pty)
Definition: lws-plugin-ssh.h:265
size_t(* get_server_key)(struct lws *wsi, uint8_t *buf, size_t len)
Definition: lws-plugin-ssh.h:206
int(* shell)(void *priv, struct lws *wsi, lws_ssh_finish_exec finish, void *finish_handle)
Definition: lws-plugin-ssh.h:255
size_t(* tx)(void *priv, int stdch, uint8_t *buf, size_t len)
Definition: lws-plugin-ssh.h:192
Definition: lws-plugin-ssh.h:32