PcapPlusPlus
22.11
|
#include <IPv4Layer.h>
Public Member Functions | |
IPv4Option (uint8_t *optionRawData) | |
~IPv4Option () | |
std::vector< IPv4Address > | getValueAsIpList () const |
IPv4TimestampOptionValue | getTimestampOptionValue () const |
IPv4OptionTypes | getIPv4OptionType () const |
size_t | getTotalSize () const |
size_t | getDataSize () const |
Public Member Functions inherited from pcpp::TLVRecord< uint8_t, uint8_t > | |
TLVRecord (uint8_t *recordRawData) | |
TLVRecord (const TLVRecord &other) | |
virtual | ~TLVRecord () |
void | assign (uint8_t *recordRawData) |
TLVRecord & | operator= (const TLVRecord &other) |
bool | operator== (const TLVRecord &rhs) const |
bool | operator!= (const TLVRecord &rhs) const |
uint8_t | getType () const |
uint8_t * | getValue () const |
bool | isNull () const |
bool | isNotNull () const |
uint8_t * | getRecordBasePtr () const |
void | purgeRecordData () |
T | getValueAs (size_t offset=0) const |
bool | setValue (T newValue, int valueOffset=0) |
A wrapper class for IPv4 options. This class does not create or modify IPv4 option records, but rather serves as a wrapper and provides useful methods for retrieving data from them
|
inline |
A c'tor for this class that gets a pointer to the option raw data (byte array)
[in] | optionRawData | A pointer to the IPv4 option raw data |
|
inline |
A d'tor for this class, currently does nothing
|
inlinevirtual |
Implements pcpp::TLVRecord< uint8_t, uint8_t >.
|
inline |
|
inline |
A method for parsing the IPv4 timestamp option value. This method is relevant only for IPv4 timestamp option. For other option types an empty result will be returned. The returned structure contains the timestamp value type (timestamp only, timestamp + IP addresses, etc.) as well as 2 vectors containing the list of timestamps and the list of IP addresses (if applicable for the timestamp value type). Blank timestamps or IP addresses (meaning zeroed values - timestamp=0 or IP address=0.0.0.0) will not be added to the lists. If some error occurs during the parsing or the value is invalid an empty result is returned
|
inlinevirtual |
Implements pcpp::TLVRecord< uint8_t, uint8_t >.
|
inline |
A method for parsing the IPv4 option value as a list of IPv4 addresses. This method is relevant only for certain types of IPv4 options which their value is a list of IPv4 addresses such as IPV4OPT_RecordRoute, IPV4OPT_StrictSourceRoute, IPV4OPT_LooseSourceRoute, etc. This method returns a vector of the IPv4 addresses. Blank IP addresses (meaning zeroed addresses - 0.0.0.0) will not be added to the returned list. If some error occurs during the parsing or the value is invalid an empty vector is returned