24#ifndef PROTOCORE_TCP_PROTOCOL_H
25#define PROTOCORE_TCP_PROTOCOL_H
42protocore_net_err
lowlevel_recv_cb(
void *arg, protocore_pcb *tpcb, protocore_pbuf *p, protocore_net_err err);
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
180 void (*
const set_state)(uint8_t *work);
181 void (*
const alloc_free)(uint8_t *work);
182 void (*
const timeout_ms)(uint8_t *work);
183 void (*
const send)(uint8_t *work);
184 void (*
const send_flush)(uint8_t *work);
185 void (*
const sndbuf)(uint8_t *work);
186 void (*
const flush)(uint8_t *work);
187 void (*
const ack_consumed)(uint8_t *work);
188 void (*
const raw_send)(uint8_t *work);
189 void (*
const close)(uint8_t *work);
190 void (*
const abort_slot)(uint8_t *work);
191 void (*
const closing_finalize)(uint8_t *work);
192 void (*
const closing_check)(uint8_t *work);
193 void (*
const begin_close)(uint8_t *work);
194 void (*
const enqueue)(uint8_t *work);
195 void (*
const init)(uint8_t *work);
196 void (*
const stop)(uint8_t *work);
197 void (*
const active_count)(uint8_t *work);
198 void (*
const remote_ip)(uint8_t *work);
199 void (*
const remote_addr)(uint8_t *work);
200 void (*
const touch_active)(uint8_t *work);
201 void (*
const check_timeouts)(uint8_t *work);
202 void (*
const on_event)(uint8_t *work);
203 void (*
const counters_get)(uint8_t *work);
204 void (*
const counters_reset)(uint8_t *work);
205 void (*
const obs_bump)(uint8_t *work);
206 void (*
const obs_transition)(uint8_t *work);
207 void (*
const obs_notice)(uint8_t *work);
208 void (*
const available)(uint8_t *work);
209 void (*
const read_byte)(uint8_t *work);
210 void (*
const peek)(uint8_t *work);
211 void (*
const consume)(uint8_t *work);
212 void (*
const read)(uint8_t *work);
213 void (*
const active)(uint8_t *work);
214 void (*
const iface)(uint8_t *work);
215 void (*
const listener_id)(uint8_t *work);
216 void (*
const tls)(uint8_t *work);
217 void (*
const owner)(uint8_t *work);
218 void (*
const proto_of)(uint8_t *work);
219 void (*
const pcb_of)(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,
enum PROTO_ENUM_PACKED protocore_if_kind
What an interface is, and the filter that selects one.
enum PROTO_ENUM_PACKED ProtoConn
Application protocol spoken on a listener port or connection slot.
What the stack callbacks post to a listener's queue: the event type and the record.
enum PROTO_ENUM_PACKED ConnState
Lifecycle state of a connection pool slot.
Layer 3 (Network) - a family-tagged IP address (IPv4 or IPv6) with RFC-faithful text parsing,...
protocore_net_err lowlevel_sent_cb(void *arg, protocore_pcb *tpcb, proto_u16 len)
void protocore_conn_pool_sndbuf(uint8_t *work)
void lowlevel_err_cb(void *arg, protocore_net_err err)
void protocore_conn_pool_alloc_free(uint8_t *work)
void protocore_conn_pool_begin_close(uint8_t *work)
void protocore_conn_pool_close(uint8_t *work)
void protocore_conn_pool_active(uint8_t *work)
void protocore_conn_pool_iface(uint8_t *work)
void protocore_conn_pool_peek(uint8_t *work)
void protocore_conn_pool_consume(uint8_t *work)
void protocore_conn_pool_owner(uint8_t *work)
void protocore_conn_pool_flush(uint8_t *work)
void protocore_conn_pool_enqueue(uint8_t *work)
void protocore_conn_pool_read_byte(uint8_t *work)
void protocore_conn_pool_pcb_of(uint8_t *work)
PROTOCORE_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(uint8_t *work)
void protocore_conn_pool_ack_consumed(uint8_t *work)
void protocore_conn_pool_raw_send(uint8_t *work)
void protocore_conn_pool_touch_active(uint8_t *work)
void protocore_conn_pool_active_count(uint8_t *work)
void protocore_conn_pool_tls(uint8_t *work)
void protocore_conn_pool_send_flush(uint8_t *work)
void protocore_conn_pool_stop(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_listener_id(uint8_t *work)
void protocore_conn_pool_available(uint8_t *work)
void protocore_conn_pool_timeout_ms(uint8_t *work)
void protocore_conn_pool_init(uint8_t *work)
void protocore_conn_pool_remote_addr(uint8_t *work)
ConnPoolVars ConnPoolV
The operands and the outcome.
void protocore_conn_pool_read(uint8_t *work)
void protocore_conn_pool_send(uint8_t *work)
void protocore_conn_pool_closing_finalize(uint8_t *work)
void protocore_conn_pool_abort_slot(uint8_t *work)
void protocore_conn_pool_check_timeouts(uint8_t *work)
void protocore_conn_pool_closing_check(uint8_t *work)
void protocore_conn_pool_proto_of(uint8_t *work)
void protocore_conn_pool_set_state(uint8_t *work)
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.
proto_u32 conn_timeout_ms
milliseconds of inactivity before the sweep closes a slot
int worker_id
whose slots the sweep reaps
void(*const set_state)(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.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS