24 #if (BYTE_ORDER == LITTLE_ENDIAN)
111 :
Layer(data, dataLen, prevLayer, packet, protocol)
116 size_t additionalBytesToAllocate = 0);
173 static inline bool isDataValid(
const uint8_t* data,
size_t dataLen);
278 return std::string((
const char*)m_Data->recordValue, dataSize);
425 static inline bool isDataValid(
const uint8_t* data,
size_t dataLen);
448 PPPoETag addTagAt(
const PPPoETagBuilder& tagBuilder,
int offset);
450 uint8_t* getTagBasePtr()
const
455 std::string codeToString(
PPPoECode code)
const;
462 return data && dataLen >=
sizeof(
pppoe_header) +
sizeof(uint16_t);
473 #define PCPP_PPP_PADDING 0x1
475 #define PCPP_PPP_ROHC_SCID 0x3
477 #define PCPP_PPP_ROHC_LCID 0x5
479 #define PCPP_PPP_IP 0x21
481 #define PCPP_PPP_OSI 0x23
483 #define PCPP_PPP_XNSIDP 0x25
485 #define PCPP_PPP_DEC4 0x27
487 #define PCPP_PPP_AT 0x29
489 #define PCPP_PPP_IPX 0x2b
491 #define PCPP_PPP_VJC_COMP 0x2d
493 #define PCPP_PPP_VJC_UNCOMP 0x2f
495 #define PCPP_PPP_BCP 0x31
497 #define PCPP_PPP_ST 0x33
499 #define PCPP_PPP_VINES 0x35
501 #define PCPP_PPP_AT_EDDP 0x39
503 #define PCPP_PPP_AT_SB 0x3b
505 #define PCPP_PPP_MP 0x3d
507 #define PCPP_PPP_NB 0x3f
509 #define PCPP_PPP_CISCO 0x41
511 #define PCPP_PPP_ASCOM 0x43
513 #define PCPP_PPP_LBLB 0x45
515 #define PCPP_PPP_RL 0x47
517 #define PCPP_PPP_SDTP 0x49
519 #define PCPP_PPP_LLC 0x4b
521 #define PCPP_PPP_SNA 0x4d
523 #define PCPP_PPP_IPV6HC 0x4f
525 #define PCPP_PPP_KNX 0x51
527 #define PCPP_PPP_ENCRYPT 0x53
529 #define PCPP_PPP_ILE 0x55
531 #define PCPP_PPP_IPV6 0x57
533 #define PCPP_PPP_MUX 0x59
535 #define PCPP_PPP_VSNP 0x5b
537 #define PCPP_PPP_TNP 0x5d
539 #define PCPP_PPP_RTP_FH 0x61
541 #define PCPP_PPP_RTP_CTCP 0x63
543 #define PCPP_PPP_RTP_CNTCP 0x65
545 #define PCPP_PPP_RTP_CUDP8 0x67
547 #define PCPP_PPP_RTP_CRTP8 0x69
549 #define PCPP_PPP_STAMPEDE 0x6f
551 #define PCPP_PPP_MPPLUS 0x73
553 #define PCPP_PPP_NTCITS_IPI 0xc1
555 #define PCPP_PPP_ML_SLCOMP 0xfb
557 #define PCPP_PPP_COMP 0xfd
559 #define PCPP_PPP_STP_HELLO 0x0201
561 #define PCPP_PPP_IBM_SR 0x0203
563 #define PCPP_PPP_DEC_LB 0x0205
565 #define PCPP_PPP_CDP 0x0207
567 #define PCPP_PPP_NETCS 0x0209
569 #define PCPP_PPP_STP 0x020b
571 #define PCPP_PPP_EDP 0x020d
573 #define PCPP_PPP_OSCP 0x0211
575 #define PCPP_PPP_OSCP2 0x0213
577 #define PCPP_PPP_LUXCOM 0x0231
579 #define PCPP_PPP_SIGMA 0x0233
581 #define PCPP_PPP_ACSP 0x0235
583 #define PCPP_PPP_MPLS_UNI 0x0281
585 #define PCPP_PPP_MPLS_MULTI 0x0283
587 #define PCPP_PPP_P12844 0x0285
589 #define PCPP_PPP_TETRA 0x0287
591 #define PCPP_PPP_MFTP 0x0289
593 #define PCPP_PPP_RTP_CTCPND 0x2063
595 #define PCPP_PPP_RTP_CS 0x2065
597 #define PCPP_PPP_RTP_CUDP16 0x2067
599 #define PCPP_PPP_RTP_CRDP16 0x2069
601 #define PCPP_PPP_CCCP 0x4001
603 #define PCPP_PPP_CDPD_MNRP 0x4003
605 #define PCPP_PPP_EXPANDAP 0x4005
607 #define PCPP_PPP_ODSICP 0x4007
609 #define PCPP_PPP_DOCSIS 0x4009
611 #define PCPP_PPP_CETACEANNDP 0x400b
613 #define PCPP_PPP_LZS 0x4021
615 #define PCPP_PPP_REFTEK 0x4023
617 #define PCPP_PPP_FC 0x4025
619 #define PCPP_PPP_EMIT 0x4027
621 #define PCPP_PPP_VSP 0x405b
623 #define PCPP_PPP_TLSP 0x405d
625 #define PCPP_PPP_IPCP 0x8021
627 #define PCPP_PPP_OSINLCP 0x8023
629 #define PCPP_PPP_XNSIDPCP 0x8025
631 #define PCPP_PPP_DECNETCP 0x8027
633 #define PCPP_PPP_ATCP 0x8029
635 #define PCPP_PPP_IPXCP 0x802b
637 #define PCPP_PPP_BRIDGENCP 0x8031
639 #define PCPP_PPP_SPCP 0x8033
641 #define PCPP_PPP_BVCP 0x8035
643 #define PCPP_PPP_MLCP 0x803d
645 #define PCPP_PPP_NBCP 0x803f
647 #define PCPP_PPP_CISCOCP 0x8041
649 #define PCPP_PPP_ASCOMCP 0x8043
651 #define PCPP_PPP_LBLBCP 0x8045
653 #define PCPP_PPP_RLNCP 0x8047
655 #define PCPP_PPP_SDCP 0x8049
657 #define PCPP_PPP_LLCCP 0x804b
659 #define PCPP_PPP_SNACP 0x804d
661 #define PCPP_PPP_IP6HCCP 0x804f
663 #define PCPP_PPP_KNXCP 0x8051
665 #define PCPP_PPP_ECP 0x8053
667 #define PCPP_PPP_ILECP 0x8055
669 #define PCPP_PPP_IPV6CP 0x8057
671 #define PCPP_PPP_MUXCP 0x8059
673 #define PCPP_PPP_VSNCP 0x805b
675 #define PCPP_PPP_TNCP 0x805d
677 #define PCPP_PPP_STAMPEDECP 0x806f
679 #define PCPP_PPP_MPPCP 0x8073
681 #define PCPP_PPP_IPICP 0x80c1
683 #define PCPP_PPP_SLCC 0x80fb
685 #define PCPP_PPP_CCP 0x80fd
687 #define PCPP_PPP_CDPCP 0x8207
689 #define PCPP_PPP_NETCSCP 0x8209
691 #define PCPP_PPP_STPCP 0x820b
693 #define PCPP_PPP_EDPCP 0x820d
695 #define PCPP_PPP_ACSPC 0x8235
697 #define PCPP_PPP_MPLSCP 0x8281
699 #define PCPP_PPP_P12844CP 0x8285
701 #define PCPP_PPP_TETRACP 0x8287
703 #define PCPP_PPP_MFTPCP 0x8289
705 #define PCPP_PPP_LCP 0xc021
707 #define PCPP_PPP_PAP 0xc023
709 #define PCPP_PPP_LQR 0xc025
711 #define PCPP_PPP_SPAP 0xc027
713 #define PCPP_PPP_CBCP 0xc029
715 #define PCPP_PPP_BACP 0xc02b
717 #define PCPP_PPP_BAP 0xc02d
719 #define PCPP_PPP_VSAP 0xc05b
721 #define PCPP_PPP_CONTCP 0xc081
723 #define PCPP_PPP_CHAP 0xc223
725 #define PCPP_PPP_RSAAP 0xc225
727 #define PCPP_PPP_EAP 0xc227
729 #define PCPP_PPP_SIEP 0xc229
731 #define PCPP_PPP_SBAP 0xc26f
733 #define PCPP_PPP_PRPAP 0xc281
735 #define PCPP_PPP_PRPAP2 0xc283
737 #define PCPP_PPP_PRPNIAP 0xc481
Definition: PPPoELayer.h:294
PPPoETagBuilder(PPPoETagTypes tagType)
Definition: PPPoELayer.h:301
PPPoETagBuilder(PPPoETagTypes tagType, uint8_t *tagValue, uint8_t tagValueLen)
Definition: PPPoELayer.h:322
PPPoETagBuilder(PPPoETagTypes tagType, uint32_t tagValue)
Definition: PPPoELayer.h:311
Definition: PPPoELayer.h:248
std::string getValueAsString() const
Definition: PPPoELayer.h:272
PPPoEDiscoveryLayer::PPPoETagTypes getType() const
size_t getTotalSize() const
PPPoETag(uint8_t *tagRawData)
Definition: PPPoELayer.h:254
virtual ~PPPoETag()
Definition: PPPoELayer.h:260
size_t getDataSize() const
Definition: PPPoELayer.h:198
PPPoETag addTag(const PPPoETagBuilder &tagBuilder)
virtual size_t getHeaderLen() const
PPPoEDiscoveryLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PPPoELayer.h:340
PPPoETag getFirstTag() const
PPPoETag addTagAfter(const PPPoETagBuilder &tagBuilder, PPPoETagTypes prevTagType)
bool removeTag(PPPoEDiscoveryLayer::PPPoETagTypes tagType)
PPPoEDiscoveryLayer(uint8_t version, uint8_t type, PPPoELayer::PPPoECode code, uint16_t sessionId)
Definition: PPPoELayer.h:353
PPPoETagTypes
Definition: PPPoELayer.h:204
@ PPPOE_TAG_SVC_ERR
Definition: PPPoELayer.h:236
@ PPPOE_TAG_HURL
Definition: PPPoELayer.h:228
@ PPPOE_TAG_EOL
Definition: PPPoELayer.h:206
@ PPPOE_TAG_CRED_SCALE
Definition: PPPoELayer.h:224
@ PPPOE_TAG_METRICS
Definition: PPPoELayer.h:220
@ PPPOE_TAG_RELAY_ID
Definition: PPPoELayer.h:226
@ PPPOE_TAG_GENERIC_ERR
Definition: PPPoELayer.h:240
@ PPPOE_TAG_SVC_NAME
Definition: PPPoELayer.h:208
@ PPPOE_TAG_CREDITS
Definition: PPPoELayer.h:218
@ PPPOE_TAG_AC_NAME
Definition: PPPoELayer.h:210
@ PPPOE_TAG_MOTM
Definition: PPPoELayer.h:230
@ PPPOE_TAG_SEQ_NUM
Definition: PPPoELayer.h:222
@ PPPOE_TAG_HOST_UNIQ
Definition: PPPoELayer.h:212
@ PPPOE_TAG_MAX_PAYLD
Definition: PPPoELayer.h:232
@ PPPOE_TAG_IP_RT_ADD
Definition: PPPoELayer.h:234
@ PPPOE_TAG_AC_COOKIE
Definition: PPPoELayer.h:214
@ PPPOE_TAG_AC_ERR
Definition: PPPoELayer.h:238
@ PPPOE_TAG_VENDOR
Definition: PPPoELayer.h:216
virtual void parseNextLayer()
Definition: PPPoELayer.h:432
PPPoETag getNextTag(const PPPoETag &tag) const
virtual std::string toString() const
Definition: PPPoELayer.h:440
static bool isDataValid(const uint8_t *data, size_t dataLen)
Definition: PPPoELayer.h:465
PPPoETag getTag(PPPoEDiscoveryLayer::PPPoETagTypes tagType) const
Definition: PPPoELayer.h:52
PPPoECode
Definition: PPPoELayer.h:58
@ PPPOE_CODE_PADR
Definition: PPPoELayer.h:72
@ PPPOE_CODE_PADQ
Definition: PPPoELayer.h:70
@ PPPOE_CODE_PADI
Definition: PPPoELayer.h:64
@ PPPOE_CODE_PADS
Definition: PPPoELayer.h:74
@ PPPOE_CODE_PADN
Definition: PPPoELayer.h:80
@ PPPOE_CODE_PADC
Definition: PPPoELayer.h:68
@ PPPOE_CODE_SESSION
Definition: PPPoELayer.h:60
@ PPPOE_CODE_PADM
Definition: PPPoELayer.h:78
@ PPPOE_CODE_PADT
Definition: PPPoELayer.h:76
@ PPPOE_CODE_PADO
Definition: PPPoELayer.h:62
@ PPPOE_CODE_PADG
Definition: PPPoELayer.h:66
OsiModelLayer getOsiModelLayer() const
Definition: PPPoELayer.h:103
virtual void computeCalculateFields()
pppoe_header * getPPPoEHeader() const
Definition: PPPoELayer.h:91
Definition: PPPoELayer.h:124
static bool isDataValid(const uint8_t *data, size_t dataLen)
Definition: PPPoELayer.h:460
PPPoESessionLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PPPoELayer.h:133
virtual void parseNextLayer()
uint16_t getPPPNextProtocol() const
virtual std::string toString() const
PPPoESessionLayer(uint8_t version, uint8_t type, uint16_t sessionId, uint16_t pppNextProtocol)
Definition: PPPoELayer.h:145
void setPPPNextProtocol(uint16_t nextProtocol)
virtual size_t getHeaderLen() const
Definition: PPPoELayer.h:185
Definition: TLVData.h:413
Definition: TLVData.h:239
The main namespace for the PcapPlusPlus lib.
uint8_t ProtocolType
Definition: ProtocolType.h:17
const ProtocolType PPPoESession
Definition: ProtocolType.h:93
OsiModelLayer
Definition: ProtocolType.h:354
@ OsiModelDataLinkLayer
Definition: ProtocolType.h:358
const ProtocolType PPPoEDiscovery
Definition: ProtocolType.h:98