141c99275SPeter Avalos /* 241c99275SPeter Avalos * Redistribution and use in source and binary forms, with or without 341c99275SPeter Avalos * modification, are permitted provided that: (1) source code 441c99275SPeter Avalos * distributions retain the above copyright notice and this paragraph 541c99275SPeter Avalos * in its entirety, and (2) distributions including binary code include 641c99275SPeter Avalos * the above copyright notice and this paragraph in its entirety in 741c99275SPeter Avalos * the documentation or other materials provided with the distribution. 841c99275SPeter Avalos * THIS SOFTWARE IS PROVIDED ``AS IS'' AND 941c99275SPeter Avalos * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT 1041c99275SPeter Avalos * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 1141c99275SPeter Avalos * FOR A PARTICULAR PURPOSE. 1241c99275SPeter Avalos * 13411677aeSAaron LI * Original code by Hannes Gredler (hannes@gredler.at) 1441c99275SPeter Avalos */ 1541c99275SPeter Avalos 1641c99275SPeter Avalos #ifdef HAVE_CONFIG_H 17*ed775ee7SAntonio Huete Jimenez #include <config.h> 1841c99275SPeter Avalos #endif 1941c99275SPeter Avalos 20*ed775ee7SAntonio Huete Jimenez #include "netdissect-stdinc.h" 21411677aeSAaron LI #include "netdissect.h" 2241c99275SPeter Avalos #include "l2vpn.h" 2341c99275SPeter Avalos 24411677aeSAaron LI /* 25411677aeSAaron LI * BGP Layer 2 Encapsulation Types 26411677aeSAaron LI * 27411677aeSAaron LI * RFC 6624 28411677aeSAaron LI * 29*ed775ee7SAntonio Huete Jimenez * https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-l2-encapsulation-types-registry 30411677aeSAaron LI */ 3127bfbee1SPeter Avalos const struct tok l2vpn_encaps_values[] = { 32411677aeSAaron LI { 0, "Reserved"}, 33411677aeSAaron LI { 1, "Frame Relay"}, 34411677aeSAaron LI { 2, "ATM AAL5 SDU VCC transport"}, 35411677aeSAaron LI { 3, "ATM transparent cell transport"}, 36411677aeSAaron LI { 4, "Ethernet (VLAN) Tagged Mode"}, 37411677aeSAaron LI { 5, "Ethernet Raw Mode"}, 38411677aeSAaron LI { 6, "Cisco HDLC"}, 39411677aeSAaron LI { 7, "PPP"}, 40411677aeSAaron LI { 8, "SONET/SDH Circuit Emulation Service over MPLS"}, 41411677aeSAaron LI { 9, "ATM n-to-one VCC cell transport"}, 42411677aeSAaron LI { 10, "ATM n-to-one VPC cell transport"}, 43411677aeSAaron LI { 11, "IP layer 2 transport"}, 44411677aeSAaron LI { 15, "Frame Relay Port mode"}, 45411677aeSAaron LI { 17, "Structure-agnostic E1 over packet"}, 46411677aeSAaron LI { 18, "Structure-agnostic T1 (DS1) over packet"}, 47411677aeSAaron LI { 19, "VPLS"}, 48411677aeSAaron LI { 20, "Structure-agnostic T3 (DS3) over packet"}, 49411677aeSAaron LI { 21, "Nx64kbit/s Basic Service using Structure-aware"}, 50411677aeSAaron LI { 25, "Frame Relay DLCI"}, 51411677aeSAaron LI { 40, "Structure-agnostic E3 over packet"}, 52411677aeSAaron LI { 41, "Octet-aligned playload for Structure-agnostic DS1 circuits"}, 53411677aeSAaron LI { 42, "E1 Nx64kbit/s with CAS using Structure-aware"}, 54411677aeSAaron LI { 43, "DS1 (ESF) Nx64kbit/s with CAS using Structure-aware"}, 55411677aeSAaron LI { 44, "DS1 (SF) Nx64kbit/s with CAS using Structure-aware"}, 56411677aeSAaron LI { 0, NULL} 57411677aeSAaron LI }; 58411677aeSAaron LI 59411677aeSAaron LI /* 60411677aeSAaron LI * MPLS Pseudowire Types 61411677aeSAaron LI * 62411677aeSAaron LI * RFC 4446 63411677aeSAaron LI * 64*ed775ee7SAntonio Huete Jimenez * https://www.iana.org/assignments/pwe3-parameters/pwe3-parameters.xhtml#pwe3-parameters-2 65411677aeSAaron LI */ 66411677aeSAaron LI const struct tok mpls_pw_types_values[] = { 67411677aeSAaron LI { 0x0000, "Reserved"}, 68411677aeSAaron LI { 0x0001, "Frame Relay DLCI (Martini Mode)"}, 69411677aeSAaron LI { 0x0002, "ATM AAL5 SDU VCC transport"}, 70411677aeSAaron LI { 0x0003, "ATM transparent cell transport"}, 71411677aeSAaron LI { 0x0004, "Ethernet VLAN"}, 72411677aeSAaron LI { 0x0005, "Ethernet"}, 73411677aeSAaron LI { 0x0006, "Cisco-HDLC"}, 74411677aeSAaron LI { 0x0007, "PPP"}, 75411677aeSAaron LI { 0x0008, "SONET/SDH Circuit Emulation Service over MPLS"}, 76411677aeSAaron LI { 0x0009, "ATM n-to-one VCC cell transport"}, 77411677aeSAaron LI { 0x000a, "ATM n-to-one VPC cell transport"}, 78411677aeSAaron LI { 0x000b, "IP Layer2 Transport"}, 79411677aeSAaron LI { 0x000c, "ATM one-to-one VCC Cell Mode"}, 80411677aeSAaron LI { 0x000d, "ATM one-to-one VPC Cell Mode"}, 81411677aeSAaron LI { 0x000e, "ATM AAL5 PDU VCC transport"}, 82411677aeSAaron LI { 0x000f, "Frame-Relay Port mode"}, 83411677aeSAaron LI { 0x0010, "SONET/SDH Circuit Emulation over Packet"}, 84411677aeSAaron LI { 0x0011, "Structure-agnostic E1 over Packet"}, 85411677aeSAaron LI { 0x0012, "Structure-agnostic T1 (DS1) over Packet"}, 86411677aeSAaron LI { 0x0013, "Structure-agnostic E3 over Packet"}, 87411677aeSAaron LI { 0x0014, "Structure-agnostic T3 (DS3) over Packet"}, 88411677aeSAaron LI { 0x0015, "CESoPSN basic mode"}, 89411677aeSAaron LI { 0x0016, "TDMoIP basic mode"}, 90411677aeSAaron LI { 0x0017, "CESoPSN TDM with CAS"}, 91411677aeSAaron LI { 0x0018, "TDMoIP TDM with CAS"}, 92411677aeSAaron LI { 0x0019, "Frame Relay DLCI"}, 93411677aeSAaron LI { 0x0040, "IP-interworking"}, 9441c99275SPeter Avalos { 0, NULL} 9541c99275SPeter Avalos }; 96