|
PcapPlusPlus
19.12
|
1 #ifndef PCAPPP_MBUF_RAW_PACKET
2 #define PCAPPP_MBUF_RAW_PACKET
21 #define MBUFRAWPACKET_OBJECT_TYPE 1
47 static const int MBUF_DATA_SIZE;
50 struct rte_mbuf* m_MBuf;
51 struct rte_mempool* m_Mempool;
54 void setMBuf(
struct rte_mbuf* mBuf, timeval timestamp);
55 bool init(
struct rte_mempool* mempool);
56 bool initFromRawPacket(
const RawPacket* rawPacket,
struct rte_mempool* mempool);
64 MBufRawPacket() :
RawPacket(), m_MBuf(NULL), m_Mempool(NULL), m_FreeMbuf(true) { m_DeleteRawDataAtDestructor =
false; }
135 virtual inline uint8_t
getObjectType()
const {
return MBUFRAWPACKET_OBJECT_TYPE; }
172 void appendData(
const uint8_t* dataToAppend,
size_t dataToAppendLen);
182 void insertData(
int atIndex,
const uint8_t* dataToInsert,
size_t dataToInsertLen);
192 bool removeData(
int atIndex,
size_t numOfBytesToRemove);
MBufRawPacket()
Definition: MBufRawPacket.h:64
void insertData(int atIndex, const uint8_t *dataToInsert, size_t dataToInsertLen)
void setFreeMbuf(bool val=true)
Definition: MBufRawPacket.h:207
Definition: DpdkDevice.h:164
Definition: RawPacket.h:29
PointerVector< MBufRawPacket > MBufRawPacketVector
Definition: MBufRawPacket.h:214
bool removeData(int atIndex, size_t numOfBytesToRemove)
Definition: KniDevice.h:120
bool reallocateData(size_t newBufferLength)
virtual uint8_t getObjectType() const
Definition: MBufRawPacket.h:135
bool setRawData(const uint8_t *pRawData, int rawDataLen, timeval timestamp, LinkLayerType layerType=LINKTYPE_ETHERNET, int frameLength=-1)
void appendData(const uint8_t *dataToAppend, size_t dataToAppendLen)
The main namespace for the PcapPlusPlus lib.
LinkLayerType
Definition: RawPacket.h:24
rte_mbuf * getMBuf()
Definition: MBufRawPacket.h:128
Definition: PointerVector.h:24
Definition: MBufRawPacket.h:43
Definition: RawPacket.h:219
MBufRawPacket & operator=(const MBufRawPacket &other)