PcapPlusPlus  21.05
pcpp::IPv6FragmentationHeader Class Reference

#include <IPv6Extensions.h>

Inheritance diagram for pcpp::IPv6FragmentationHeader:
pcpp::IPv6Extension

Classes

struct  ipv6_frag_header
 

Public Member Functions

 IPv6FragmentationHeader (uint32_t fragId, uint16_t fragOffset, bool lastFragment)
 
ipv6_frag_headergetFragHeader () const
 
bool isFirstFragment () const
 
bool isLastFragment () const
 
bool isMoreFragments () const
 
uint16_t getFragmentOffset () const
 
- Public Member Functions inherited from pcpp::IPv6Extension
virtual size_t getExtensionLen () const
 
IPv6ExtensionType getExtensionType () const
 
virtual ~IPv6Extension ()
 
IPv6ExtensiongetNextHeader () const
 

Additional Inherited Members

- Public Types inherited from pcpp::IPv6Extension
enum  IPv6ExtensionType {
  IPv6HopByHop = 0, IPv6Routing = 43, IPv6Fragmentation = 44, IPv6AuthenticationHdr = 51,
  IPv6Destination = 60, IPv6ExtensionUnknown = 255
}
 

Detailed Description

Represents an IPv6 fragmentation extension header and allows easy access to all fragmentation parameters

Constructor & Destructor Documentation

◆ IPv6FragmentationHeader()

pcpp::IPv6FragmentationHeader::IPv6FragmentationHeader ( uint32_t  fragId,
uint16_t  fragOffset,
bool  lastFragment 
)

A c'tor for creating a new IPv6 fragmentation extension object not bounded to a packet. Useful for adding new extensions to an IPv6 layer with IPv6Layer::addExtension()

Parameters
[in]fragIdFragmentation ID
[in]fragOffsetFragmentation offset
[in]lastFragmentIndicates whether this fragment is the last one

Member Function Documentation

◆ getFragHeader()

ipv6_frag_header* pcpp::IPv6FragmentationHeader::getFragHeader ( ) const
inline

Get a pointer to the fragmentation header. Notice the returned pointer points directly to the data, so every change will modify the actual packet data

Returns
A pointer to the ipv6_frag_header

◆ getFragmentOffset()

uint16_t pcpp::IPv6FragmentationHeader::getFragmentOffset ( ) const
Returns
The fragment offset

◆ isFirstFragment()

bool pcpp::IPv6FragmentationHeader::isFirstFragment ( ) const
Returns
True if this is the first fragment (which usually contains the L4 header), false otherwise

◆ isLastFragment()

bool pcpp::IPv6FragmentationHeader::isLastFragment ( ) const
Returns
True if this is the last fragment, false otherwise

◆ isMoreFragments()

bool pcpp::IPv6FragmentationHeader::isMoreFragments ( ) const
Returns
True if the "more fragments" bit is set, meaning more fragments are expected to follow this fragment