Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::net::IPV4Header Struct Reference

The header of an IPv4 packet. More...

#include <ipv4.h>

Public Attributes

uint8_t header_length: 4
 The length of the header in 32-bit words (min 5, max 15)
 
uint8_t version: 4
 The version of the IP protocol (4 for IPv4)
 
uint8_t type_of_service
 The type of service (low delay, high throughput, high reliability, etc.
 
uint16_t total_length
 The total length of the IP packet (header + data) in bytes.
 
uint16_t identifier
 Unique identifier for the group of fragments of a single IP packet.
 
uint16_t flags_and_offset
 Flags (3 bits) and Fragment Offset (13 bits)
 
uint8_t time_to_live
 The maximum hops between devices before the packet is discarded.
 
uint8_t protocol
 The protocol of the payload (TCP, UDP, ICMP, etc.
 
uint16_t checksum
 The checksum of the header.
 
uint32_t source_ip
 The IP of the sender.
 
uint32_t destination_ip
 The IP of the receiver.
 

Detailed Description

The header of an IPv4 packet.

Definition at line 28 of file ipv4.h.

Member Data Documentation

◆ checksum

uint16_t MaxOS::net::IPV4Header::checksum

The checksum of the header.

Definition at line 40 of file ipv4.h.

◆ destination_ip

uint32_t MaxOS::net::IPV4Header::destination_ip

The IP of the receiver.

Definition at line 43 of file ipv4.h.

◆ flags_and_offset

uint16_t MaxOS::net::IPV4Header::flags_and_offset

Flags (3 bits) and Fragment Offset (13 bits)

Todo:
: bitfield struct?

Definition at line 36 of file ipv4.h.

◆ header_length

uint8_t MaxOS::net::IPV4Header::header_length

The length of the header in 32-bit words (min 5, max 15)

Definition at line 30 of file ipv4.h.

◆ identifier

uint16_t MaxOS::net::IPV4Header::identifier

Unique identifier for the group of fragments of a single IP packet.

Definition at line 35 of file ipv4.h.

◆ protocol

uint8_t MaxOS::net::IPV4Header::protocol

The protocol of the payload (TCP, UDP, ICMP, etc.

Todo:
: enum

Definition at line 39 of file ipv4.h.

◆ source_ip

uint32_t MaxOS::net::IPV4Header::source_ip

The IP of the sender.

Definition at line 42 of file ipv4.h.

◆ time_to_live

uint8_t MaxOS::net::IPV4Header::time_to_live

The maximum hops between devices before the packet is discarded.

Definition at line 38 of file ipv4.h.

◆ total_length

uint16_t MaxOS::net::IPV4Header::total_length

The total length of the IP packet (header + data) in bytes.

Definition at line 33 of file ipv4.h.

◆ type_of_service

uint8_t MaxOS::net::IPV4Header::type_of_service

The type of service (low delay, high throughput, high reliability, etc.

Todo:
: enum

Definition at line 32 of file ipv4.h.

◆ version

uint8_t MaxOS::net::IPV4Header::version

The version of the IP protocol (4 for IPv4)

Definition at line 31 of file ipv4.h.


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