12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #ifndef SHELL_TELNET_H__
- #define SHELL_TELNET_H__
- #include <shell/shell.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- extern const struct shell_transport_api shell_telnet_transport_api;
- struct shell_telnet_line_buf {
-
- char buf[CONFIG_SHELL_TELNET_LINE_BUF_SIZE];
-
- uint16_t len;
- };
- struct shell_telnet {
-
- shell_transport_handler_t shell_handler;
-
- void *shell_context;
-
- struct shell_telnet_line_buf line_out;
-
- struct net_context *client_ctx;
-
- struct k_fifo rx_fifo;
-
- struct k_work_delayable send_work;
- struct k_work_sync work_sync;
-
- bool output_lock;
- };
- #define SHELL_TELNET_DEFINE(_name) \
- static struct shell_telnet _name##_shell_telnet; \
- struct shell_transport _name = { \
- .api = &shell_telnet_transport_api, \
- .ctx = (struct shell_telnet *)&_name##_shell_telnet \
- }
- const struct shell *shell_backend_telnet_get_ptr(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
|