PcapPlusPlus
Next
|
#include <NflogLayer.h>
Public Member Functions | |
NflogLayer (uint8_t *data, size_t dataLen, Packet *packet) | |
nflog_header * | getNflogHeader () const |
uint8_t | getFamily () |
uint8_t | getVersion () |
uint16_t | getResourceId () |
NflogTlv | getTlvByType (NflogTlvType type) const |
void | parseNextLayer () override |
size_t | getHeaderLen () const override |
void | computeCalculateFields () override |
std::string | toString () const override |
OsiModelLayer | getOsiModelLayer () const override |
Public Member Functions inherited from pcpp::Layer | |
~Layer () override | |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const override |
Static Public Member Functions | |
static bool | isDataValid (const uint8_t *data, size_t dataLen) |
Represents an NFLOG protocol layer
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data (will be casted to ether_header) |
[in] | dataLen | Size of the data in bytes |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
|
inlineoverridevirtual |
Does nothing for this layer
Implements pcpp::Layer.
uint8_t pcpp::NflogLayer::getFamily | ( | ) |
Get address family of the packet. e.g. 2 for ipv4 and 10 for ipv6
|
overridevirtual |
Implements pcpp::Layer.
|
inline |
Get a pointer to the Nflog header.
|
inlineoverridevirtual |
Implements pcpp::Layer.
uint16_t pcpp::NflogLayer::getResourceId | ( | ) |
Get Resource Id in packet header On one netlink socket it's possible to listen to several nflog groups; the resource ID is the nflog group for the packet
NflogTlv pcpp::NflogLayer::getTlvByType | ( | NflogTlvType | type | ) | const |
Get a TLV object found with the input type. if no tlv is found, the internal value of the object will set to nullptr
[in] | type | type of tlv by using enum class defined as NflogTlvType |
uint8_t pcpp::NflogLayer::getVersion | ( | ) |
Get Version number inside packet header The version field is 0 for the current version of the pseudo-header
|
static |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of an NFLOG packet |
[in] | dataLen | The length of the byte stream |
|
overridevirtual |
Currently identifies the following next layers: IPv4Layer, IPv6Layer using address family Otherwise sets PayloadLayer
Implements pcpp::Layer.
|
overridevirtual |
Implements pcpp::Layer.