NetBurner 3.5.6
PDF Version
IPPKT Struct Reference

Internal IPv4 Header Representation. More...

#include <ip.h>

Public Attributes

uint8_t bVerHdrLen
 Version and header length (same as versionNLength in IpHeaderIPv4)
 
uint8_t bTos
 Type of Service / Differentiated Services field (same as diffServNEcn)
 
beuint16_t wLength
 Total packet length in bytes including header.
 
beuint16_t wpktId
 Packet identification for fragment reassembly.
 
beuint16_t wFlags_Frag
 Flags and fragment offset combined.
 
uint8_t bTTL
 Time To Live / hop count.
 
uint8_t proto
 Protocol number (TCP, UDP, ICMP, etc.)
 
uint16_t hCSum
 Header checksum.
 
IPADDR4 ipSrc
 Source IP address.
 
IPADDR4 ipDst
 Destination IP address.
 
uint8_t DATA []
 Flexible array member - payload data follows header (actual length varies by packet)
 

Detailed Description

Internal IPv4 Header Representation.

This is the internal structure used throughout the NetBurner IP stack for manipulating IPv4 packets. It provides a slightly different layout than the standard IpHeaderIPv4 structure for implementation convenience.

The DATA[] flexible array member allows direct access to the packet payload that follows the IP header.

Note
This structure is packed to ensure proper alignment with network packet data.
The DATA[] field extends beyond the structure to the actual packet length.

Member Data Documentation

◆ hCSum

uint16_t IPPKT::hCSum

Header checksum.

Warning
Do not make a big endian variable - checksumming is treated as native endian

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