Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Myra::L3_IPv4::Header Struct Reference

Layer 3 IPv4 header. More...

#include "L3_IPv4.hpp"

Public Attributes

uint8_t ver_and_ihl
 Version number (should contain 4) and internet header length (normally 5). More...
 
uint8_t dscp_and_ecn
 Differentiated services code point, aka DiffServ (RFC 2474) and explicit congestion notification (RFC 3168). More...
 
uint16_t total_length
 Entire packet size in bytes, including the layer 3 header. More...
 
uint16_t id
 Identification of fragments within an IP datagram. More...
 
uint16_t flags_and_frag_offset
 Flags (3 bits) and fragment offset (13 bits). More...
 
uint8_t ttl
 Time-to-live. In practice this field has become a hop count. More...
 
uint8_t protocol
 Layer 4 (IPPROTO_ICMP, IPPROTO_TCP, IPPROTO_UDP, ...). More...
 
uint16_t checksum
 16-bit checksum. More...
 
IPv4_ADDR src_ipv4
 Source in network byte order. More...
 
IPv4_ADDR dst_ipv4
 Destination in network byte order. More...
 
uint8_t payload [0]
 Start of L4 (only if there are no IPv4 options). More...
 

Detailed Description

Layer 3 IPv4 header.

Note
Not included in this structure is the optional IPv4 options if inet_header_len > 5.

Member Data Documentation

uint16_t Myra::L3_IPv4::Header::checksum
uint8_t Myra::L3_IPv4::Header::dscp_and_ecn

Differentiated services code point, aka DiffServ (RFC 2474) and explicit congestion notification (RFC 3168).

IPv4_ADDR Myra::L3_IPv4::Header::dst_ipv4

Destination in network byte order.

uint16_t Myra::L3_IPv4::Header::flags_and_frag_offset

Flags (3 bits) and fragment offset (13 bits).

uint16_t Myra::L3_IPv4::Header::id

Identification of fragments within an IP datagram.

uint8_t Myra::L3_IPv4::Header::payload[0]

Start of L4 (only if there are no IPv4 options).

uint8_t Myra::L3_IPv4::Header::protocol

Layer 4 (IPPROTO_ICMP, IPPROTO_TCP, IPPROTO_UDP, ...).

IPv4_ADDR Myra::L3_IPv4::Header::src_ipv4

Source in network byte order.

uint16_t Myra::L3_IPv4::Header::total_length

Entire packet size in bytes, including the layer 3 header.

uint8_t Myra::L3_IPv4::Header::ttl

Time-to-live. In practice this field has become a hop count.

uint8_t Myra::L3_IPv4::Header::ver_and_ihl

Version number (should contain 4) and internet header length (normally 5).


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