15 #include <satcat5/ip_core.h>
25 constexpr
unsigned HDR_MIN_WORDS = 5;
26 constexpr
unsigned HDR_MIN_SHORTS = 2 * HDR_MIN_WORDS;
27 constexpr
unsigned HDR_MIN_BYTES = 4 * HDR_MIN_WORDS;
28 constexpr
unsigned HDR_MAX_WORDS = 15;
29 constexpr
unsigned HDR_MAX_SHORTS = 2 * HDR_MAX_WORDS;
30 constexpr
unsigned HDR_MAX_BYTES = 4 * HDR_MAX_WORDS;
49 constexpr
unsigned ihl() const
50 {
return (
data[6] >> 12) & 0x0F; }
51 constexpr u16
chk() const
58 void chk_incr32(u32 prev, u32 next);
Abstract API for reading byte-streams and packets.
Abstract API for writing byte-streams and packets.
IPv4 address is a 32-bit unsigned integer.
UDP and TCP ports are both 16-bit unsigned integers.