22 #if !defined(__LWS_PLUGIN_SSH_H__)
23 #define __LWS_PLUGIN_SSH_H__
25 #define LWS_CALLBACK_SSH_UART_SET_RXFLOW (LWS_CALLBACK_USER + 800)
27 #define LWS_SSH_OPS_VERSION 2
39 #define SSHMO_TTY_OP_END 0
45 #define SSHMO_VERASE 3
52 #define SSHMO_VSTART 8
55 #define SSHMO_VSUSP 10
56 #define SSHMO_VDSUSP 11
57 #define SSHMO_VREPRINT 12
58 #define SSHMO_VWERASE 13
59 #define SSHMO_VLNEXT 14
61 #define SSHMO_VFLUSH 15
62 #define SSHMO_VSWTCH 16
63 #define SSHMO_VSTATUS 17
65 #define SSHMO_VDISCARD 18
66 #define SSHMO_IGNPAR 30
69 #define SSHMO_PARMRK 31
70 #define SSHMO_INPCK 32
71 #define SSHMO_ISTRIP 33
72 #define SSHMO_INLCR 34
73 #define SSHMO_IGNCR 35
74 #define SSHMO_ICRNL 36
75 #define SSHMO_IUCLC 37
77 #define SSHMO_IXANY 39
78 #define SSHMO_IXOFF 40
79 #define SSHMO_IMAXBEL 41
81 #define SSHMO_ICANON 51
82 #define SSHMO_XCASE 52
86 #define SSHMO_ECHOE 54
87 #define SSHMO_ECHOK 55
88 #define SSHMO_ECHONL 56
89 #define SSHMO_NOFLSH 57
90 #define SSHMO_TOSTOP 58
91 #define SSHMO_IEXTEN 59
92 #define SSHMO_ECHOCTL 60
93 #define SSHMO_ECHOKE 61
94 #define SSHMO_PENDIN 62
95 #define SSHMO_OPOST 70
96 #define SSHMO_OLCUC 71
97 #define SSHMO_ONLCR 72
98 #define SSHMO_OCRNL 73
99 #define SSHMO_ONOCR 74
100 #define SSHMO_ONLRET 75
103 #define SSHMO_PARENB 92
104 #define SSHMO_PARODD 93
105 #define SSHMO_TTY_OP_ISPEED 128
107 #define SSHMO_TTY_OP_OSPEED 129
130 typedef void (*lws_ssh_finish_exec)(
void *handle,
int retcode);
170 int (*
rx)(
void *priv,
struct lws *wsi,
const uint8_t *buf, uint32_t len);
203 size_t (*
tx)(
void *priv,
int stdch, uint8_t *buf,
size_t len);
217 size_t (*
get_server_key)(
struct lws *wsi, uint8_t *buf,
size_t len);
229 size_t (*
set_server_key)(
struct lws *wsi, uint8_t *buf,
size_t len);
240 int (*
set_env)(
void *priv,
const char *name,
const char *value);
253 int (*
exec)(
void *priv,
struct lws *wsi,
const char *command, lws_ssh_finish_exec finish,
void *finish_handle);
266 int (*
shell)(
void *priv,
struct lws *wsi, lws_ssh_finish_exec finish,
void *finish_handle);
311 const char *desc_lang);
330 const char *type,
const uint8_t *peer,
int peer_len);
349 size_t (*
banner)(
char *buf,
size_t max_len,
char *lang,
350 size_t max_lang_len);
Definition: lws-plugin-ssh.h:118
int(* channel_destroy)(void *priv)
Definition: lws-plugin-ssh.h:144
int(* channel_create)(struct lws *wsi, void **priv)
Definition: lws-plugin-ssh.h:134
int(* rx)(void *priv, struct lws *wsi, const uint8_t *buf, uint32_t len)
Definition: lws-plugin-ssh.h:156
int(* set_env)(void *priv, const char *name, const char *value)
Definition: lws-plugin-ssh.h:226
int(* child_process_terminated)(void *priv, struct lws *wsi)
Definition: lws-plugin-ssh.h:284
int(* exec)(void *priv, struct lws *wsi, const char *command, lws_ssh_finish_exec finish, void *finish_handle)
Definition: lws-plugin-ssh.h:239
size_t(* banner)(char *buf, size_t max_len, char *lang, size_t max_lang_len)
Definition: lws-plugin-ssh.h:335
int(* tx_waiting)(void *priv)
Definition: lws-plugin-ssh.h:171
size_t(* set_server_key)(struct lws *wsi, uint8_t *buf, size_t len)
Definition: lws-plugin-ssh.h:215
int(* is_pubkey_authorized)(const char *username, const char *type, const uint8_t *peer, int peer_len)
Definition: lws-plugin-ssh.h:315
int(* child_process_io)(void *priv, struct lws *wsi, struct lws_cgi_args *args)
Definition: lws-plugin-ssh.h:273
void(* disconnect_reason)(uint32_t reason, const char *desc, const char *desc_lang)
Definition: lws-plugin-ssh.h:296
char api_version
Definition: lws-plugin-ssh.h:351
const char * server_string
Definition: lws-plugin-ssh.h:342
int(* pty_req)(void *priv, struct lws_ssh_pty *pty)
Definition: lws-plugin-ssh.h:262
size_t(* get_server_key)(struct lws *wsi, uint8_t *buf, size_t len)
Definition: lws-plugin-ssh.h:203
int(* shell)(void *priv, struct lws *wsi, lws_ssh_finish_exec finish, void *finish_handle)
Definition: lws-plugin-ssh.h:252
size_t(* tx)(void *priv, int stdch, uint8_t *buf, size_t len)
Definition: lws-plugin-ssh.h:189
Definition: lws-plugin-ssh.h:29