24#ifndef PROTOCORE_TCP_PROTOCOL_H
25#define PROTOCORE_TCP_PROTOCOL_H
64#if PROTOCORE_ENABLE_OBSERVABILITY
68 protocore_conn_event_cb event_cb_in;
69 protocore_conn_reason reason;
72 protocore_conn_counters counters;
156#if PROTOCORE_ENABLE_OBSERVABILITY
168#if PROTOCORE_ENABLE_OBSERVABILITY
183 void (*
const send)(
const uint8_t *work);
185 void (*
const sndbuf)(
const uint8_t *work);
186 void (*
const flush)(
const uint8_t *work);
189 void (*
const close)(
const uint8_t *work);
195 void (*
const init)(uint8_t *work);
196 void (*
const stop)(
const uint8_t *work);
210 void (*
const peek)(
const uint8_t *work);
212 void (*
const read)(
const uint8_t *work);
213 void (*
const active)(
const uint8_t *work);
214 void (*
const iface)(
const uint8_t *work);
216 void (*
const tls)(
const uint8_t *work);
217 void (*
const owner)(
const uint8_t *work);
219 void (*
const pcb_of)(
const uint8_t *work);
246#if PROTOCORE_ENABLE_OBSERVABILITY
247void protocore_conn_pool_on_event(uint8_t *work);
248void protocore_conn_pool_counters_get(uint8_t *work);
249void protocore_conn_pool_counters_reset(uint8_t *work);
250void protocore_conn_pool_obs_bump(uint8_t *work);
251void protocore_conn_pool_obs_transition(uint8_t *work);
252void protocore_conn_pool_obs_notice(uint8_t *work);
271static const ConnPoolNs ConnPool __attribute__((unused)) = {
294#if PROTOCORE_ENABLE_OBSERVABILITY
295 .on_event = protocore_conn_pool_on_event,
296 .counters_get = protocore_conn_pool_counters_get,
297 .counters_reset = protocore_conn_pool_counters_reset,
298 .obs_bump = protocore_conn_pool_obs_bump,
299 .obs_transition = protocore_conn_pool_obs_transition,
300 .obs_notice = protocore_conn_pool_obs_notice,
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,...
void protocore_conn_pool_active(const uint8_t *work)
void protocore_conn_pool_available(const uint8_t *work)
void lowlevel_err_cb(void *arg, protocore_net_err err)
void protocore_conn_pool_begin_close(const uint8_t *work)
void protocore_conn_pool_tls(const uint8_t *work)
void protocore_conn_pool_owner(const uint8_t *work)
void protocore_conn_pool_flush(const uint8_t *work)
void protocore_conn_pool_alloc_free(const uint8_t *work)
void protocore_conn_pool_touch_active(const uint8_t *work)
void protocore_conn_pool_send(const uint8_t *work)
void protocore_conn_pool_read_byte(const uint8_t *work)
void protocore_conn_pool_raw_send(const uint8_t *work)
void protocore_conn_pool_ack_consumed(const uint8_t *work)
void protocore_conn_pool_sndbuf(const uint8_t *work)
void protocore_conn_pool_closing_finalize(const uint8_t *work)
void protocore_conn_pool_set_state(const uint8_t *work)
void protocore_conn_pool_stop(const uint8_t *work)
void protocore_conn_pool_enqueue(const uint8_t *work)
void protocore_conn_pool_abort_slot(const uint8_t *work)
void protocore_conn_pool_active_count(const uint8_t *work)
void protocore_conn_pool_pcb_of(const uint8_t *work)
void protocore_conn_pool_iface(const uint8_t *work)
void protocore_conn_pool_send_flush(const uint8_t *work)
protocore_net_err lowlevel_sent_cb(void *arg, protocore_pcb *tpcb, embed_u16 len)
void protocore_conn_pool_peek(const uint8_t *work)
uint8_t * protocore_conn_pool_span(void)
The PROTOCORE_CONN_POOL_BORROW bytes this module's state lives in.
void protocore_conn_pool_timeout_ms(uint8_t *work)
void protocore_conn_pool_proto_of(const uint8_t *work)
void protocore_conn_pool_init(uint8_t *work)
ConnPoolVars ConnPoolV
The operands and the outcome.
void protocore_conn_pool_listener_id(const uint8_t *work)
void protocore_conn_pool_remote_addr(const uint8_t *work)
void protocore_conn_pool_consume(const uint8_t *work)
void protocore_conn_pool_closing_check(const uint8_t *work)
EMBED_BEGIN_DECLS protocore_net_err lowlevel_recv_cb(void *arg, protocore_pcb *tpcb, protocore_pbuf *p, protocore_net_err err)
void protocore_conn_pool_remote_ip(const uint8_t *work)
void protocore_conn_pool_close(const uint8_t *work)
void protocore_conn_pool_read(const uint8_t *work)
void protocore_conn_pool_check_timeouts(uint8_t *work)
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 SEND / RECEIVE: the bytes a call moves, and the room they move into.
size_t count
bytes a peek copies, or a consume drops
uint8_t * buf
where a read or a peek lands
size_t off
a peek's offset from the tail
const void * data
bytes for a send
size_t cap
how much room it has
What a pool lifecycle call reads: the idle deadline it sweeps against, and whose slots.
embed_u32 conn_timeout_ms
milliseconds of inactivity before the sweep closes a slot
int worker_id
whose slots the sweep reaps
void(*const obs_transition)(uint8_t *work)
void(*const enqueue)(const uint8_t *work)
void(*const available)(const uint8_t *work)
void(*const remote_ip)(const uint8_t *work)
void(*const close)(const uint8_t *work)
void(*const obs_notice)(uint8_t *work)
void(*const send)(const uint8_t *work)
void(*const ack_consumed)(const uint8_t *work)
void(*const set_state)(const uint8_t *work)
void(*const proto_of)(const uint8_t *work)
void(*const iface)(const uint8_t *work)
void(*const pcb_of)(const uint8_t *work)
void(*const active_count)(const uint8_t *work)
void(*const send_flush)(const uint8_t *work)
void(*const read)(const uint8_t *work)
void(*const read_byte)(const uint8_t *work)
void(*const alloc_free)(const uint8_t *work)
void(*const obs_bump)(uint8_t *work)
void(*const owner)(const uint8_t *work)
void(*const counters_get)(uint8_t *work)
void(*const active)(const uint8_t *work)
void(*const flush)(const uint8_t *work)
void(*const tls)(const uint8_t *work)
void(*const stop)(const uint8_t *work)
void(*const peek)(const uint8_t *work)
void(*const timeout_ms)(uint8_t *work)
void(*const closing_check)(const uint8_t *work)
void(*const abort_slot)(const uint8_t *work)
void(*const consume)(const uint8_t *work)
void(*const begin_close)(const uint8_t *work)
void(*const counters_reset)(uint8_t *work)
void(*const raw_send)(const uint8_t *work)
void(*const sndbuf)(const uint8_t *work)
void(*const remote_addr)(const uint8_t *work)
void(*const touch_active)(const uint8_t *work)
void(*const on_event)(uint8_t *work)
void(*const init)(uint8_t *work)
void(*const listener_id)(const uint8_t *work)
void(*const check_timeouts)(uint8_t *work)
void(*const closing_finalize)(const uint8_t *work)
protocore_ip * out
where a peer address is written
uint8_t slot
the connection every call names
protocore_if_kind if_kind
ConnState st
the state a write installs
ConnIoArgs io
the bytes a send or a receive moves (RFC 9293 sec 3.9.1)
const TcpEvt * evt
the event an enqueue posts
ConnLifeArgs life
what a pool lifecycle call reads
protocore_pcb * pcb
the control block a raw call acts on, or the one pcb_of reports
Event record posted from the stack callbacks to the session layer.
A v4 or v6 address in network (big-endian) byte order.