Coverage Report

Created: 2024-02-25 06:29

/src/PcapPlusPlus/Packet++/header/PPPoELayer.h
Line
Count
Source (jump to first uncovered line)
1
#pragma once
2
3
#include "Layer.h"
4
#include "TLVData.h"
5
#include <vector>
6
#include <string.h>
7
8
/// @file
9
10
/**
11
 * \namespace pcpp
12
 * \brief The main namespace for the PcapPlusPlus lib
13
 */
14
namespace pcpp
15
{
16
17
  /**
18
   * @struct pppoe_header
19
   * Represents an PPPoE protocol header
20
   */
21
#pragma pack(push, 1)
22
  struct pppoe_header
23
  {
24
#if (BYTE_ORDER == LITTLE_ENDIAN)
25
    /** PPPoE version */
26
    uint8_t version:4,
27
    /** PPPoE type */
28
    type:4;
29
    /** PPPoE code */
30
    uint8_t code;
31
#else
32
    /** PPPoE version */
33
    uint16_t version:4,
34
    /** PPPoE type */
35
    type:4,
36
    /** PPPoE code */
37
    code:8;
38
#endif
39
    /** PPPoE session ID (relevant for PPPoE session packets only) */
40
    uint16_t sessionId;
41
    /** Length (in bytes) of payload, not including the PPPoE header */
42
    uint16_t payloadLength;
43
  };
44
#pragma pack(pop)
45
46
47
  /**
48
   * @class PPPoELayer
49
   * An abstract class that describes the PPPoE protocol. Contains common data and logic of the two types of PPPoE packets: PPPoE session
50
   * and PPPoE discovery
51
   */
52
  class PPPoELayer : public Layer
53
  {
54
  public:
55
    /**
56
     * PPPoE possible codes
57
     */
58
    enum PPPoECode
59
    {
60
      /** PPPoE session code */
61
      PPPOE_CODE_SESSION  = 0x00,
62
      /** PPPoE discovery PADO */
63
      PPPOE_CODE_PADO   = 0x07,
64
      /** PPPoE discovery PADI */
65
      PPPOE_CODE_PADI   = 0x09,
66
      /** PPPoE discovery PADG */
67
      PPPOE_CODE_PADG   = 0x0a,
68
      /** PPPoE discovery PADC */
69
      PPPOE_CODE_PADC   = 0x0b,
70
      /** PPPoE discovery PADQ */
71
      PPPOE_CODE_PADQ   = 0x0c,
72
      /** PPPoE discovery PADR */
73
      PPPOE_CODE_PADR   = 0x19,
74
      /** PPPoE discovery PADS */
75
      PPPOE_CODE_PADS   = 0x65,
76
      /** PPPoE discovery PADT */
77
      PPPOE_CODE_PADT   = 0xa7,
78
      /** PPPoE discovery PADM */
79
      PPPOE_CODE_PADM   = 0xd3,
80
      /** PPPoE discovery PADN */
81
      PPPOE_CODE_PADN   = 0xd4
82
    };
83
84
0
    ~PPPoELayer() {}
85
86
    /**
87
     * Get a pointer to the PPPoE header. Notice this points directly to the data, so every change will change the actual packet data
88
     * @return A pointer to the pppoe_header
89
     */
90
10.3k
    pppoe_header* getPPPoEHeader() const { return (pppoe_header*)m_Data; }
91
92
    // abstract methods implementation
93
94
    /**
95
     * Calculate @ref pppoe_header#payloadLength field
96
     */
97
    virtual void computeCalculateFields();
98
99
2.82k
    OsiModelLayer getOsiModelLayer() const { return OsiModelDataLinkLayer; }
100
101
  protected:
102
103
    // protected c'tor as this class shouldn't be instantiated
104
11.3k
    PPPoELayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) : Layer(data, dataLen, prevLayer, packet) { }
105
106
    // protected c'tor as this class shouldn't be instantiated
107
    PPPoELayer(uint8_t version, uint8_t type, PPPoELayer::PPPoECode code, uint16_t sessionId, size_t additionalBytesToAllocate = 0);
108
109
  };
110
111
112
  /**
113
   * @class PPPoESessionLayer
114
   * Describes the PPPoE session protocol
115
   */
116
  class PPPoESessionLayer : public PPPoELayer
117
  {
118
  public:
119
120
    /**
121
     * A constructor that creates the layer from an existing packet raw data
122
     * @param[in] data A pointer to the raw data (will be casted to @ref pppoe_header)
123
     * @param[in] dataLen Size of the data in bytes
124
     * @param[in] prevLayer A pointer to the previous layer
125
     * @param[in] packet A pointer to the Packet instance where layer will be stored in
126
     */
127
5.29k
    PPPoESessionLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) : PPPoELayer(data, dataLen, prevLayer, packet) { m_Protocol = PPPoESession; }
128
129
    /**
130
     * A constructor that allocates a new PPPoE Session header with version, type and session ID
131
     * @param[in] version PPPoE version
132
     * @param[in] type PPPoE type
133
     * @param[in] sessionId PPPoE session ID
134
     * @param[in] pppNextProtocol The next protocol to come after the PPPoE session header. Should be one of the PPP_* macros listed below
135
     */
136
0
    PPPoESessionLayer(uint8_t version, uint8_t type, uint16_t sessionId, uint16_t pppNextProtocol) : PPPoELayer(version, type, PPPoELayer::PPPOE_CODE_SESSION, sessionId, sizeof(uint16_t)) { setPPPNextProtocol(pppNextProtocol); }
137
138
0
    virtual ~PPPoESessionLayer() {}
139
140
    /**
141
     * @return The protocol after the PPPoE session header. The return value is one of the PPP_* macros listed below. This method is also
142
     * used when parsing a packet (this way we know which layer comes after the PPPoE session)
143
     */
144
    uint16_t getPPPNextProtocol() const;
145
146
    /**
147
     * Set the field that describes which header comes after the PPPoE session header
148
     * @param[in] nextProtocol The protocol value. Should be one of the PPP_* macros listed below
149
     */
150
    void setPPPNextProtocol(uint16_t nextProtocol);
151
152
    /**
153
     * A static method that validates the input data
154
     * @param[in] data The pointer to the beginning of byte stream of a packet
155
     * @param[in] dataLen The length of the byte stream
156
     * @return True if the data is valid and can represent a PPPoES packet
157
     */
158
    static inline bool isDataValid(const uint8_t* data, size_t dataLen);
159
160
    // abstract methods implementation
161
162
    /**
163
     * Currently identifies the following next layers: IPv4Layer, IPv6Layer. Otherwise sets PayloadLayer
164
     */
165
    virtual void parseNextLayer();
166
167
    /**
168
     * @return Size of @ref pppoe_header
169
     */
170
13.6k
    virtual size_t getHeaderLen() const { return sizeof(pppoe_header) + sizeof(uint16_t); }
171
172
    virtual std::string toString() const;
173
  };
174
175
176
177
  /**
178
   * @class PPPoEDiscoveryLayer
179
   * Describes the PPPoE discovery protocol
180
   */
181
  class PPPoEDiscoveryLayer : public PPPoELayer
182
  {
183
  public:
184
    /**
185
     * PPPoE tag types
186
     */
187
    enum PPPoETagTypes
188
    {
189
      /** End-Of-List tag type*/
190
      PPPOE_TAG_EOL    = 0x0000,
191
      /** Service-Name tag type*/
192
      PPPOE_TAG_SVC_NAME   = 0x0101,
193
      /** AC-Name tag type*/
194
      PPPOE_TAG_AC_NAME  = 0x0102,
195
      /** Host-Uniq tag type*/
196
      PPPOE_TAG_HOST_UNIQ  = 0x0103,
197
      /** AC-Cookie tag type*/
198
      PPPOE_TAG_AC_COOKIE  = 0x0104,
199
      /** Vendor-Specific tag type*/
200
      PPPOE_TAG_VENDOR   = 0x0105,
201
      /** Credits tag type*/
202
      PPPOE_TAG_CREDITS  = 0x0106,
203
      /** Metrics tag type*/
204
      PPPOE_TAG_METRICS  = 0x0107,
205
      /** Sequence Number tag type */
206
      PPPOE_TAG_SEQ_NUM  = 0x0108,
207
      /** Credit Scale Factor tag type */
208
      PPPOE_TAG_CRED_SCALE = 0x0109,
209
      /** Relay-Session-Id tag type */
210
      PPPOE_TAG_RELAY_ID   = 0x0110,
211
      /** HURL tag type */
212
      PPPOE_TAG_HURL     = 0x0111,
213
      /** MOTM tag type */
214
      PPPOE_TAG_MOTM     = 0x0112,
215
      /** PPP-Max-Payload tag type */
216
      PPPOE_TAG_MAX_PAYLD  = 0x0120,
217
      /** IP_Route_Add tag type */
218
      PPPOE_TAG_IP_RT_ADD  = 0x0121,
219
      /** Service-Name-Error tag type */
220
      PPPOE_TAG_SVC_ERR  = 0x0201,
221
      /** AC-System-Error tag type */
222
      PPPOE_TAG_AC_ERR   = 0x0202,
223
      /** Generic-Error tag type */
224
      PPPOE_TAG_GENERIC_ERR= 0x0203
225
    };
226
227
    /**
228
     * @class PPPoETag
229
     * Represents a PPPoE tag and its data
230
     */
231
    class PPPoETag : public TLVRecord<uint16_t, uint16_t>
232
    {
233
    public:
234
      /**
235
       * A c'tor that gets a pointer to the tag raw data (byte array)
236
       * @param[in] tagRawData A pointer to the tag raw data
237
       */
238
0
      explicit PPPoETag(uint8_t* tagRawData) : TLVRecord(tagRawData) { }
239
240
      /**
241
       * A d'tor for this class, currently does nothing
242
       */
243
0
      virtual ~PPPoETag() { }
244
245
      /**
246
       * @return The tag type converted to PPPoEDiscoveryLayer#PPPoETagTypes enum
247
       */
248
      PPPoEDiscoveryLayer::PPPoETagTypes getType() const;
249
250
      /**
251
       * Retrieve the tag data as string. Relevant only if the tag value is indeed a string
252
       * @return The tag data as string
253
       */
254
      std::string getValueAsString() const
255
0
      {
256
0
        size_t dataSize = getDataSize();
257
0
        if (dataSize < 1)
258
0
          return "";
259
0
260
0
        return std::string((const char*)m_Data->recordValue, dataSize);
261
0
      }
262
263
      // implement abstract methods
264
265
      size_t getTotalSize() const;
266
267
      size_t getDataSize() const;
268
    };
269
270
271
    /**
272
     * @class PPPoETagBuilder
273
     * A class for building PPPoE Tags. This builder receives the tag parameters in its c'tor,
274
     * builds the PPPoE Tag raw buffer and provides a build() method to get a PPPoETag object out of it
275
     */
276
    class PPPoETagBuilder : public TLVRecordBuilder
277
    {
278
    public:
279
280
      /**
281
       * A c'tor for building a PPPoE Tag which has no value (tag len is zero). The PPPoETag object can later
282
       * be retrieved by calling build()
283
       * @param[in] tagType Tag type
284
       */
285
      explicit PPPoETagBuilder(PPPoETagTypes tagType) :
286
0
        TLVRecordBuilder(static_cast<uint16_t>(tagType), NULL, 0) { }
287
288
      /**
289
       * A c'tor for building a PPPoE Tag which has a 4-byte value. The PPPoETag object can later
290
       * be retrieved by calling build()
291
       * @param[in] tagType Tag type
292
       * @param[in] tagValue The tag's 4-byte value
293
       */
294
      PPPoETagBuilder(PPPoETagTypes tagType, uint32_t tagValue) :
295
0
        TLVRecordBuilder(static_cast<uint16_t>(tagType), tagValue) { }
296
297
      /**
298
       * A c'tor for building a PPPoE Tag which has some arbitrary value. The PPPoETag object can later
299
       * be retrieved by calling build()
300
       * @param[in] tagType Tag type
301
       * @param[in] tagValue A byte array that contains the tag data
302
       * @param[in] tagValueLen The length of the value byte array
303
       */
304
      PPPoETagBuilder(PPPoETagTypes tagType, uint8_t* tagValue, uint8_t tagValueLen) :
305
0
        TLVRecordBuilder(static_cast<uint16_t>(tagType), tagValue, tagValueLen) { }
306
307
      /**
308
       * Build the PPPoETag object out of the parameters defined in the c'tor
309
       * @return The PPPoETag object
310
       */
311
      PPPoETag build() const;
312
    };
313
314
    /**
315
     * A constructor that creates the layer from an existing packet raw data
316
     * @param[in] data A pointer to the raw data (will be casted to @ref pppoe_header)
317
     * @param[in] dataLen Size of the data in bytes
318
     * @param[in] prevLayer A pointer to the previous layer
319
     * @param[in] packet A pointer to the Packet instance where layer will be stored in
320
     */
321
6.01k
    PPPoEDiscoveryLayer(uint8_t* data, size_t dataLen, Layer* prevLayer, Packet* packet) : PPPoELayer(data, dataLen, prevLayer, packet) { m_Protocol = PPPoEDiscovery; m_DataLen = getHeaderLen(); }
322
323
    /**
324
     * A constructor that allocates a new PPPoE Discovery header with version, type, PPPoE code and session ID
325
     * @param[in] version PPPoE version
326
     * @param[in] type PPPoE type
327
     * @param[in] code PPPoE code enum
328
     * @param[in] sessionId PPPoE session ID
329
     */
330
0
    PPPoEDiscoveryLayer(uint8_t version, uint8_t type, PPPoELayer::PPPoECode code, uint16_t sessionId) : PPPoELayer(version, type, code, sessionId) { m_Protocol = PPPoEDiscovery; }
331
332
    /**
333
     * Get a PPPoE Tag by tag type.
334
     * @param[in] tagType The type of the tag to search
335
     * @return A PPPoETag object that contains the first tag that matches this type, or logical NULL
336
     * (PPPoETag#isNull() == true) if no such tag found
337
     */
338
    PPPoETag getTag(PPPoEDiscoveryLayer::PPPoETagTypes tagType) const;
339
340
    /**
341
     * @return The first tag in the PPPoE discovery layer. If the current layer contains no tags the returned value will contain
342
     * a logical NULL (PPPoETag#isNull() == true)
343
     */
344
    PPPoETag getFirstTag() const;
345
346
    /**
347
     * Get the tag that comes right after the "tag" parameter. If the given tag is the last one, the returned value
348
     * will contain a logical NULL (PPPoETag#isNull() == true)
349
     * @param[in] tag A given tag
350
     * @return A PPPoETag object containing the tag that comes next, or logical NULL if the given
351
     * tag: (1) was the last one; (2) contains a logical NULL or (3) doesn't belong to this packet
352
     */
353
    PPPoETag getNextTag(const PPPoETag& tag) const;
354
355
    /**
356
     * @return The number of tags in this layer
357
     */
358
    int getTagCount() const;
359
360
    /**
361
     * Add a new PPPoE Tag at the end of the layer
362
     * @param[in] tagBuilder A PPPoETagBuilder object that contains the requested tag data to add
363
     * @return A PPPoETag object containing the newly added PPPoE Tag data or logical NULL
364
     * (PPPoETag#isNull() == true) if addition failed
365
     */
366
    PPPoETag addTag(const PPPoETagBuilder& tagBuilder);
367
368
    /**
369
     * Add a new PPPoE Tag after an existing one
370
     * @param[in] tagBuilder A PPPoETagBuilder object that contains the requested tag data to add
371
     * @param[in] prevTagType The PPPoE Tag which the newly added tag will come after
372
     * @return A PPPoETag object containing the newly added PPPoE Tag data or logical NULL
373
     * (PPPoETag#isNull() == true) if addition failed
374
     */
375
    PPPoETag addTagAfter(const PPPoETagBuilder& tagBuilder, PPPoETagTypes prevTagType);
376
377
    /**
378
     * Remove an existing tag. Tag will be found by the tag type
379
     * @param[in] tagType The tag type to remove
380
     * @return True if tag was removed or false if tag wasn't found or if tag removal failed (in each case a proper error will be written
381
     * to log)
382
     */
383
    bool removeTag(PPPoEDiscoveryLayer::PPPoETagTypes tagType);
384
385
    /**
386
     * Remove all tags in this layer
387
     * @return True if all tags were successfully or false if removal failed for some reason (a proper error will be written to log)
388
     */
389
    bool removeAllTags();
390
391
    /**
392
     * A static method that validates the input data
393
     * @param[in] data The pointer to the beginning of byte stream of a packet
394
     * @param[in] dataLen The length of the byte stream
395
     * @return True if the data is valid and can represent a PPPoED packet
396
     */
397
    static inline bool isDataValid(const uint8_t* data, size_t dataLen);
398
399
    // abstract methods implementation
400
401
    /**
402
     * Does nothing for this layer (PPPoE discovery is always the last layer)
403
     */
404
6.01k
    virtual void parseNextLayer() {}
405
406
    /**
407
     * @return The header length which is size of strcut pppoe_header plus the total size of tags
408
     */
409
    virtual size_t getHeaderLen() const;
410
411
2.88k
    virtual std::string toString() const { return "PPP-over-Ethernet Discovery (" + codeToString((PPPoELayer::PPPoECode)getPPPoEHeader()->code) + ")"; }
412
413
  private:
414
    TLVRecordReader<PPPoETag> m_TagReader;
415
416
    PPPoETag addTagAt(const PPPoETagBuilder& tagBuilder, int offset);
417
418
0
    uint8_t* getTagBasePtr() const { return m_Data + sizeof(pppoe_header); }
419
420
    std::string codeToString(PPPoECode code) const;
421
  };
422
423
424
  // implementation of inline methods
425
426
  bool PPPoESessionLayer::isDataValid(const uint8_t* data, size_t dataLen)
427
5.29k
  {
428
5.29k
    return data && dataLen >= sizeof(pppoe_header) + sizeof(uint16_t);
429
5.29k
  }
430
431
  bool PPPoEDiscoveryLayer::isDataValid(const uint8_t* data, size_t dataLen)
432
6.01k
  {
433
6.01k
    return data && dataLen >= sizeof(pppoe_header);
434
6.01k
  }
435
436
  // Copied from Wireshark: ppptypes.h
437
438
  /** Padding Protocol */
439
4
#define PCPP_PPP_PADDING    0x1
440
  /** ROHC small-CID */
441
4
#define PCPP_PPP_ROHC_SCID    0x3
442
  /** ROHC large-CID */
443
4
#define PCPP_PPP_ROHC_LCID    0x5
444
  /** Internet Protocol version 4 */
445
318
#define PCPP_PPP_IP       0x21
446
  /** OSI Network Layer */
447
4
#define PCPP_PPP_OSI      0x23
448
  /** Xerox NS IDP */
449
4
#define PCPP_PPP_XNSIDP     0x25
450
  /** DECnet Phase IV */
451
4
#define PCPP_PPP_DEC4     0x27
452
  /** AppleTalk */
453
4
#define PCPP_PPP_AT       0x29
454
  /** Novell IPX */
455
4
#define PCPP_PPP_IPX      0x2b
456
  /** Van Jacobson Compressed TCP/IP */
457
4
#define PCPP_PPP_VJC_COMP   0x2d
458
  /** Van Jacobson Uncompressed TCP/IP */
459
4
#define PCPP_PPP_VJC_UNCOMP   0x2f
460
  /** Bridging PDU */
461
4
#define PCPP_PPP_BCP      0x31
462
  /** Stream Protocol (ST-II) */
463
4
#define PCPP_PPP_ST       0x33
464
  /** Banyan Vines */
465
4
#define PCPP_PPP_VINES      0x35
466
  /** AppleTalk EDDP */
467
4
#define PCPP_PPP_AT_EDDP    0x39
468
  /** AppleTalk SmartBuffered */
469
4
#define PCPP_PPP_AT_SB      0x3b
470
  /** Multi-Link */
471
4
#define PCPP_PPP_MP       0x3d
472
  /** NETBIOS Framing */
473
4
#define PCPP_PPP_NB       0x3f
474
  /** Cisco Systems */
475
4
#define PCPP_PPP_CISCO      0x41
476
  /** Ascom Timeplex */
477
4
#define PCPP_PPP_ASCOM      0x43
478
  /** Fujitsu Link Backup and Load Balancing */
479
4
#define PCPP_PPP_LBLB     0x45
480
  /** DCA Remote Lan */
481
4
#define PCPP_PPP_RL       0x47
482
  /** Serial Data Transport Protocol */
483
4
#define PCPP_PPP_SDTP     0x49
484
  /** SNA over 802.2 */
485
4
#define PCPP_PPP_LLC      0x4b
486
  /** SNA */
487
4
#define PCPP_PPP_SNA      0x4d
488
  /** IPv6 Header Compression  */
489
4
#define PCPP_PPP_IPV6HC     0x4f
490
  /** KNX Bridging Data */
491
4
#define PCPP_PPP_KNX      0x51
492
  /** Encryption */
493
4
#define PCPP_PPP_ENCRYPT    0x53
494
  /** Individual Link Encryption */
495
4
#define PCPP_PPP_ILE      0x55
496
  /** Internet Protocol version 6 */
497
744
#define PCPP_PPP_IPV6     0x57
498
  /** PPP Muxing */
499
4
#define PCPP_PPP_MUX      0x59
500
  /** Vendor-Specific Network Protocol (VSNP) */
501
4
#define PCPP_PPP_VSNP     0x5b
502
  /** TRILL Network Protocol (TNP) */
503
4
#define PCPP_PPP_TNP      0x5d
504
  /** RTP IPHC Full Header */
505
4
#define PCPP_PPP_RTP_FH     0x61
506
  /** RTP IPHC Compressed TCP */
507
4
#define PCPP_PPP_RTP_CTCP   0x63
508
  /** RTP IPHC Compressed Non TCP */
509
4
#define PCPP_PPP_RTP_CNTCP    0x65
510
  /** RTP IPHC Compressed UDP 8 */
511
4
#define PCPP_PPP_RTP_CUDP8    0x67
512
  /** RTP IPHC Compressed RTP 8 */
513
4
#define PCPP_PPP_RTP_CRTP8    0x69
514
  /** Stampede Bridging */
515
4
#define PCPP_PPP_STAMPEDE   0x6f
516
  /** MP+ Protocol */
517
4
#define PCPP_PPP_MPPLUS     0x73
518
  /** NTCITS IPI */
519
4
#define PCPP_PPP_NTCITS_IPI   0xc1
520
  /** Single link compression in multilink */
521
4
#define PCPP_PPP_ML_SLCOMP    0xfb
522
  /** Compressed datagram */
523
4
#define PCPP_PPP_COMP     0xfd
524
  /** 802.1d Hello Packets */
525
4
#define PCPP_PPP_STP_HELLO    0x0201
526
  /** IBM Source Routing BPDU */
527
4
#define PCPP_PPP_IBM_SR     0x0203
528
  /** DEC LANBridge100 Spanning Tree */
529
4
#define PCPP_PPP_DEC_LB     0x0205
530
  /** Cisco Discovery Protocol */
531
4
#define PCPP_PPP_CDP      0x0207
532
  /** Netcs Twin Routing */
533
4
#define PCPP_PPP_NETCS      0x0209
534
  /** STP - Scheduled Transfer Protocol */
535
4
#define PCPP_PPP_STP      0x020b
536
  /** EDP - Extreme Discovery Protocol */
537
4
#define PCPP_PPP_EDP      0x020d
538
  /** Optical Supervisory Channel Protocol */
539
4
#define PCPP_PPP_OSCP     0x0211
540
  /** Optical Supervisory Channel Protocol */
541
4
#define PCPP_PPP_OSCP2      0x0213
542
  /** Luxcom */
543
4
#define PCPP_PPP_LUXCOM     0x0231
544
  /** Sigma Network Systems */
545
4
#define PCPP_PPP_SIGMA      0x0233
546
  /** Apple Client Server Protocol */
547
4
#define PCPP_PPP_ACSP     0x0235
548
  /** MPLS Unicast */
549
4
#define PCPP_PPP_MPLS_UNI   0x0281
550
  /** MPLS Multicast */
551
4
#define PCPP_PPP_MPLS_MULTI   0x0283
552
  /** IEEE p1284.4 standard - data packets */
553
4
#define PCPP_PPP_P12844     0x0285
554
  /** ETSI TETRA Network Protocol Type 1 */
555
4
#define PCPP_PPP_TETRA      0x0287
556
  /** Multichannel Flow Treatment Protocol */
557
4
#define PCPP_PPP_MFTP     0x0289
558
  /** RTP IPHC Compressed TCP No Delta */
559
4
#define PCPP_PPP_RTP_CTCPND   0x2063
560
  /** RTP IPHC Context State */
561
4
#define PCPP_PPP_RTP_CS     0x2065
562
  /** RTP IPHC Compressed UDP 16 */
563
4
#define PCPP_PPP_RTP_CUDP16   0x2067
564
  /** RTP IPHC Compressed RTP 16 */
565
4
#define PCPP_PPP_RTP_CRDP16   0x2069
566
  /** Cray Communications Control Protocol */
567
4
#define PCPP_PPP_CCCP     0x4001
568
  /** CDPD Mobile Network Registration Protocol */
569
4
#define PCPP_PPP_CDPD_MNRP    0x4003
570
  /** Expand accelerator protocol */
571
4
#define PCPP_PPP_EXPANDAP   0x4005
572
  /** ODSICP NCP */
573
4
#define PCPP_PPP_ODSICP     0x4007
574
  /** DOCSIS DLL */
575
4
#define PCPP_PPP_DOCSIS     0x4009
576
  /** Cetacean Network Detection Protocol */
577
4
#define PCPP_PPP_CETACEANNDP  0x400b
578
  /** Stacker LZS */
579
4
#define PCPP_PPP_LZS      0x4021
580
  /** RefTek Protocol */
581
4
#define PCPP_PPP_REFTEK     0x4023
582
  /** Fibre Channel */
583
4
#define PCPP_PPP_FC       0x4025
584
  /** EMIT Protocols */
585
4
#define PCPP_PPP_EMIT     0x4027
586
  /** Vendor-Specific Protocol (VSP) */
587
4
#define PCPP_PPP_VSP      0x405b
588
  /** TRILL Link State Protocol (TLSP) */
589
4
#define PCPP_PPP_TLSP     0x405d
590
  /** Internet Protocol Control Protocol */
591
4
#define PCPP_PPP_IPCP     0x8021
592
  /** OSI Network Layer Control Protocol */
593
4
#define PCPP_PPP_OSINLCP    0x8023
594
  /** Xerox NS IDP Control Protocol */
595
4
#define PCPP_PPP_XNSIDPCP   0x8025
596
  /** DECnet Phase IV Control Protocol */
597
4
#define PCPP_PPP_DECNETCP   0x8027
598
  /** AppleTalk Control Protocol */
599
4
#define PCPP_PPP_ATCP     0x8029
600
  /** Novell IPX Control Protocol */
601
4
#define PCPP_PPP_IPXCP      0x802b
602
  /** Bridging NCP */
603
4
#define PCPP_PPP_BRIDGENCP    0x8031
604
  /** Stream Protocol Control Protocol */
605
4
#define PCPP_PPP_SPCP     0x8033
606
  /** Banyan Vines Control Protocol */
607
4
#define PCPP_PPP_BVCP     0x8035
608
  /** Multi-Link Control Protocol */
609
4
#define PCPP_PPP_MLCP     0x803d
610
  /** NETBIOS Framing Control Protocol */
611
4
#define PCPP_PPP_NBCP     0x803f
612
  /** Cisco Systems Control Protocol */
613
4
#define PCPP_PPP_CISCOCP    0x8041
614
  /** Ascom Timeplex Control Protocol (?) */
615
4
#define PCPP_PPP_ASCOMCP    0x8043
616
  /** Fujitsu LBLB Control Protocol */
617
4
#define PCPP_PPP_LBLBCP     0x8045
618
  /** DCA Remote Lan Network Control Protocol */
619
4
#define PCPP_PPP_RLNCP      0x8047
620
  /** Serial Data Control Protocol */
621
4
#define PCPP_PPP_SDCP     0x8049
622
  /** SNA over 802.2 Control Protocol */
623
4
#define PCPP_PPP_LLCCP      0x804b
624
  /** SNA Control Protocol */
625
4
#define PCPP_PPP_SNACP      0x804d
626
  /** IP6 Header Compression Control Protocol */
627
4
#define PCPP_PPP_IP6HCCP    0x804f
628
  /** KNX Bridging Control Protocol */
629
4
#define PCPP_PPP_KNXCP      0x8051
630
  /** Encryption Control Protocol */
631
4
#define PCPP_PPP_ECP      0x8053
632
  /** Individual Link Encryption Control Protocol */
633
4
#define PCPP_PPP_ILECP      0x8055
634
  /** IPv6 Control Protocol */
635
4
#define PCPP_PPP_IPV6CP     0x8057
636
  /** PPP Muxing Control Protocol */
637
4
#define PCPP_PPP_MUXCP      0x8059
638
  /** Vendor-Specific Network Control Protocol (VSNCP)   [RFC3772] */
639
4
#define PCPP_PPP_VSNCP      0x805b
640
  /** TRILL Network Control Protocol (TNCP) */
641
4
#define PCPP_PPP_TNCP     0x805d
642
  /** Stampede Bridging Control Protocol */
643
4
#define PCPP_PPP_STAMPEDECP   0x806f
644
  /** MP+ Contorol Protocol */
645
4
#define PCPP_PPP_MPPCP      0x8073
646
  /** NTCITS IPI Control Protocol */
647
4
#define PCPP_PPP_IPICP      0x80c1
648
  /** Single link compression in multilink control */
649
4
#define PCPP_PPP_SLCC     0x80fb
650
  /** Compression Control Protocol */
651
4
#define PCPP_PPP_CCP      0x80fd
652
  /** Cisco Discovery Protocol Control Protocol */
653
4
#define PCPP_PPP_CDPCP      0x8207
654
  /** Netcs Twin Routing */
655
4
#define PCPP_PPP_NETCSCP    0x8209
656
  /** STP - Control Protocol */
657
4
#define PCPP_PPP_STPCP      0x820b
658
  /** EDPCP - Extreme Discovery Protocol Control Protocol */
659
4
#define PCPP_PPP_EDPCP      0x820d
660
  /** Apple Client Server Protocol Control */
661
4
#define PCPP_PPP_ACSPC      0x8235
662
  /** MPLS Control Protocol */
663
4
#define PCPP_PPP_MPLSCP     0x8281
664
  /** IEEE p1284.4 standard - Protocol Control */
665
4
#define PCPP_PPP_P12844CP   0x8285
666
  /** ETSI TETRA TNP1 Control Protocol */
667
4
#define PCPP_PPP_TETRACP    0x8287
668
  /** Multichannel Flow Treatment Protocol */
669
4
#define PCPP_PPP_MFTPCP     0x8289
670
  /** Link Control Protocol */
671
4
#define PCPP_PPP_LCP      0xc021
672
  /** Password Authentication Protocol */
673
4
#define PCPP_PPP_PAP      0xc023
674
  /** Link Quality Report */
675
4
#define PCPP_PPP_LQR      0xc025
676
  /** Shiva Password Authentication Protocol */
677
4
#define PCPP_PPP_SPAP     0xc027
678
  /** CallBack Control Protocol (CBCP) */
679
4
#define PCPP_PPP_CBCP     0xc029
680
  /** BACP Bandwidth Allocation Control Protocol */
681
4
#define PCPP_PPP_BACP     0xc02b
682
  /** BAP Bandwidth Allocation Protocol */
683
4
#define PCPP_PPP_BAP      0xc02d
684
  /** Vendor-Specific Authentication Protocol (VSAP) */
685
4
#define PCPP_PPP_VSAP     0xc05b
686
  /** Container Control Protocol */
687
4
#define PCPP_PPP_CONTCP     0xc081
688
  /** Challenge Handshake Authentication Protocol */
689
4
#define PCPP_PPP_CHAP     0xc223
690
  /** RSA Authentication Protocol */
691
4
#define PCPP_PPP_RSAAP      0xc225
692
  /** Extensible Authentication Protocol */
693
4
#define PCPP_PPP_EAP      0xc227
694
  /** Mitsubishi Security Information Exchange Protocol (SIEP) */
695
4
#define PCPP_PPP_SIEP     0xc229
696
  /** Stampede Bridging Authorization Protocol */
697
4
#define PCPP_PPP_SBAP     0xc26f
698
  /** Proprietary Authentication Protocol */
699
4
#define PCPP_PPP_PRPAP      0xc281
700
  /** Proprietary Authentication Protocol */
701
4
#define PCPP_PPP_PRPAP2     0xc283
702
  /** Proprietary Node ID Authentication Protocol */
703
4
#define PCPP_PPP_PRPNIAP    0xc481
704
705
} // namespace pcpp