PcapPlusPlus
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 ()
 
bool isFirstFragment ()
 
bool isLastFragment ()
 
bool isMoreFragments ()
 
uint16_t getFragmentOffset ()
 
- Public Member Functions inherited from pcpp::IPv6Extension
virtual size_t getExtensionLen () const
 
IPv6ExtensionType getExtensionType ()
 
virtual ~IPv6Extension ()
 

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

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

ipv6_frag_header* pcpp::IPv6FragmentationHeader::getFragHeader ( )
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
uint16_t pcpp::IPv6FragmentationHeader::getFragmentOffset ( )
Returns
The fragment offset
bool pcpp::IPv6FragmentationHeader::isFirstFragment ( )
Returns
True if this is the first fragment (which usually contains the L4 header), false otherwise
bool pcpp::IPv6FragmentationHeader::isLastFragment ( )
Returns
True if this is the last fragment, false otherwise
bool pcpp::IPv6FragmentationHeader::isMoreFragments ( )
Returns
True if the "more fragments" bit is set, meaning more fragments are expected to follow this fragment