PcapPlusPlus
22.11
|
#include <TLVData.h>
Public Member Functions | |
TLVRecordReader () | |
TLVRecordReader (const TLVRecordReader &other) | |
virtual | ~TLVRecordReader () |
TLVRecordReader & | operator= (const TLVRecordReader &other) |
TLVRecordType | getFirstTLVRecord (uint8_t *tlvDataBasePtr, size_t tlvDataLen) const |
TLVRecordType | getNextTLVRecord (TLVRecordType &record, uint8_t *tlvDataBasePtr, size_t tlvDataLen) const |
TLVRecordType | getTLVRecord (uint32_t recordType, uint8_t *tlvDataBasePtr, size_t tlvDataLen) const |
size_t | getTLVRecordCount (uint8_t *tlvDataBasePtr, size_t tlvDataLen) const |
void | changeTLVRecordCount (int changedBy) |
A class for reading TLV records data out of a byte stream. This class contains helper methods for retrieving and counting TLV records. This is a template class that expects template argument class derived from TLVRecord.
|
inline |
A default c'tor for this class
|
inline |
A default copy c'tor for this class
|
inlinevirtual |
A d'tor for this class which currently does nothing
|
inline |
As described in getTLVRecordCount(), the TLV record count is being cached for efficiency purposes. So if the number of TLV records change, it's the user's responsibility to call this method with the number of TLV records being added or removed. If records were added the change should be a positive number, or a negative number if records were removed
[in] | changedBy | Number of records that were added or removed |
|
inline |
Get the first TLV record out of a byte stream
[in] | tlvDataBasePtr | A pointer to the TLV data byte stream |
[in] | tlvDataLen | The TLV data byte stream length |
|
inline |
Get a TLV record that follows a given TLV record in a byte stream
[in] | record | A given TLV record |
[in] | tlvDataBasePtr | A pointer to the TLV data byte stream |
[in] | tlvDataLen | The TLV data byte stream length |
|
inline |
Search for the first TLV record that corresponds to a given record type (the 'T' in Type-Length-Value)
[in] | recordType | The record type to search for |
[in] | tlvDataBasePtr | A pointer to the TLV data byte stream |
[in] | tlvDataLen | The TLV data byte stream length |
|
inline |
Get the TLV record count in a given TLV data byte stream. For efficiency purposes the count is being cached so only the first call to this method will go over all the TLV records, while all consequent calls will return the cached number. This implies that if there is a change in the number of records, it's the user's responsibility to call changeTLVRecordCount() with the record count change
[in] | tlvDataBasePtr | A pointer to the TLV data byte stream |
[in] | tlvDataLen | The TLV data byte stream length |
|
inline |
Overload of the assignment operator for this class
[in] | other | The TLVRecordReader instance to assign |