continuous-integration/drone/push Build is passing
Add full TCP/IP stack implementation at L4 alongside UDP and ICMP. Core Protocol Engine: - TCP types in nettypes.pas (header, TCB, state enum, error codes, callbacks, OOO entry, socket structures) - 3-way handshake (active & passive OPEN) - Reliable data transfer with ACK and sequence number tracking - Graceful close (FIN_WAIT, CLOSE_WAIT, LAST_ACK, TIME_WAIT) - RST send/receive handling - Retransmission with exponential backoff (max 5 attempts) - Pseudo-header based checksum (RFC 793) Server Support: - LISTEN → SYN_RECEIVED → ESTABLISHED passive open path - Listen backlog enforcement (configurable per-socket) - accept() to retrieve established child connections Robustness & Hardening: - Delayed ACK timer (~200ms) - Nagle's algorithm (buffer small sends while unACKed data pending) - Jacobson/Karels RTT estimation with adaptive RTO - Congestion control (slow start / congestion avoidance) - Zero-window probing with exponential backoff - MSS option negotiation in SYN/SYN-ACK (Kind=2, Len=4) - Keep-alive (30s idle, 10s interval, 5 probes) - Out-of-order segment reassembly (4-slot buffer) Terminal & Testing: - tcpconnect: active open + send "Hello, World!" - tcplisten: passive open with syslog output - tcphttp: HTTP/1.0 GET client Also add push_trace() instrumentation to net, eth2, arp, ipv4, icmp, udp, and dhcp entry points for call tracing, and register tcp in net.init.