PcapPlusPlus
pcpp::iphdr Struct Reference

#include <IPv4Layer.h>

Public Attributes

uint8_t internetHeaderLength:4
 
uint8_t ipVersion:4
 
uint8_t typeOfService
 
uint16_t totalLength
 
uint16_t ipId
 
uint16_t fragmentOffset
 
uint8_t timeToLive
 
uint8_t protocol
 
uint16_t headerChecksum
 
uint32_t ipSrc
 
uint32_t ipDst
 

Detailed Description

Represents an IPv4 protocol header

Member Data Documentation

◆ fragmentOffset

uint16_t pcpp::iphdr::fragmentOffset

Fragment offset field, measured in units of eight-byte blocks (64 bits)

◆ headerChecksum

uint16_t pcpp::iphdr::headerChecksum

Error-checking of the header

◆ internetHeaderLength

uint8_t pcpp::iphdr::internetHeaderLength

IP header length, has the value of 5 for IPv4

◆ ipDst

uint32_t pcpp::iphdr::ipDst

IPv4 address of the receiver of the packet

◆ ipId

uint16_t pcpp::iphdr::ipId

Identification field. Primarily used for uniquely identifying the group of fragments of a single IP datagram

◆ ipSrc

uint32_t pcpp::iphdr::ipSrc

IPv4 address of the sender of the packet

◆ ipVersion

uint8_t pcpp::iphdr::ipVersion

IP version number, has the value of 4 for IPv4

◆ protocol

uint8_t pcpp::iphdr::protocol

Defines the protocol used in the data portion of the IP datagram. Must be one of IPProtocolTypes

◆ timeToLive

uint8_t pcpp::iphdr::timeToLive

An eight-bit time to live field helps prevent datagrams from persisting (e.g. going in circles) on an internet. In practice, the field has become a hop count

◆ totalLength

uint16_t pcpp::iphdr::totalLength

Entire packet (fragment) size, including header and data, in bytes

◆ typeOfService

uint8_t pcpp::iphdr::typeOfService

type of service, same as Differentiated Services Code Point (DSCP)