61 return data && dataLen >=
sizeof(cisco_hdlc_header);
69 return sizeof(cisco_hdlc_header);
87 struct cisco_hdlc_header
94 static_assert(
sizeof(cisco_hdlc_header) == 4,
"cisco_hdlc_header size is not 4 bytes");
96 cisco_hdlc_header* getCiscoHdlcHeader()
const
98 return reinterpret_cast<cisco_hdlc_header*
>(m_Data);
101 void setNextProtocol(uint16_t protocol);
Definition: CiscoHdlcLayer.h:10
size_t getHeaderLen() const override
Definition: CiscoHdlcLayer.h:67
AddressType
Definition: CiscoHdlcLayer.h:15
@ Unknown
Unknown address type.
void setAddressValue(uint8_t address)
static bool isDataValid(const uint8_t *data, size_t dataLen)
Definition: CiscoHdlcLayer.h:59
OsiModelLayer getOsiModelLayer() const override
Definition: CiscoHdlcLayer.h:80
~CiscoHdlcLayer() override=default
Default destructor for this layer.
CiscoHdlcLayer(uint8_t *data, size_t dataLen, Packet *packet)
Definition: CiscoHdlcLayer.h:28
void setAddress(AddressType address)
std::string toString() const override
CiscoHdlcLayer(AddressType address)
AddressType getAddress() const
uint16_t getNextProtocol() const
uint8_t getAddressValue() const
void computeCalculateFields() override
Calculate the Next Protocol when possible.
void parseNextLayer() override
Parses the next layer. Currently, supports IPv4 and IPv6.
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
An enum representing OSI model layers.
Definition: ProtocolType.h:225
@ OsiModelDataLinkLayer
Data link layer (layer 2)
Definition: ProtocolType.h:229
const ProtocolType CiscoHDLC
Cisco HDLC protocol.
Definition: ProtocolType.h:221