1 #ifndef PACKETPP_PPPOE_LAYER 2 #define PACKETPP_PPPOE_LAYER 25 #if (BYTE_ORDER == LITTLE_ENDIAN) 62 PPPOE_CODE_SESSION = 0x00,
64 PPPOE_CODE_PADO = 0x07,
66 PPPOE_CODE_PADI = 0x09,
68 PPPOE_CODE_PADG = 0x0a,
70 PPPOE_CODE_PADC = 0x0b,
72 PPPOE_CODE_PADQ = 0x0c,
74 PPPOE_CODE_PADR = 0x19,
76 PPPOE_CODE_PADS = 0x65,
78 PPPOE_CODE_PADT = 0xa7,
80 PPPOE_CODE_PADM = 0xd3,
82 PPPOE_CODE_PADN = 0xd4
98 virtual void computeCalculateFields();
145 uint16_t getPPPNextProtocol()
const;
151 void setPPPNextProtocol(uint16_t nextProtocol);
159 static inline bool isDataValid(
const uint8_t* data,
size_t dataLen);
166 virtual void parseNextLayer();
173 virtual std::string toString()
const;
191 PPPOE_TAG_EOL = 0x0000,
193 PPPOE_TAG_SVC_NAME = 0x0101,
195 PPPOE_TAG_AC_NAME = 0x0102,
197 PPPOE_TAG_HOST_UNIQ = 0x0103,
199 PPPOE_TAG_AC_COOKIE = 0x0104,
201 PPPOE_TAG_VENDOR = 0x0105,
203 PPPOE_TAG_CREDITS = 0x0106,
205 PPPOE_TAG_METRICS = 0x0107,
207 PPPOE_TAG_SEQ_NUM = 0x0108,
209 PPPOE_TAG_CRED_SCALE = 0x0109,
211 PPPOE_TAG_RELAY_ID = 0x0110,
213 PPPOE_TAG_HURL = 0x0111,
215 PPPOE_TAG_MOTM = 0x0112,
217 PPPOE_TAG_MAX_PAYLD = 0x0120,
219 PPPOE_TAG_IP_RT_ADD = 0x0121,
221 PPPOE_TAG_SVC_ERR = 0x0201,
223 PPPOE_TAG_AC_ERR = 0x0202,
225 PPPOE_TAG_GENERIC_ERR= 0x0203
257 size_t dataSize = getDataSize();
261 return std::string((
const char*)m_Data->recordValue, dataSize);
266 size_t getTotalSize()
const;
268 size_t getDataSize()
const;
359 int getTagCount()
const;
390 bool removeAllTags();
398 static inline bool isDataValid(
const uint8_t* data,
size_t dataLen);
410 virtual size_t getHeaderLen()
const;
419 uint8_t* getTagBasePtr()
const {
return m_Data +
sizeof(
pppoe_header); }
429 return dataLen >=
sizeof(
pppoe_header) +
sizeof(uint16_t);
440 #define PCPP_PPP_PADDING 0x1 442 #define PCPP_PPP_ROHC_SCID 0x3 444 #define PCPP_PPP_ROHC_LCID 0x5 446 #define PCPP_PPP_IP 0x21 448 #define PCPP_PPP_OSI 0x23 450 #define PCPP_PPP_XNSIDP 0x25 452 #define PCPP_PPP_DEC4 0x27 454 #define PCPP_PPP_AT 0x29 456 #define PCPP_PPP_IPX 0x2b 458 #define PCPP_PPP_VJC_COMP 0x2d 460 #define PCPP_PPP_VJC_UNCOMP 0x2f 462 #define PCPP_PPP_BCP 0x31 464 #define PCPP_PPP_ST 0x33 466 #define PCPP_PPP_VINES 0x35 468 #define PCPP_PPP_AT_EDDP 0x39 470 #define PCPP_PPP_AT_SB 0x3b 472 #define PCPP_PPP_MP 0x3d 474 #define PCPP_PPP_NB 0x3f 476 #define PCPP_PPP_CISCO 0x41 478 #define PCPP_PPP_ASCOM 0x43 480 #define PCPP_PPP_LBLB 0x45 482 #define PCPP_PPP_RL 0x47 484 #define PCPP_PPP_SDTP 0x49 486 #define PCPP_PPP_LLC 0x4b 488 #define PCPP_PPP_SNA 0x4d 490 #define PCPP_PPP_IPV6HC 0x4f 492 #define PCPP_PPP_KNX 0x51 494 #define PCPP_PPP_ENCRYPT 0x53 496 #define PCPP_PPP_ILE 0x55 498 #define PCPP_PPP_IPV6 0x57 500 #define PCPP_PPP_MUX 0x59 502 #define PCPP_PPP_VSNP 0x5b 504 #define PCPP_PPP_TNP 0x5d 506 #define PCPP_PPP_RTP_FH 0x61 508 #define PCPP_PPP_RTP_CTCP 0x63 510 #define PCPP_PPP_RTP_CNTCP 0x65 512 #define PCPP_PPP_RTP_CUDP8 0x67 514 #define PCPP_PPP_RTP_CRTP8 0x69 516 #define PCPP_PPP_STAMPEDE 0x6f 518 #define PCPP_PPP_MPPLUS 0x73 520 #define PCPP_PPP_NTCITS_IPI 0xc1 522 #define PCPP_PPP_ML_SLCOMP 0xfb 524 #define PCPP_PPP_COMP 0xfd 526 #define PCPP_PPP_STP_HELLO 0x0201 528 #define PCPP_PPP_IBM_SR 0x0203 530 #define PCPP_PPP_DEC_LB 0x0205 532 #define PCPP_PPP_CDP 0x0207 534 #define PCPP_PPP_NETCS 0x0209 536 #define PCPP_PPP_STP 0x020b 538 #define PCPP_PPP_EDP 0x020d 540 #define PCPP_PPP_OSCP 0x0211 542 #define PCPP_PPP_OSCP2 0x0213 544 #define PCPP_PPP_LUXCOM 0x0231 546 #define PCPP_PPP_SIGMA 0x0233 548 #define PCPP_PPP_ACSP 0x0235 550 #define PCPP_PPP_MPLS_UNI 0x0281 552 #define PCPP_PPP_MPLS_MULTI 0x0283 554 #define PCPP_PPP_P12844 0x0285 556 #define PCPP_PPP_TETRA 0x0287 558 #define PCPP_PPP_MFTP 0x0289 560 #define PCPP_PPP_RTP_CTCPND 0x2063 562 #define PCPP_PPP_RTP_CS 0x2065 564 #define PCPP_PPP_RTP_CUDP16 0x2067 566 #define PCPP_PPP_RTP_CRDP16 0x2069 568 #define PCPP_PPP_CCCP 0x4001 570 #define PCPP_PPP_CDPD_MNRP 0x4003 572 #define PCPP_PPP_EXPANDAP 0x4005 574 #define PCPP_PPP_ODSICP 0x4007 576 #define PCPP_PPP_DOCSIS 0x4009 578 #define PCPP_PPP_CETACEANNDP 0x400b 580 #define PCPP_PPP_LZS 0x4021 582 #define PCPP_PPP_REFTEK 0x4023 584 #define PCPP_PPP_FC 0x4025 586 #define PCPP_PPP_EMIT 0x4027 588 #define PCPP_PPP_VSP 0x405b 590 #define PCPP_PPP_TLSP 0x405d 592 #define PCPP_PPP_IPCP 0x8021 594 #define PCPP_PPP_OSINLCP 0x8023 596 #define PCPP_PPP_XNSIDPCP 0x8025 598 #define PCPP_PPP_DECNETCP 0x8027 600 #define PCPP_PPP_ATCP 0x8029 602 #define PCPP_PPP_IPXCP 0x802b 604 #define PCPP_PPP_BRIDGENCP 0x8031 606 #define PCPP_PPP_SPCP 0x8033 608 #define PCPP_PPP_BVCP 0x8035 610 #define PCPP_PPP_MLCP 0x803d 612 #define PCPP_PPP_NBCP 0x803f 614 #define PCPP_PPP_CISCOCP 0x8041 616 #define PCPP_PPP_ASCOMCP 0x8043 618 #define PCPP_PPP_LBLBCP 0x8045 620 #define PCPP_PPP_RLNCP 0x8047 622 #define PCPP_PPP_SDCP 0x8049 624 #define PCPP_PPP_LLCCP 0x804b 626 #define PCPP_PPP_SNACP 0x804d 628 #define PCPP_PPP_IP6HCCP 0x804f 630 #define PCPP_PPP_KNXCP 0x8051 632 #define PCPP_PPP_ECP 0x8053 634 #define PCPP_PPP_ILECP 0x8055 636 #define PCPP_PPP_IPV6CP 0x8057 638 #define PCPP_PPP_MUXCP 0x8059 640 #define PCPP_PPP_VSNCP 0x805b 642 #define PCPP_PPP_TNCP 0x805d 644 #define PCPP_PPP_STAMPEDECP 0x806f 646 #define PCPP_PPP_MPPCP 0x8073 648 #define PCPP_PPP_IPICP 0x80c1 650 #define PCPP_PPP_SLCC 0x80fb 652 #define PCPP_PPP_CCP 0x80fd 654 #define PCPP_PPP_CDPCP 0x8207 656 #define PCPP_PPP_NETCSCP 0x8209 658 #define PCPP_PPP_STPCP 0x820b 660 #define PCPP_PPP_EDPCP 0x820d 662 #define PCPP_PPP_ACSPC 0x8235 664 #define PCPP_PPP_MPLSCP 0x8281 666 #define PCPP_PPP_P12844CP 0x8285 668 #define PCPP_PPP_TETRACP 0x8287 670 #define PCPP_PPP_MFTPCP 0x8289 672 #define PCPP_PPP_LCP 0xc021 674 #define PCPP_PPP_PAP 0xc023 676 #define PCPP_PPP_LQR 0xc025 678 #define PCPP_PPP_SPAP 0xc027 680 #define PCPP_PPP_CBCP 0xc029 682 #define PCPP_PPP_BACP 0xc02b 684 #define PCPP_PPP_BAP 0xc02d 686 #define PCPP_PPP_VSAP 0xc05b 688 #define PCPP_PPP_CONTCP 0xc081 690 #define PCPP_PPP_CHAP 0xc223 692 #define PCPP_PPP_RSAAP 0xc225 694 #define PCPP_PPP_EAP 0xc227 696 #define PCPP_PPP_SIEP 0xc229 698 #define PCPP_PPP_SBAP 0xc26f 700 #define PCPP_PPP_PRPAP 0xc281 702 #define PCPP_PPP_PRPAP2 0xc283 704 #define PCPP_PPP_PRPNIAP 0xc481 The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:258
PPPoETagTypes
Definition: PPPoELayer.h:188
const ProtocolType PPPoEDiscovery
Definition: ProtocolType.h:93
Definition: PPPoELayer.h:117
Definition: PPPoELayer.h:182
Definition: ProtocolType.h:263
static bool isDataValid(const uint8_t *data, size_t dataLen)
Definition: PPPoELayer.h:432
Definition: TLVData.h:363
virtual ~PPPoETag()
Definition: PPPoELayer.h:244
const ProtocolType PPPoESession
Definition: ProtocolType.h:88
Definition: PPPoELayer.h:53
virtual void parseNextLayer()
Definition: PPPoELayer.h:405
PPPoETagBuilder(PPPoETagTypes tagType, uint8_t *tagValue, uint8_t tagValueLen)
Definition: PPPoELayer.h:305
Definition: TLVData.h:207
std::string getValueAsString() const
Definition: PPPoELayer.h:255
virtual size_t getHeaderLen() const
Definition: PPPoELayer.h:171
PPPoECode
Definition: PPPoELayer.h:59
Definition: PPPoELayer.h:232
PPPoETagBuilder(PPPoETagTypes tagType, uint32_t tagValue)
Definition: PPPoELayer.h:295
PPPoEDiscoveryLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PPPoELayer.h:322
PPPoESessionLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: PPPoELayer.h:128
OsiModelLayer getOsiModelLayer() const
Definition: PPPoELayer.h:100
static bool isDataValid(const uint8_t *data, size_t dataLen)
Definition: PPPoELayer.h:427
PPPoEDiscoveryLayer(uint8_t version, uint8_t type, PPPoELayer::PPPoECode code, uint16_t sessionId)
Definition: PPPoELayer.h:331
PPPoETagBuilder(PPPoETagTypes tagType)
Definition: PPPoELayer.h:286
virtual std::string toString() const
Definition: PPPoELayer.h:412
pppoe_header * getPPPoEHeader() const
Definition: PPPoELayer.h:91
Definition: PPPoELayer.h:277
PPPoESessionLayer(uint8_t version, uint8_t type, uint16_t sessionId, uint16_t pppNextProtocol)
Definition: PPPoELayer.h:137
PPPoETag(uint8_t *tagRawData)
Definition: PPPoELayer.h:239