43 constexpr auto src_port() const noexcept -> uint16_t {
47 constexpr auto dst_port() const noexcept -> uint16_t {
51 constexpr auto seq_num() const noexcept -> uint32_t {
55 constexpr auto ack_num() const noexcept -> uint32_t {
60 return static_cast<uint8_t
>((
data_offset >> 4) & 0x0Fu);
71 constexpr auto window() const noexcept -> uint16_t {
74 constexpr auto checksum() const noexcept -> uint16_t {
108static_assert(
sizeof(TCPHeader) == 20,
"Wrong TCP header size");
109static_assert(
alignof(TCPHeader) == 1,
"Wrong TCP header alignment");
@ None
Definition ip4_header.hxx:19
constexpr _Tp autoswap(_Tp tp)
Byte-swap a value if the host is little-endian.
Definition utils.hxx:13
TCPFlags
Definition tcp_header.hxx:10
@ ACK
Definition tcp_header.hxx:16
@ PSH
Definition tcp_header.hxx:15
@ ECE
Definition tcp_header.hxx:18
@ URG
Definition tcp_header.hxx:17
@ SYN
Definition tcp_header.hxx:13
@ CWR
Definition tcp_header.hxx:19
@ FIN
Definition tcp_header.hxx:12
@ RST
Definition tcp_header.hxx:14
Enable bitwise operators for an enum class.
Definition flags_view.hxx:25