|
ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
|
Network adaptation decisions: TCP window sizing by free RAM + DHCP->static fallback (PC_ENABLE_NETADAPT). More...
Go to the source code of this file.
Network adaptation decisions: TCP window sizing by free RAM + DHCP->static fallback (PC_ENABLE_NETADAPT).
Two pure decisions a network manager needs on a memory-constrained, sometimes-headless device:
pc_netadapt_window() - size the TCP receive window / RX buffer from the free heap, so a device with RAM to spare uses a bigger window for throughput while a low-memory one shrinks to stay alive. Keeps a reserve untouched and clamps to a sane [min, max].pc_netadapt_dhcp_fallback() - decide when to stop waiting on DHCP and configure a static IP, so a node on a network with no DHCP server still comes up. Triggers once the elapsed wait exceeds the timeout or the retry budget is spent.Pure, zero heap, no stdlib, host-testable; the app applies the results (lwIP window / netif config).
Definition in file netadapt.h.