PcapPlusPlus
21.05
|
#include <PPPoELayer.h>
Public Member Functions | |
PPPoESessionLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) | |
PPPoESessionLayer (uint8_t version, uint8_t type, uint16_t sessionId, uint16_t pppNextProtocol) | |
uint16_t | getPPPNextProtocol () const |
void | setPPPNextProtocol (uint16_t nextProtocol) |
virtual void | parseNextLayer () |
virtual size_t | getHeaderLen () const |
virtual std::string | toString () const |
Public Member Functions inherited from pcpp::PPPoELayer | |
pppoe_header * | getPPPoEHeader () const |
virtual void | computeCalculateFields () |
OsiModelLayer | getOsiModelLayer () const |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
Layer * | getNextLayer () const |
Layer * | getPrevLayer () const |
ProtocolType | getProtocol () 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 |
Static Public Member Functions | |
static bool | isDataValid (const uint8_t *data, size_t dataLen) |
Additional Inherited Members | |
Public Types inherited from pcpp::PPPoELayer | |
enum | PPPoECode { PPPOE_CODE_SESSION = 0x00, PPPOE_CODE_PADO = 0x07, PPPOE_CODE_PADI = 0x09, PPPOE_CODE_PADG = 0x0a, PPPOE_CODE_PADC = 0x0b, PPPOE_CODE_PADQ = 0x0c, PPPOE_CODE_PADR = 0x19, PPPOE_CODE_PADS = 0x65, PPPOE_CODE_PADT = 0xa7, PPPOE_CODE_PADM = 0xd3, PPPOE_CODE_PADN = 0xd4 } |
Describes the PPPoE session protocol
|
inline |
A constructor that creates the layer from an existing packet raw data
[in] | data | A pointer to the raw data (will be casted to pppoe_header) |
[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 |
|
inline |
A constructor that allocates a new PPPoE Session header with version, type and session ID
[in] | version | PPPoE version |
[in] | type | PPPoE type |
[in] | sessionId | PPPoE session ID |
[in] | pppNextProtocol | The next protocol to come after the PPPoE session header. Should be one of the PPP_* macros listed below |
|
inlinevirtual |
Implements pcpp::Layer.
uint16_t pcpp::PPPoESessionLayer::getPPPNextProtocol | ( | ) | const |
|
inlinestatic |
A static method that validates the input data
[in] | data | The pointer to the beginning of byte stream of a packet |
[in] | dataLen | The length of the byte stream |
|
virtual |
Currently identifies the following next layers: IPv4Layer, IPv6Layer. Otherwise sets PayloadLayer
Implements pcpp::Layer.
void pcpp::PPPoESessionLayer::setPPPNextProtocol | ( | uint16_t | nextProtocol | ) |
Set the field that describes which header comes after the PPPoE session header
[in] | nextProtocol | The protocol value. Should be one of the PPP_* macros listed below |
|
virtual |
Implements pcpp::Layer.