22 #define MBUFRAWPACKET_OBJECT_TYPE 1
54 struct rte_mbuf* m_MBuf;
55 struct rte_mempool* m_Mempool;
56 uint16_t m_MbufDataSize;
59 void setMBuf(
struct rte_mbuf* mBuf, timespec timestamp);
60 bool init(
struct rte_mempool* mempool);
61 bool initFromRawPacket(
const RawPacket* rawPacket,
struct rte_mempool* mempool);
70 m_OwnsRawData =
false;
138 return MBUFRAWPACKET_OBJECT_TYPE;
160 void appendData(
const uint8_t* dataToAppend,
size_t dataToAppendLen)
override;
169 void insertData(
int atIndex,
const uint8_t* dataToInsert,
size_t dataToInsertLen)
override;
178 bool removeData(
int atIndex,
size_t numOfBytesToRemove)
override;
213 bool doSetRawData(
const uint8_t* pRawData,
int rawDataLen,
bool takeOwnership, timespec timestamp,
Definition: DpdkDevice.h:168
Definition: KniDevice.h:116
Definition: MBufRawPacket.h:47
bool doSetRawData(const uint8_t *pRawData, int rawDataLen, bool takeOwnership, timespec timestamp, LinkLayerType layerType, int frameLength) override
bool initFromRawPacket(const RawPacket *rawPacket, DpdkDevice *device)
Initialize an instance of this class and copies the content of a RawPacket object....
MBufRawPacket(const MBufRawPacket &other)
rte_mbuf * getMBuf()
Definition: MBufRawPacket.h:128
bool removeData(int atIndex, size_t numOfBytesToRemove) override
bool reallocateData(size_t newBufferLength) override
void setFreeMbuf(bool val=true)
Definition: MBufRawPacket.h:190
MBufRawPacket * clone() const override
Clone this MBufRawPacket object. See copy constructor for details. The caller is responsible for the ...
uint8_t getObjectType() const override
Definition: MBufRawPacket.h:136
void appendData(const uint8_t *dataToAppend, size_t dataToAppendLen) override
bool init(DpdkDevice *device)
Initialize an instance of this class from DpdkDevice. Initialization includes allocating an mbuf from...
MBufRawPacket()
Definition: MBufRawPacket.h:68
MBufRawPacket & operator=(const MBufRawPacket &other)
void insertData(int atIndex, const uint8_t *dataToInsert, size_t dataToInsertLen) override
void clear() override
Clears the object and frees the mbuf.
Definition: PointerVector.h:50
Definition: RawPacket.h:261
The main namespace for the PcapPlusPlus lib.
Definition: AssertionUtils.h:19
LinkLayerType
An enum describing all known link layer type. Taken from: http://www.tcpdump.org/linktypes....
Definition: RawPacket.h:22