PcapPlusPlus
Next
|
#include <CiscoHdlcLayer.h>
Public Types | |
enum class | AddressType { Unicast = 0x0f , Multicast = 0x8f , Unknown } |
Public Member Functions | |
CiscoHdlcLayer (uint8_t *data, size_t dataLen, Packet *packet) | |
CiscoHdlcLayer (AddressType address) | |
~CiscoHdlcLayer () override=default | |
Default destructor for this layer. | |
AddressType | getAddress () const |
uint8_t | getAddressValue () const |
void | setAddress (AddressType address) |
void | setAddressValue (uint8_t address) |
uint16_t | getNextProtocol () const |
size_t | getHeaderLen () const override |
void | computeCalculateFields () override |
Calculate the Next Protocol when possible. | |
void | parseNextLayer () override |
Parses the next layer. Currently, supports IPv4 and IPv6. | |
std::string | toString () const override |
OsiModelLayer | getOsiModelLayer () const override |
![]() | |
~Layer () override | |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () const |
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
uint8_t * | getData () const |
size_t | getDataLen () const |
uint8_t * | getLayerPayload () const |
size_t | getLayerPayloadSize () const |
bool | isAllocatedToPacket () const |
void | copyData (uint8_t *toArr) const |
uint8_t * | getDataPtr (size_t offset=0) const override |
Static Public Member Functions | |
static bool | isDataValid (const uint8_t *data, size_t dataLen) |
Represents a Cisco HDLC protocol layer
|
strong |
|
inline |
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] | packet | A pointer to the Packet instance where layer will be stored |
|
explicit |
A constructor that creates a new Cisco HDLC layer
[in] | address | The address field value |
AddressType pcpp::CiscoHdlcLayer::getAddress | ( | ) | const |
uint8_t pcpp::CiscoHdlcLayer::getAddressValue | ( | ) | const |
|
inlineoverridevirtual |
Implements pcpp::Layer.
uint16_t pcpp::CiscoHdlcLayer::getNextProtocol | ( | ) | const |
|
inlineoverridevirtual |
Implements pcpp::Layer.
|
inlinestatic |
A static method that validates the input data
[in] | data | The pointer to the beginning of a byte stream of a Cisco HDLC packet |
[in] | dataLen | The length of the byte stream |
void pcpp::CiscoHdlcLayer::setAddress | ( | AddressType | address | ) |
Set the address field enum value
[in] | address | The address enum value to set |
void pcpp::CiscoHdlcLayer::setAddressValue | ( | uint8_t | address | ) |
Set the address field value
[in] | address | The address value to set |
|
overridevirtual |
Implements pcpp::Layer.