NetBurner 3.5.6
PDF Version
PsudeoHeader Struct Reference

UDP/TCP IPv4 Pseudo-header Structure (bits 0 through 95 of the pseudo-header) More...

#include <ip.h>

Public Attributes

beuint16_t proto
 Protocol number (UDP=17, TCP=6) - note: only 8 bits used, padded to 16 bits.
 
beuint16_t len
 Length of UDP/TCP header plus data (not including pseudo-header itself)
 
IPADDR4 srcip
 Source IP address (same as in IP header)
 
IPADDR4 dstip
 Destination IP address (same as in IP header)
 

Detailed Description

UDP/TCP IPv4 Pseudo-header Structure (bits 0 through 95 of the pseudo-header)

The pseudo-header is a conceptual construct used in calculating UDP and TCP checksums. It is NOT transmitted as part of the packet, but is included in the checksum calculation to provide protection against misrouted packets.

WARNING:
This structure has the elements in a different order than typically defined in RFCs. The IP checksum algorithm is order-invariant on 16-bit values, so this alternate ordering allows the structure to map directly over sections of UDP and TCP packets without requiring data copying or rearrangement.
Warning
Do not change the field order - it is specifically designed for efficient overlay onto packet structures.

The documentation for this struct was generated from the following file: