mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-30 21:32:46 +00:00
b59472cf63
This patch adds a new RAW_FLAGS_HDRINCL flag to the raw core implementation. When this flag is set on a RAW PCB, the raw send routines expect the caller to supply an IP header for the given packet, and will use that IP header instead of prepending one to the packet themselves. This feature allows the IP_HDRINCL socket option to be implemented in higher layers with no further effort. Even thoguh that option is traditionally supported for IPv4 sockets only (e.g., see RFC 3542 Sec. 3), the RAW_FLAGS_HDRINCL flag supports both IPv4 and IPv6, as much of the lower-level infrastructure was already in place anyway.