mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-13 11:47:00 +08:00
tcp: add a define for maximum option bytes
This commit is contained in:
@@ -80,6 +80,8 @@ PACK_STRUCT_END
|
||||
/* Valid TCP header flags */
|
||||
#define TCP_FLAGS 0x3fU
|
||||
|
||||
#define TCP_MAX_OPTION_BYTES 40
|
||||
|
||||
#define TCPH_HDRLEN(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) >> 12))
|
||||
#define TCPH_HDRLEN_BYTES(phdr) ((u8_t)(TCPH_HDRLEN(phdr) << 2))
|
||||
#define TCPH_FLAGS(phdr) ((u8_t)((lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS)))
|
||||
|
||||
Reference in New Issue
Block a user