25#ifndef PROTOCORE_TELNET_H
26#define PROTOCORE_TELNET_H
34struct protocore_field;
37#if PROTOCORE_ENABLE_TELNET
40typedef void (*TelnetCommandCb)(
const char *line, uint8_t conn_id);
48 const struct protocore_field *spec;
49 const struct protocore_fval *val;
101extern TelnetVars TelnetV;
106 void (*
const on_command)(uint8_t *work);
107 void (*
const print)(uint8_t *work);
108 void (*
const println)(uint8_t *work);
109 void (*
const frame)(uint8_t *work);
110 void (*
const client_count)(uint8_t *work);
111 void (*
const accept)(uint8_t *work);
112 void (*
const rx)(uint8_t *work);
113 void (*
const close)(uint8_t *work);
114 void (*
const proto_handler)(uint8_t *work);
119void protocore_telnet_on_command(uint8_t *work);
120void protocore_telnet_print(uint8_t *work);
121void protocore_telnet_println(uint8_t *work);
122void protocore_telnet_frame(uint8_t *work);
123void protocore_telnet_client_count(uint8_t *work);
124void protocore_telnet_accept(uint8_t *work);
125void protocore_telnet_rx(uint8_t *work);
126void protocore_telnet_close(uint8_t *work);
127void protocore_telnet_proto_handler(uint8_t *work);
133static const TelnetNs Telnet __attribute__((unused)) = {
134 .on_command = protocore_telnet_on_command,
135 .print = protocore_telnet_print,
136 .println = protocore_telnet_println,
137 .frame = protocore_telnet_frame,
138 .client_count = protocore_telnet_client_count,
139 .accept = protocore_telnet_accept,
140 .rx = protocore_telnet_rx,
141 .close = protocore_telnet_close,
142 .proto_handler = protocore_telnet_proto_handler,
154uint8_t *protocore_telnet_span(
void);
Per-protocol connection event/poll callbacks (the server's dispatch vtable).
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
#define PROTOCORE_END_DECLS