PcapPlusPlus  23.09
pcpp::NflogTlv Class Reference

#include <NflogLayer.h>

Public Member Functions

 NflogTlv (uint8_t *recordRawData)
 
size_t getTotalSize () const
 
void assign (uint8_t *recordRawData)
 
bool isNull () const
 
uint16_t getType () const
 
uint8_t * getRecordBasePtr () const
 
uint8_t * getValue () const
 

Detailed Description

A wrapper class for NFLOG TLV fields. This class does not create or modify TLVs related to NFLOG, but rather serves as a wrapper and provides useful methods for setting and retrieving data to/from them

Constructor & Destructor Documentation

◆ NflogTlv()

pcpp::NflogTlv::NflogTlv ( uint8_t *  recordRawData)
inlineexplicit

A c'tor for this class that gets a pointer to the option raw data (byte array)

Parameters
[in]recordRawDataA pointer to the option raw data

Member Function Documentation

◆ assign()

void pcpp::NflogTlv::assign ( uint8_t *  recordRawData)
inline

Assign a pointer to the TLV record raw data (byte array)

Parameters
[in]recordRawDataA pointer to the TLV record raw data

◆ getRecordBasePtr()

uint8_t* pcpp::NflogTlv::getRecordBasePtr ( ) const
inline
Returns
A pointer to the TLV record raw data byte stream

◆ getTotalSize()

size_t pcpp::NflogTlv::getTotalSize ( ) const
inline
Returns
recordLen attribute in NflogTLVRawData

◆ getType()

uint16_t pcpp::NflogTlv::getType ( ) const
inline
Returns
The type field of the record (the 'T' in Type-Length-Value)

◆ getValue()

uint8_t* pcpp::NflogTlv::getValue ( ) const
inline
Returns
A pointer to the value of the record as byte array (the 'V' in Type-Length- Value)

◆ isNull()

bool pcpp::NflogTlv::isNull ( ) const
inline
Returns
True if the TLV record raw data is nullptr, false otherwise