atmuni31.h
bootp.h
bpf_dump.c
+bgp.h
chdlc.h
config.guess
config.h.in
ipx.h
isakmp.h
l2tp.h
+l2vpn.c
+l2vpn.h
lane.h
lbl/os-osf4.h
lbl/os-solaris2.h
missing/strlcpy.c
missing/strsep.c
mkdep
+mpls.h
nameser.h
netbios.h
nfs.h
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.287 2004-06-06 19:20:04 hannes Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.288 2004-06-15 09:45:41 hannes Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
@rm -f $@
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
-CSRC = addrtoname.c gmpls.c oui.c gmt2local.c ipproto.c machdep.c parsenfsfh.c \
+CSRC = addrtoname.c gmpls.c oui.c gmt2local.c ipproto.c l2vpn.c machdep.c parsenfsfh.c \
print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \
--- /dev/null
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004-06-15 09:42:40 hannes Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+#include "interface.h"
+#include "l2vpn.h"
+
+/* draft-ietf-pwe3-iana-allocation-04 */
+struct tok l2vpn_encaps_values[] = {
+ { 0x00, "Reserved"},
+ { 0x01, "Frame Relay"},
+ { 0x02, "ATM AAL5 VCC transport"},
+ { 0x03, "ATM transparent cell transport"},
+ { 0x04, "Ethernet VLAN"},
+ { 0x05, "Ethernet"},
+ { 0x06, "Cisco-HDLC"},
+ { 0x07, "PPP"},
+ { 0x08, "SONET/SDH Circuit Emulation Service over MPLS"},
+ { 0x09, "ATM n-to-one VCC cell transport"},
+ { 0x0a, "ATM n-to-one VPC cell transport"},
+ { 0x0b, "IP Layer2 Transport"},
+ { 0x0c, "ATM one-to-one VCC Cell Mode"},
+ { 0x0d, "ATM one-to-one VPC Cell Mode"},
+ { 0x0e, "ATM AAL5 PDU VCC transport"},
+ { 0x0f, "Frame-Relay Port mode"},
+ { 0x10, "SONET/SDH Circuit Emulation over Packet"},
+ { 0x11, "Structure-agnostic E1 over Packet"},
+ { 0x12, "Structure-agnostic T1 (DS1) over Packet"},
+ { 0x13, "Structure-agnostic E3 over Packet"},
+ { 0x14, "Structure-agnostic T3 (DS3) over Packet"},
+ { 0x15, "CESoPSN basic mode"},
+ { 0x16, "TDMoIP basic mode"},
+ { 0x17, "CESoPSN TDM with CAS"},
+ { 0x18, "TDMoIP TDM with CAS"},
+ { 0x40, "IP-interworking"},
+ { 0, NULL}
+};
--- /dev/null
+/* @(#) $Header: /tcpdump/master/tcpdump/l2vpn.h,v 1.1 2004-06-15 09:42:41 hannes Exp $ (LBL) */
+/*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+extern struct tok l2vpn_encaps_values[];
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.86 2004-06-12 08:52:21 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.87 2004-06-15 09:42:41 hannes Exp $";
#endif
#include <tcpdump-stdinc.h>
#include "addrtoname.h"
#include "extract.h"
#include "bgp.h"
+#include "l2vpn.h"
struct bgp {
u_int8_t bgp_marker[16];
{ 0, NULL },
};
-struct tok bgp_l2vpn_encaps_values[] = {
- { 0, "Reserved"},
- { 1, "Frame Relay"},
- { 2, "ATM AAL5 VCC transport"},
- { 3, "ATM transparent cell transport"},
- { 4, "Ethernet VLAN"},
- { 5, "Ethernet"},
- { 6, "Cisco-HDLC"},
- { 7, "PPP"},
- { 8, "CEM"},
- { 9, "ATM VCC cell transport"},
- { 10, "ATM VPC cell transport"},
- { 11, "MPLS"},
- { 12, "VPLS"},
- { 64, "IP-interworking"},
- { 0, NULL},
-};
-
int
decode_prefix4(const u_char *pptr, char *buf, u_int buflen)
{
break;
case BGP_EXT_COM_L2INFO:
printf(": %s Control Flags [0x%02x]:MTU %u",
- tok2strbuf(bgp_l2vpn_encaps_values,
+ tok2strbuf(l2vpn_encaps_values,
"unknown encaps",
*(tptr+2),
tokbuf, sizeof(tokbuf)),
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.7 2004-05-27 21:20:50 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8 2004-06-15 09:42:42 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
#include "extract.h"
#include "addrtoname.h"
+#include "l2vpn.h"
+
/*
* ldp common header
*
{ 0, NULL}
};
-/* From draft-martini-l2circuit-trans-mpls-13.txt */
-#define LDP_MARTINI_VCTYPE_FR_DLCI 0x0001
-#define LDP_MARTINI_VCTYPE_ATM_AAL5 0x0002
-#define LDP_MARTINI_VCTYPE_ATM_CELL 0x0003
-#define LDP_MARTINI_VCTYPE_ETH_VLAN 0x0004
-#define LDP_MARTINI_VCTYPE_ETHERNET 0x0005
-#define LDP_MARTINI_VCTYPE_HDLC 0x0006
-#define LDP_MARTINI_VCTYPE_PPP 0x0007
-#define LDP_MARTINI_VCTYPE_CEM 0x0008
-#define LDP_MARTINI_VCTYPE_ATM_VCC 0x0009
-#define LDP_MARTINI_VCTYPE_ATM_VPC 0x000A
-
-/* Overlaps print-bgp.c bgp_l2vpn_encaps_values */
-static const struct tok ldp_vctype_values[] = {
- { LDP_MARTINI_VCTYPE_FR_DLCI, "Frame Relay DLCI" },
- { LDP_MARTINI_VCTYPE_ATM_AAL5, "ATM AAL5 VCC transport" },
- { LDP_MARTINI_VCTYPE_ATM_CELL, "ATM transparent cell transport" },
- { LDP_MARTINI_VCTYPE_ETH_VLAN, "Ethernet VLAN" },
- { LDP_MARTINI_VCTYPE_ETHERNET, "Ethernet" },
- { LDP_MARTINI_VCTYPE_HDLC, "HDLC" },
- { LDP_MARTINI_VCTYPE_PPP, "PPP" },
- { LDP_MARTINI_VCTYPE_CEM, "SONET/SDH Circuit Emulation Service" },
- { LDP_MARTINI_VCTYPE_ATM_VCC, "ATM VCC cell transport" },
- { LDP_MARTINI_VCTYPE_ATM_VPC, "ATM VPC cell transport" },
- { 0, NULL}
-};
-
/* RFC1700 address family numbers, same definition in print-bgp.c */
#define AFNUM_INET 1
#define AFNUM_INET6 2
break;
case LDP_FEC_MARTINI_VC:
printf(": %s, %scontrol word, VC %u",
- tok2str(ldp_vctype_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
+ tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
EXTRACT_32BITS(tptr+7));
break;
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.7 2004-06-15 08:17:19 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.8 2004-06-15 09:42:42 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
#include "interface.h"
#include "extract.h"
#include "addrtoname.h"
+
#include "bgp.h"
+#include "l2vpn.h"
/*
* LSPPING common header
bgp_vpn_rd_print(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->rd),
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->sender_ce_id),
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->receiver_ce_id),
- tok2str(bgp_l2vpn_encaps_values,
+ tok2str(l2vpn_encaps_values,
"unknown",
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation)),
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation));
ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->sender_pe_address),
ipaddr_string(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->remote_pe_address),
EXTRACT_32BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_vcid->vc_id),
- tok2str(bgp_l2vpn_encaps_values, /* FIXME are the L2 encaps codepoints of BGP == LDP ??? */
+ tok2str(l2vpn_encaps_values,
"unknown",
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation)),
EXTRACT_16BITS(subtlv_ptr.lspping_tlv_targetfec_subtlv_l2vpn_endpt->encapsulation));