24 #define MBUFRAWPACKET_OBJECT_TYPE 1
56 struct rte_mbuf* m_MBuf;
57 struct rte_mempool* m_Mempool;
58 uint16_t m_MbufDataSize;
61 void setMBuf(
struct rte_mbuf* mBuf, timespec timestamp);
62 bool init(
struct rte_mempool* mempool);
63 bool initFromRawPacket(
const RawPacket* rawPacket,
struct rte_mempool* mempool);
74 m_DeleteRawDataAtDestructor =
false;
158 return MBUFRAWPACKET_OBJECT_TYPE;
186 bool setRawData(
const uint8_t* pRawData,
int rawDataLen, timespec timestamp,
201 void appendData(
const uint8_t* dataToAppend,
size_t dataToAppendLen);
212 void insertData(
int atIndex,
const uint8_t* dataToInsert,
size_t dataToInsertLen);
Definition: DpdkDevice.h:179
Definition: KniDevice.h:125
Definition: MBufRawPacket.h:49
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)
void insertData(int atIndex, const uint8_t *dataToInsert, size_t dataToInsertLen)
rte_mbuf * getMBuf()
Definition: MBufRawPacket.h:146
bool removeData(int atIndex, size_t numOfBytesToRemove)
void setFreeMbuf(bool val=true)
Definition: MBufRawPacket.h:239
uint8_t getObjectType() const override
Definition: MBufRawPacket.h:156
bool init(DpdkDevice *device)
Initialize an instance of this class from DpdkDevice. Initialization includes allocating an mbuf from...
MBufRawPacket()
Definition: MBufRawPacket.h:72
MBufRawPacket & operator=(const MBufRawPacket &other)
bool setRawData(const uint8_t *pRawData, int rawDataLen, timespec timestamp, LinkLayerType layerType=LINKTYPE_ETHERNET, int frameLength=-1)
bool reallocateData(size_t newBufferLength)
void appendData(const uint8_t *dataToAppend, size_t dataToAppendLen)
Definition: PointerVector.h:29
Definition: RawPacket.h:269
The main namespace for the PcapPlusPlus lib.
PointerVector< MBufRawPacket > MBufRawPacketVector
Definition: MBufRawPacket.h:249
LinkLayerType
Definition: RawPacket.h:25
@ LINKTYPE_ETHERNET
Definition: RawPacket.h:29