mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Add extract_metadata to main PDU classes
This commit is contained in:
@@ -179,6 +179,7 @@ public:
|
||||
IPSEC_ESP,
|
||||
PKTAP,
|
||||
MPLS,
|
||||
UNKNOWN = 999,
|
||||
USER_DEFINED_PDU = 1000
|
||||
};
|
||||
|
||||
@@ -188,6 +189,37 @@ public:
|
||||
*/
|
||||
static const endian_type endianness = BE;
|
||||
|
||||
/**
|
||||
* \brief Type used to store a PDU header's data.
|
||||
*/
|
||||
struct metadata {
|
||||
/**
|
||||
* \brief Default constructor
|
||||
*/
|
||||
metadata();
|
||||
|
||||
/**
|
||||
* \brief Constructs an instance of metadata using the given values
|
||||
|
||||
*/
|
||||
metadata(uint32_t header_size, PDUType current_type, PDUType next_type);
|
||||
|
||||
/**
|
||||
* The total header size for the current protocol
|
||||
*/
|
||||
uint32_t header_size;
|
||||
|
||||
/**
|
||||
* The current PDU type
|
||||
*/
|
||||
PDUType current_pdu_type;
|
||||
|
||||
/**
|
||||
* The next PDU type
|
||||
*/
|
||||
PDUType next_pdu_type;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Default constructor.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user