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