Definitions and helper functions for when layer 4 is TCP. More...
Classes | |
| struct | Header |
| TCP header. More... | |
Enumerations | |
| enum | Options { Options::EndOfOption = 0, Options::NoOp = 1, Options::MaximumSegmentSize = 2, Options::WindowScale = 3, Options::SACKPermitted = 4, Options::SACK = 5, Options::Timestamp = 8, Options::Unknown = 255 } |
| TCP options which may be found between the TCP header and the payload. More... | |
Functions | |
| const Header * | get_header (const L3_IPv4::Header *l3) |
| Get the L4_TCP::Header. More... | |
| const Header * | get_header (const L3_IPv6::Header *l3) |
| Get the L4_TCP::Header. More... | |
| int | get_data_offset (const Header *header) |
| Number of 32-bit words in the TCP header. More... | |
| bool | is_RES3_flag (const Header *header) |
| Reserved flag #3. More... | |
| bool | is_RES2_flag (const Header *header) |
| Reserved flag #2. More... | |
| bool | is_RES1_flag (const Header *header) |
| Reserved flag #1. More... | |
| bool | is_NS_flag (const Header *header) |
| ECN-nonce concealment in L4_TCP::Header::data_offset_and_flags. More... | |
| bool | is_CWR_flag (const Header *header) |
| Congrestion window reduced (RFC 3168) in L4_TCP::Header::flags. More... | |
| bool | is_ECE_flag (const Header *header) |
| ECN-Echo (RFC 3168) in L4_TCP::Header::flags. More... | |
| bool | is_URG_flag (const Header *header) |
| Urgent pointer field in L4_TCP::Header::flags. More... | |
| bool | is_ACK_flag (const Header *header) |
| Acknowledgement in L4_TCP::Header::flags. More... | |
| bool | is_PSH_flag (const Header *header) |
| Push in L4_TCP::Header::flags. More... | |
| bool | is_RST_flag (const Header *header) |
| RST in L4_TCP::Header::flags. More... | |
| bool | is_SYN_flag (const Header *header) |
| SYN in L4_TCP::Header::flags. More... | |
| bool | is_FIN_flag (const Header *header) |
| FIN in L4_TCP::Header::flags. More... | |
| uint16_t | get_header_length (const Header *header) |
| 32 bit words, but 8 bits per byte. More... | |
| uint16_t | get_payload_length (const L3_IPv4::Header *l3) |
| Get the TCP payload length. More... | |
| uint16_t | get_payload_length (const L3_IPv6::Header *l3) |
| Get the TCP payload length. More... | |
| uint16_t | get_options_length (const Header *header) |
| Get the number of bytes in the TCP options between the header and the payload. More... | |
| const uint8_t * | get_payload (const Header *header) |
| Get a pointer to the payload. More... | |
| Options | get_option (const uint8_t *raw) |
| Convert the option at the given location to Myra::L4_TCP::Options. More... | |
| const uint8_t * | get_next_option (const uint8_t *raw) |
Starting at the location specified by raw, find the location of the next TCP option. More... | |
Definitions and helper functions for when layer 4 is TCP.
|
strong |
TCP options which may be found between the TCP header and the payload.
|
inline |
Number of 32-bit words in the TCP header.

|
inline |
Get the L4_TCP::Header.


|
inline |
|
inline |
32 bit words, but 8 bits per byte.


| const uint8_t * Myra::L4_TCP::get_next_option | ( | const uint8_t * | raw | ) |
Starting at the location specified by raw, find the location of the next TCP option.
nullptr if there are no further TCP options 
| Myra::L4_TCP::Options Myra::L4_TCP::get_option | ( | const uint8_t * | raw | ) |
Convert the option at the given location to Myra::L4_TCP::Options.

|
inline |
Get the number of bytes in the TCP options between the header and the payload.


|
inline |
Get a pointer to the payload.


|
inline |
Get the TCP payload length.


|
inline |
Get the TCP payload length.

|
inline |
|
inline |
Congrestion window reduced (RFC 3168) in L4_TCP::Header::flags.
|
inline |
ECN-Echo (RFC 3168) in L4_TCP::Header::flags.
|
inline |
|
inline |
ECN-nonce concealment in L4_TCP::Header::data_offset_and_flags.
|
inline |
Push in L4_TCP::Header::flags.
|
inline |
Reserved flag #1.
|
inline |
Reserved flag #2.
|
inline |
Reserved flag #3.
|
inline |
|
inline |
|
inline |