|
NetBurner 3.5.7
PDF Version |
Internal IPv4 Header Representation. More...
#include <ip.h>
Public Attributes | |
| beuint16_t | hard_Type |
| Hardware type (1 for Ethernet) | |
| beuint16_t | prot_Type |
| Protocol type (0x0800 for IPv4) | |
| uint8_t | hard_size |
| Hardware address length (6 for MAC) | |
| uint8_t | prot_size |
| Protocol address length (4 for IPv4) | |
| beuint16_t | op_code |
| Operation: 1=Request, 2=Reply. | |
| MACADR | sender_phy |
| Sender MAC address. | |
| IPADDR4 | sender_Ip |
| Sender IP address. | |
| MACADR | target_phy |
| Target MAC address. | |
| IPADDR4 | target_Ip |
| Target IP address. | |
| 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) | |
| 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) | |
Internal IPv4 Header Representation.
Internal UDP Packet Header Structure.
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.
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.
| uint8_t __attribute__::DATA |
Flexible array member - payload data follows header (actual length varies by packet)
Flexible array member - UDP payload data follows header (actual length = UdpLen - 8)
| uint16_t __attribute__::hCSum |
Header checksum.
| uint16_t __attribute__::UdpCSum |
UDP checksum (optional in IPv4, mandatory in IPv6)