Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 1 | /* |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 2 | * Redistribution and use in source and binary forms, with or without |
| 3 | * modification, are permitted provided that: (1) source code |
| 4 | * distributions retain the above copyright notice and this paragraph |
| 5 | * in its entirety, and (2) distributions including binary code include |
| 6 | * the above copyright notice and this paragraph in its entirety in |
| 7 | * the documentation or other materials provided with the distribution. |
| 8 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND |
| 9 | * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT |
| 10 | * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 11 | * FOR A PARTICULAR PURPOSE. |
| 12 | * |
Elliott Hughes | cec480a | 2017-12-19 16:54:57 -0800 | [diff] [blame] | 13 | * Original code by Hannes Gredler (hannes@gredler.at) |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 14 | */ |
| 15 | |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 16 | #ifdef HAVE_CONFIG_H |
Elliott Hughes | 820eced | 2021-08-20 18:00:50 -0700 | [diff] [blame] | 17 | #include <config.h> |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 18 | #endif |
| 19 | |
Elliott Hughes | 820eced | 2021-08-20 18:00:50 -0700 | [diff] [blame] | 20 | #include "netdissect-stdinc.h" |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 21 | #include "netdissect.h" |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 22 | #include "l2vpn.h" |
| 23 | |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 24 | /* |
| 25 | * BGP Layer 2 Encapsulation Types |
| 26 | * |
| 27 | * RFC 6624 |
| 28 | * |
Elliott Hughes | 820eced | 2021-08-20 18:00:50 -0700 | [diff] [blame] | 29 | * https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-l2-encapsulation-types-registry |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 30 | */ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 31 | const struct tok l2vpn_encaps_values[] = { |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 32 | { 0, "Reserved"}, |
| 33 | { 1, "Frame Relay"}, |
| 34 | { 2, "ATM AAL5 SDU VCC transport"}, |
| 35 | { 3, "ATM transparent cell transport"}, |
| 36 | { 4, "Ethernet (VLAN) Tagged Mode"}, |
| 37 | { 5, "Ethernet Raw Mode"}, |
| 38 | { 6, "Cisco HDLC"}, |
| 39 | { 7, "PPP"}, |
| 40 | { 8, "SONET/SDH Circuit Emulation Service over MPLS"}, |
| 41 | { 9, "ATM n-to-one VCC cell transport"}, |
| 42 | { 10, "ATM n-to-one VPC cell transport"}, |
| 43 | { 11, "IP layer 2 transport"}, |
| 44 | { 15, "Frame Relay Port mode"}, |
| 45 | { 17, "Structure-agnostic E1 over packet"}, |
| 46 | { 18, "Structure-agnostic T1 (DS1) over packet"}, |
| 47 | { 19, "VPLS"}, |
| 48 | { 20, "Structure-agnostic T3 (DS3) over packet"}, |
| 49 | { 21, "Nx64kbit/s Basic Service using Structure-aware"}, |
| 50 | { 25, "Frame Relay DLCI"}, |
| 51 | { 40, "Structure-agnostic E3 over packet"}, |
| 52 | { 41, "Octet-aligned playload for Structure-agnostic DS1 circuits"}, |
| 53 | { 42, "E1 Nx64kbit/s with CAS using Structure-aware"}, |
| 54 | { 43, "DS1 (ESF) Nx64kbit/s with CAS using Structure-aware"}, |
| 55 | { 44, "DS1 (SF) Nx64kbit/s with CAS using Structure-aware"}, |
| 56 | { 0, NULL} |
| 57 | }; |
| 58 | |
| 59 | /* |
| 60 | * MPLS Pseudowire Types |
| 61 | * |
| 62 | * RFC 4446 |
| 63 | * |
Elliott Hughes | 820eced | 2021-08-20 18:00:50 -0700 | [diff] [blame] | 64 | * https://www.iana.org/assignments/pwe3-parameters/pwe3-parameters.xhtml#pwe3-parameters-2 |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 65 | */ |
| 66 | const struct tok mpls_pw_types_values[] = { |
| 67 | { 0x0000, "Reserved"}, |
| 68 | { 0x0001, "Frame Relay DLCI (Martini Mode)"}, |
| 69 | { 0x0002, "ATM AAL5 SDU VCC transport"}, |
| 70 | { 0x0003, "ATM transparent cell transport"}, |
| 71 | { 0x0004, "Ethernet VLAN"}, |
| 72 | { 0x0005, "Ethernet"}, |
| 73 | { 0x0006, "Cisco-HDLC"}, |
| 74 | { 0x0007, "PPP"}, |
| 75 | { 0x0008, "SONET/SDH Circuit Emulation Service over MPLS"}, |
| 76 | { 0x0009, "ATM n-to-one VCC cell transport"}, |
| 77 | { 0x000a, "ATM n-to-one VPC cell transport"}, |
| 78 | { 0x000b, "IP Layer2 Transport"}, |
| 79 | { 0x000c, "ATM one-to-one VCC Cell Mode"}, |
| 80 | { 0x000d, "ATM one-to-one VPC Cell Mode"}, |
| 81 | { 0x000e, "ATM AAL5 PDU VCC transport"}, |
| 82 | { 0x000f, "Frame-Relay Port mode"}, |
| 83 | { 0x0010, "SONET/SDH Circuit Emulation over Packet"}, |
| 84 | { 0x0011, "Structure-agnostic E1 over Packet"}, |
| 85 | { 0x0012, "Structure-agnostic T1 (DS1) over Packet"}, |
| 86 | { 0x0013, "Structure-agnostic E3 over Packet"}, |
| 87 | { 0x0014, "Structure-agnostic T3 (DS3) over Packet"}, |
| 88 | { 0x0015, "CESoPSN basic mode"}, |
| 89 | { 0x0016, "TDMoIP basic mode"}, |
| 90 | { 0x0017, "CESoPSN TDM with CAS"}, |
| 91 | { 0x0018, "TDMoIP TDM with CAS"}, |
| 92 | { 0x0019, "Frame Relay DLCI"}, |
| 93 | { 0x0040, "IP-interworking"}, |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 94 | { 0, NULL} |
| 95 | }; |