PcapPlusPlus
22.11
|
#include <DhcpV6Layer.h>
Static Public Member Functions | |
static bool | isDhcpV6Port (uint16_t port) |
static bool | isDataValid (const uint8_t *data, size_t dataLen) |
Represents a DHCPv6 (Dynamic Host Configuration Protocol version 6) protocol layer
pcpp::DhcpV6Layer::DhcpV6Layer | ( | uint8_t * | data, |
size_t | dataLen, | ||
Layer * | prevLayer, | ||
Packet * | packet | ||
) |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data |
[in] | dataLen | Size of the data in bytes |
[in] | prevLayer | A pointer to the previous layer |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
pcpp::DhcpV6Layer::DhcpV6Layer | ( | DhcpV6MessageType | messageType, |
uint32_t | transactionId | ||
) |
A constructor that creates the layer from scratch
[in] | messageType | A DHCPv6 message type to be set |
[in] | transactionId | The transaction ID to be set. Notice the transaction ID is 3-byte long so the value shouldn't exceed 0xFFFFFF |
DhcpV6Option pcpp::DhcpV6Layer::addOption | ( | const DhcpV6OptionBuilder & | optionBuilder | ) |
Add a new DHCPv6 option at the end of the layer
[in] | optionBuilder | A DhcpV6OptionBuilder object that contains the requested DHCPv6 option data to add |
DhcpV6Option pcpp::DhcpV6Layer::addOptionAfter | ( | const DhcpV6OptionBuilder & | optionBuilder, |
DhcpV6OptionType | optionType | ||
) |
Add a new DHCPv6 option after an existing one
[in] | optionBuilder | A DhcpV6OptionBuilder object that contains the requested DHCPv6 option data to add |
[in] | optionType | The DHCPv6 option type which the newly added option will come after |
DhcpV6Option pcpp::DhcpV6Layer::addOptionBefore | ( | const DhcpV6OptionBuilder & | optionBuilder, |
DhcpV6OptionType | optionType | ||
) |
Add a new DHCPv6 option before an existing one
[in] | optionBuilder | A DhcpV6OptionBuilder object that contains the requested DHCPv6 option data to add |
[in] | optionType | The DHCPv6 option type which the newly added option will come before |
|
inlinevirtual |
Does nothing for this layer
Implements pcpp::Layer.
DhcpV6Option pcpp::DhcpV6Layer::getFirstOptionData | ( | ) | const |
|
inlinevirtual |
Implements pcpp::Layer.
DhcpV6MessageType pcpp::DhcpV6Layer::getMessageType | ( | ) | const |
std::string pcpp::DhcpV6Layer::getMessageTypeAsString | ( | ) | const |
DhcpV6Option pcpp::DhcpV6Layer::getNextOptionData | ( | DhcpV6Option | dhcpv6Option | ) | const |
Get the DHCPv6 option that comes after a given option. If the given option was the last one, the returned value will contain a logical NULL (DhcpV6Option::isNull() == true)
[in] | dhcpv6Option | A given DHCPv6 option |
size_t pcpp::DhcpV6Layer::getOptionCount | ( | ) | const |
DhcpV6Option pcpp::DhcpV6Layer::getOptionData | ( | DhcpV6OptionType | option | ) | const |
Get a DHCPv6 option by type
[in] | option | DHCPv6 option type |
|
inlinevirtual |
Implements pcpp::Layer.
uint32_t pcpp::DhcpV6Layer::getTransactionID | ( | ) | const |
|
inlinestatic |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of an DHCPv6 layer |
[in] | dataLen | The length of the byte stream |
|
inlinestatic |
A static method that checks whether a port is considered as a DHCPv6 port
[in] | port | The port number to check |
|
inlinevirtual |
Does nothing for this layer (DhcpV6Layer is always last)
Implements pcpp::Layer.
bool pcpp::DhcpV6Layer::removeAllOptions | ( | ) |
Remove all DHCPv6 options in this layer
bool pcpp::DhcpV6Layer::removeOption | ( | DhcpV6OptionType | optionType | ) |
Remove an existing DHCPv6 option from the layer
[in] | optionType | The DHCPv6 option type to remove |
void pcpp::DhcpV6Layer::setMessageType | ( | DhcpV6MessageType | messageType | ) |
Set the message type for this layer
[in] | messageType | The message type to set |
void pcpp::DhcpV6Layer::setTransactionID | ( | uint32_t | transactionId | ) | const |
Set the transaction ID for this DHCPv6 message
[in] | transactionId | The transaction ID value to set |
|
virtual |
Implements pcpp::Layer.