Go to the source code of this file.
Data Structures | |
| struct | Dyn3_checksum_overlay |
Enumerations | |
| enum | ChecksumCmdLayer3 { CHECKSUM_LAYER3_DO_NOTHING = 0, CHECKSUM_LAYER3_BAD = 2, CHECKSUM_LAYER3_GOOD = 3 } |
| enum | ChecksumCmdLayer4 { CHECKSUM_LAYER4_DO_NOTHING = 0, CHECKSUM_LAYER4_BAD = 2, CHECKSUM_LAYER4_GOOD = 3, CHECKSUM_LAYER4_GOOD_TCP_ZERO_UDP = 4, CHECKSUM_LAYER4_GOOD_TCP_ZERO_UDP_IPV4 = 5, CHECKSUM_LAYER4_GOOD_TCP_UDP_ZERO_UDP_TUNNEL = 6, CHECKSUM_LAYER4_GOOD_TCP_UDP_ZERO_UDP_IPV4_TUNNEL = 7 } |
| enum | FrameType { FRAME_TYPE_IPV4_TCP = 0x0 | 0x0 | 0x4, FRAME_TYPE_IPV4_UDP = 0x0 | 0x0 | 0x8, FRAME_TYPE_IPV6_TCP = 0x0 | 0x2 | 0x4, FRAME_TYPE_IPV6_UDP = 0x0 | 0x2 | 0x8, FRAME_TYPE_IPV4_TCP_TUNNELED = 0x1 | 0x0 | 0x4, FRAME_TYPE_IPV4_UDP_TUNNELED = 0x1 | 0x0 | 0x8, FRAME_TYPE_IPV6_TCP_TUNNELED = 0x1 | 0x2 | 0x4, FRAME_TYPE_IPV6_UDP_TUNNELED = 0x1 | 0x2 | 0x8 } |
Functions | |
| static uint64_t | checksum_command (ChecksumCmdLayer3 l3, ChecksumCmdLayer4 l4) |
| static void | handle_error_status (int status, const char *message) |
| int | main (int, char **) |
Variables | |
| static constexpr uint8_t | Test_packet [] |
Enumeration Type Documentation
| enum ChecksumCmdLayer3 |
Valid values for layer 3 checksum command.
| Enumerator | |
|---|---|
| CHECKSUM_LAYER3_DO_NOTHING | |
| CHECKSUM_LAYER3_BAD | |
| CHECKSUM_LAYER3_GOOD | |
Definition at line 135 of file checksum_example.cpp.
| enum ChecksumCmdLayer4 |
Valid values for layer 4 checksum command.
Definition at line 144 of file checksum_example.cpp.
| enum FrameType |
Valid values for a descriptor frame type.
Bit [ 0]: Value 0: Not tunneled Value 1: Tunneled
Bit [ 1]: Value 0: IPv4 or other Value 1: IPv6
Bit [3:2]: Value 0: Other Value 1: TCP Value 2: UDP Value 3: Reserved
Definition at line 168 of file checksum_example.cpp.
Function Documentation
|
inlinestatic |
Correctly combines layer 3 checksum command and layer 4 checksum command.
- Examples:
- net/checksum/checksum_example.cpp.
Definition at line 182 of file checksum_example.cpp.
Referenced by main().
|
inlinestatic |
Handles and prints NT error messages, and the terminates the program.
Definition at line 190 of file checksum_example.cpp.
Referenced by main().
| int main | ( | int | , |
| char ** | |||
| ) |
Definition at line 200 of file checksum_example.cpp.
Variable Documentation
|
static |
IPv4 UDP packet with IPv4 checksum error and UDP checksum error. No FCS included. Size: 96 byte.
- Examples:
- net/checksum/checksum_example.cpp, and net/transmit_segment_dyn_descr/transmit_segment_dyn_descr_example.cpp.
Definition at line 104 of file checksum_example.cpp.
Referenced by main().