32#ifndef PROTOCORE_TCP_SERVER_H
33#define PROTOCORE_TCP_SERVER_H
127#if PROTOCORE_WORKER_COUNT > 1
140 void (*
const stop)(
const uint8_t *work);
143 void (*
const add)(uint8_t *work);
169#if PROTOCORE_WORKER_COUNT > 1
170void protocore_tcp_listener_worker_queues_init(uint8_t *work);
171void protocore_tcp_listener_worker_queue(uint8_t *work);
188static const TcpListenerNs TcpListener __attribute__((unused)) = {
196#if PROTOCORE_WORKER_COUNT > 1
197 .worker_queues_init = protocore_tcp_listener_worker_queues_init,
198 .worker_queue = protocore_tcp_listener_worker_queue,
What the stack callbacks post to a listener's queue: the event type and the record.
Layer 3 (Network) - a family-tagged IP address (IPv4 or IPv6) with RFC-faithful text parsing,...
EMBED_BEGIN_DECLS typedef int8_t protocore_net_err
The result of a call of the stack, as lwIP numbers it.
RFC 9293 sec 3.9.1.1 passive OPEN: what a bound port is.
uint16_t port
the port it binds, or the one a lookup names
embed_bool tls
connections accepted here begin a handshake
uint8_t dscp
the code point a port marks with
ProtoConn proto
the application protocol its connections take
Event record posted from the stack callbacks to the session layer.
The accept-time gates: what a throttle or an allowlist judges. Nothing a bind reads.
const char * cidr
the same rule as text
uint8_t prefix_len
its CIDR prefix length (RFC 4632)
uint32_t now_ms
the clock a throttle window measures against
const protocore_ip * addr
the source address a gate judges
void(*const set_dscp)(const uint8_t *work)
void(*const stop_dynamic)(const uint8_t *work)
void(*const add)(uint8_t *work)
void(*const accept_allowed)(uint8_t *work)
void(*const worker_queues_init)(uint8_t *work)
void(*const ip_allow_add_cidr)(uint8_t *work)
void(*const accept_throttle_reset)(uint8_t *work)
void(*const ip_allow_add)(uint8_t *work)
void(*const accept_allowed_ip)(uint8_t *work)
void(*const ip_allowlist_reset)(uint8_t *work)
void(*const worker_queue)(uint8_t *work)
void(*const per_ip_throttle_reset)(uint8_t *work)
void(*const stop_all)(const uint8_t *work)
void(*const add_dynamic)(uint8_t *work)
void(*const stop)(const uint8_t *work)
void(*const ip_allowed)(uint8_t *work)
void(*const enqueue)(uint8_t *work)
void(*const listener_queue)(const uint8_t *work)
TcpBindArgs bind
what a passive OPEN binds (RFC 9293 sec 3.9.1.1)
TcpGateArgs gate
what an accept-time gate judges
uint8_t idx
the listener row every call names
TcpQueueArgs q
where an event goes
protocore_platform_queue queue
Event routing: whose queue an event goes to, and what it names.
uint8_t conn_slot
the slot that event names
int worker_id
whose queue is being named
const TcpEvt * evt
the event an enqueue posts
A v4 or v6 address in network (big-endian) byte order.
void protocore_tcp_listener_ip_allowlist_reset(uint8_t *work)
void protocore_tcp_listener_ip_allowed(uint8_t *work)
void protocore_tcp_listener_ip_allow_add(uint8_t *work)
uint8_t * protocore_tcp_listener_span(void)
The PROTOCORE_TCP_LISTENER_BORROW bytes this module's state lives in.
void protocore_tcp_listener_set_dscp(const uint8_t *work)
void protocore_tcp_listener_stop_all(const uint8_t *work)
void protocore_tcp_listener_add(uint8_t *work)
void protocore_tcp_listener_accept_allowed(uint8_t *work)
void protocore_tcp_listener_ip_allow_add_cidr(uint8_t *work)
TcpListenerVars TcpListenerV
The operands and the outcome.
EMBED_BEGIN_DECLS protocore_net_err listener_accept_cb(void *arg, protocore_pcb *newpcb, protocore_net_err err)
Accept callback from the lower-level module - single handler for all listener ports.
void protocore_tcp_listener_accept_throttle_reset(uint8_t *work)
void protocore_tcp_listener_stop(const uint8_t *work)
void protocore_tcp_listener_add_dynamic(uint8_t *work)
void protocore_tcp_listener_per_ip_throttle_reset(uint8_t *work)
void protocore_tcp_listener_accept_allowed_ip(uint8_t *work)
void protocore_tcp_listener_listener_queue(const uint8_t *work)
void protocore_tcp_listener_stop_dynamic(const uint8_t *work)
void protocore_tcp_listener_enqueue(uint8_t *work)