NetBurner 3.5.6
PDF Version
UDPPKT Struct Reference

Internal UDP Packet Header Structure. More...

#include <ip.h>

Public Attributes

beuint16_t srcPort
 Source port number (0-65535)
 
beuint16_t dstPort
 Destination port number (0-65535)
 
beuint16_t UdpLen
 Datagram length in bytes including UDP header and data (minimum 8 bytes)
 
uint16_t UdpCSum
 UDP checksum (optional in IPv4, mandatory in IPv6)
 
uint8_t DATA []
 Flexible array member - UDP payload data follows header (actual length = UdpLen - 8)
 

Detailed Description

Internal UDP Packet Header Structure.

Standard UDP header as defined in RFC 768. This structure represents the 8-byte UDP header that precedes the UDP payload data.

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

Note
This structure is packed to ensure proper alignment with network packet data.
UDP header is always 8 bytes long (no options like TCP).
The checksum is optional in IPv4 (can be zero) but mandatory in IPv6.

Member Data Documentation

◆ UdpCSum

uint16_t UDPPKT::UdpCSum

UDP checksum (optional in IPv4, mandatory in IPv6)

Warning
Do not make big endian - see IPPKT::hCSum for explanation

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