New DLT_MPLS link-layer type, for MPLS packets with an MPLS label as the
link-layer header.
This commit is contained in:
parent
c93e0966e1
commit
8a49a4d47b
12
gencode.c
12
gencode.c
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.306 2008-09-22 20:14:19 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.307 2008-12-21 19:28:56 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1497,6 +1497,16 @@ init_linktype(p)
|
|||
off_nl = -1;
|
||||
off_nl_nosnap = -1;
|
||||
return;
|
||||
|
||||
case DLT_MPLS:
|
||||
/*
|
||||
* Currently, only raw "link[N:M]" filtering is supported.
|
||||
*/
|
||||
off_linktype = -1;
|
||||
off_macpl = -1;
|
||||
off_nl = -1;
|
||||
off_nl_nosnap = -1;
|
||||
return;
|
||||
}
|
||||
bpf_error("unknown data link type %d", linktype);
|
||||
/* NOTREACHED */
|
||||
|
|
3
pcap.c
3
pcap.c
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.125 2008-12-14 19:36:02 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.126 2008-12-21 19:28:56 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -623,6 +623,7 @@ static struct dlt_choice dlt_choices[] = {
|
|||
DLT_CHOICE(DLT_BLUETOOTH_HCI_H4_WITH_PHDR, "Bluetooth HCI UART transport layer plus pseudo-header"),
|
||||
DLT_CHOICE(DLT_AX25_KISS, "AX.25 with KISS header"),
|
||||
DLT_CHOICE(DLT_IEEE802_15_4_NONASK_PHY, "IEEE 802.15.4 with non-ASK PHY data"),
|
||||
DLT_CHOICE(DLT_MPLS, "MPLS with label as link-layer header"),
|
||||
DLT_CHOICE_SENTINEL
|
||||
};
|
||||
|
||||
|
|
15
pcap/bpf.h
15
pcap/bpf.h
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.29 2008-11-27 19:47:54 guy Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.30 2008-12-21 19:28:56 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -827,15 +827,22 @@ struct bpf_version {
|
|||
* is used to communicate keystrokes and mouse movements from the
|
||||
* Linux kernel to display systems, such as Xorg.
|
||||
*/
|
||||
#define DLT_LINUX_EVDEV 216
|
||||
#define DLT_LINUX_EVDEV 216
|
||||
|
||||
/*
|
||||
* GSM Um and Abis interfaces, preceded by a "gsmtap" header.
|
||||
*
|
||||
* Requested by Harald Welte <laforge@gnumonks.org>.
|
||||
*/
|
||||
#define DLT_GSMTAP_UM 217
|
||||
#define DLT_GSMTAP_ABIS 218
|
||||
#define DLT_GSMTAP_UM 217
|
||||
#define DLT_GSMTAP_ABIS 218
|
||||
|
||||
/*
|
||||
* MPLS, with an MPLS label as the link-layer header.
|
||||
* Requested by Michele Marchetto <michele@openbsd.org> on behalf
|
||||
* of OpenBSD.
|
||||
*/
|
||||
#define DLT_MPLS 219
|
||||
|
||||
|
||||
/*
|
||||
|
|
12
savefile.c
12
savefile.c
|
@ -30,7 +30,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.180 2008-11-27 19:47:54 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.181 2008-12-21 19:28:56 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -663,6 +663,13 @@ static const char rcsid[] _U_ =
|
|||
#define LINKTYPE_GSMTAP_UM 217
|
||||
#define LINKTYPE_GSMTAP_ABIS 218
|
||||
|
||||
/*
|
||||
* MPLS, with an MPLS label as the link-layer header.
|
||||
* Requested by Michele Marchetto <michele@openbsd.org> on behalf
|
||||
* of OpenBSD.
|
||||
*/
|
||||
#define LINKTYPE_MPLS 219
|
||||
|
||||
|
||||
static struct linktype_map {
|
||||
int dlt;
|
||||
|
@ -975,6 +982,9 @@ static struct linktype_map {
|
|||
{ DLT_GSMTAP_UM, LINKTYPE_GSMTAP_UM },
|
||||
{ DLT_GSMTAP_ABIS, LINKTYPE_GSMTAP_ABIS },
|
||||
|
||||
/* MPLS, with an MPLS label as the link-layer header */
|
||||
{ DLT_MPLS, LINKTYPE_MPLS },
|
||||
|
||||
{ -1, -1 }
|
||||
};
|
||||
|
||||
|
|
Reference in New Issue