std1.0.0-beta-7 SafeC docs

Module net::tcp

#include <std/net/tcp.h> source

TCP Layer (minimal state machine) Freestanding-safe. No dynamic allocation — caller supplies fixed buffers.

Structs

TcpHdr
TcpConn

Functions

tcp_parseParse TCP header from pkt at byte offset offset. Returns 0 on success, -1 if the packet is truncated or the data offset is invalid.
tcp_checksumCompute TCP checksum (pseudo-header + segment).

Macros

TCP_HDR_MIN_LEN
TCP_FINTCP flags
TCP_SYN
TCP_RST
TCP_PSH
TCP_ACK
TCP_URG
TCP_CLOSEDConnection states
TCP_LISTEN
TCP_SYN_SENT
TCP_SYN_RECEIVED
TCP_ESTABLISHED
TCP_FIN_WAIT1
TCP_FIN_WAIT2
TCP_CLOSE_WAIT
TCP_CLOSING
TCP_LAST_ACK
TCP_TIME_WAIT
TCP_RX_BUF
TCP_TX_BUF