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