xref: /freebsd/contrib/tcpdump/l2vpn.c (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1 /*
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  *
13  * Original code by Hannes Gredler (hannes@juniper.net)
14  */
15 
16 #ifndef lint
17 static const char rcsid[] _U_ =
18     "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004/06/15 09:42:40 hannes Exp $ (LBL)";
19 #endif
20 
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24 
25 #include <tcpdump-stdinc.h>
26 #include "interface.h"
27 #include "l2vpn.h"
28 
29 /* draft-ietf-pwe3-iana-allocation-04 */
30 struct tok l2vpn_encaps_values[] = {
31     { 0x00, "Reserved"},
32     { 0x01, "Frame Relay"},
33     { 0x02, "ATM AAL5 VCC transport"},
34     { 0x03, "ATM transparent cell transport"},
35     { 0x04, "Ethernet VLAN"},
36     { 0x05, "Ethernet"},
37     { 0x06, "Cisco-HDLC"},
38     { 0x07, "PPP"},
39     { 0x08, "SONET/SDH Circuit Emulation Service over MPLS"},
40     { 0x09, "ATM n-to-one VCC cell transport"},
41     { 0x0a, "ATM n-to-one VPC cell transport"},
42     { 0x0b, "IP Layer2 Transport"},
43     { 0x0c, "ATM one-to-one VCC Cell Mode"},
44     { 0x0d, "ATM one-to-one VPC Cell Mode"},
45     { 0x0e, "ATM AAL5 PDU VCC transport"},
46     { 0x0f, "Frame-Relay Port mode"},
47     { 0x10, "SONET/SDH Circuit Emulation over Packet"},
48     { 0x11, "Structure-agnostic E1 over Packet"},
49     { 0x12, "Structure-agnostic T1 (DS1) over Packet"},
50     { 0x13, "Structure-agnostic E3 over Packet"},
51     { 0x14, "Structure-agnostic T3 (DS3) over Packet"},
52     { 0x15, "CESoPSN basic mode"},
53     { 0x16, "TDMoIP basic mode"},
54     { 0x17, "CESoPSN TDM with CAS"},
55     { 0x18, "TDMoIP TDM with CAS"},
56     { 0x40, "IP-interworking"},
57     { 0, NULL}
58 };
59