allocate 4 new DLTs on behalf of Juniper Networks, Inc. for
prepending meta-information like interface index, interface name before a standard Ethernet, PPP, Frame Relay, C-HDLC Frame
This commit is contained in:
parent
88389e4834
commit
9ab067e012
14
gencode.c
14
gencode.c
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] _U_ =
|
static const char rcsid[] _U_ =
|
||||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.257 2005-08-08 07:24:53 guy Exp $ (LBL)";
|
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.258 2005-08-12 19:23:30 hannes Exp $ (LBL)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -1121,6 +1121,9 @@ init_linktype(p)
|
||||||
case DLT_JUNIPER_MFR:
|
case DLT_JUNIPER_MFR:
|
||||||
case DLT_JUNIPER_MLFR:
|
case DLT_JUNIPER_MLFR:
|
||||||
case DLT_JUNIPER_MLPPP:
|
case DLT_JUNIPER_MLPPP:
|
||||||
|
case DLT_JUNIPER_PPP:
|
||||||
|
case DLT_JUNIPER_CHDLC:
|
||||||
|
case DLT_JUNIPER_FRELAY:
|
||||||
off_linktype = 4;
|
off_linktype = 4;
|
||||||
off_nl = 4;
|
off_nl = 4;
|
||||||
off_nl_nosnap = -1; /* no 802.2 LLC */
|
off_nl_nosnap = -1; /* no 802.2 LLC */
|
||||||
|
@ -1141,6 +1144,7 @@ init_linktype(p)
|
||||||
/* frames captured on a Juniper PPPoE service PIC
|
/* frames captured on a Juniper PPPoE service PIC
|
||||||
* contain raw ethernet frames */
|
* contain raw ethernet frames */
|
||||||
case DLT_JUNIPER_PPPOE:
|
case DLT_JUNIPER_PPPOE:
|
||||||
|
case DLT_JUNIPER_ETHER:
|
||||||
off_linktype = 16;
|
off_linktype = 16;
|
||||||
off_nl = 18; /* Ethernet II */
|
off_nl = 18; /* Ethernet II */
|
||||||
off_nl_nosnap = 21; /* 802.3+802.2 */
|
off_nl_nosnap = 21; /* 802.3+802.2 */
|
||||||
|
@ -2276,6 +2280,10 @@ gen_linktype(proto)
|
||||||
case DLT_JUNIPER_ES:
|
case DLT_JUNIPER_ES:
|
||||||
case DLT_JUNIPER_MONITOR:
|
case DLT_JUNIPER_MONITOR:
|
||||||
case DLT_JUNIPER_SERVICES:
|
case DLT_JUNIPER_SERVICES:
|
||||||
|
case DLT_JUNIPER_ETHER:
|
||||||
|
case DLT_JUNIPER_PPP:
|
||||||
|
case DLT_JUNIPER_FRELAY:
|
||||||
|
case DLT_JUNIPER_CHDLC:
|
||||||
/* just lets verify the magic number for now -
|
/* just lets verify the magic number for now -
|
||||||
* on ATM we may have up to 6 different encapsulations on the wire
|
* on ATM we may have up to 6 different encapsulations on the wire
|
||||||
* and need a lot of heuristics to figure out that the payload
|
* and need a lot of heuristics to figure out that the payload
|
||||||
|
@ -6059,6 +6067,10 @@ gen_inbound(dir)
|
||||||
case DLT_JUNIPER_ES:
|
case DLT_JUNIPER_ES:
|
||||||
case DLT_JUNIPER_MONITOR:
|
case DLT_JUNIPER_MONITOR:
|
||||||
case DLT_JUNIPER_SERVICES:
|
case DLT_JUNIPER_SERVICES:
|
||||||
|
case DLT_JUNIPER_ETHER:
|
||||||
|
case DLT_JUNIPER_PPP:
|
||||||
|
case DLT_JUNIPER_FRELAY:
|
||||||
|
case DLT_JUNIPER_CHDLC:
|
||||||
/* juniper flags (including direction) are stored
|
/* juniper flags (including direction) are stored
|
||||||
* the byte after the 3-byte magic number */
|
* the byte after the 3-byte magic number */
|
||||||
if (dir) {
|
if (dir) {
|
||||||
|
|
14
pcap-bpf.h
14
pcap-bpf.h
|
@ -37,7 +37,7 @@
|
||||||
*
|
*
|
||||||
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
||||||
*
|
*
|
||||||
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.39 2005-08-01 01:13:53 guy Exp $ (LBL)
|
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.40 2005-08-12 19:23:31 hannes Exp $ (LBL)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -593,6 +593,18 @@ struct bpf_version {
|
||||||
*/
|
*/
|
||||||
#define DLT_LINUX_LAPD 177
|
#define DLT_LINUX_LAPD 177
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Juniper-private data link type, as per request from
|
||||||
|
* Hannes Gredler <hannes@juniper.net>.
|
||||||
|
* The DLT_ are used for prepending meta-information
|
||||||
|
* like interface index, interface name
|
||||||
|
* before standard Ethernet, PPP, Frelay & C-HDLC Frames
|
||||||
|
*/
|
||||||
|
#define DLT_JUNIPER_ETHER 178
|
||||||
|
#define DLT_JUNIPER_PPP 179
|
||||||
|
#define DLT_JUNIPER_FRELAY 180
|
||||||
|
#define DLT_JUNIPER_CHDLC 181
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The instruction encodings.
|
* The instruction encodings.
|
||||||
*/
|
*/
|
||||||
|
|
6
pcap.c
6
pcap.c
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] _U_ =
|
static const char rcsid[] _U_ =
|
||||||
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.95 2005-07-20 15:25:09 hannes Exp $ (LBL)";
|
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.96 2005-08-12 19:23:31 hannes Exp $ (LBL)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -374,6 +374,10 @@ static struct dlt_choice dlt_choices[] = {
|
||||||
DLT_CHOICE(DLT_JUNIPER_MONITOR, "Juniper Passive Monitor PIC"),
|
DLT_CHOICE(DLT_JUNIPER_MONITOR, "Juniper Passive Monitor PIC"),
|
||||||
DLT_CHOICE(DLT_JUNIPER_SERVICES, "Juniper Advanced Services PIC"),
|
DLT_CHOICE(DLT_JUNIPER_SERVICES, "Juniper Advanced Services PIC"),
|
||||||
DLT_CHOICE(DLT_JUNIPER_MFR, "Juniper FRF.16 Frame Relay"),
|
DLT_CHOICE(DLT_JUNIPER_MFR, "Juniper FRF.16 Frame Relay"),
|
||||||
|
DLT_CHOICE(DLT_JUNIPER_ETHER, "Juniper Ethernet"),
|
||||||
|
DLT_CHOICE(DLT_JUNIPER_PPP, "Juniper PPP"),
|
||||||
|
DLT_CHOICE(DLT_JUNIPER_FRELAY, "Juniper Frame Relay"),
|
||||||
|
DLT_CHOICE(DLT_JUNIPER_CHDLC, "Juniper C-HDLC"),
|
||||||
DLT_CHOICE_SENTINEL
|
DLT_CHOICE_SENTINEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
21
savefile.c
21
savefile.c
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] _U_ =
|
static const char rcsid[] _U_ =
|
||||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.138 2005-07-07 01:57:03 guy Exp $ (LBL)";
|
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.139 2005-08-12 19:23:32 hannes Exp $ (LBL)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -412,6 +412,18 @@ static const char rcsid[] _U_ =
|
||||||
*/
|
*/
|
||||||
#define LINKTYPE_LINUX_LAPD 177
|
#define LINKTYPE_LINUX_LAPD 177
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Juniper-private data link type, as per request from
|
||||||
|
* Hannes Gredler <hannes@juniper.net>.
|
||||||
|
* The Link Types are used for prepending meta-information
|
||||||
|
* like interface index, interface name
|
||||||
|
* before standard Ethernet, PPP, Frelay & C-HDLC Frames
|
||||||
|
*/
|
||||||
|
#define LINKTYPE_JUNIPER_ETHER 178
|
||||||
|
#define LINKTYPE_JUNIPER_PPP 179
|
||||||
|
#define LINKTYPE_JUNIPER_FRELAY 180
|
||||||
|
#define LINKTYPE_JUNIPER_CHDLC 181
|
||||||
|
|
||||||
static struct linktype_map {
|
static struct linktype_map {
|
||||||
int dlt;
|
int dlt;
|
||||||
int linktype;
|
int linktype;
|
||||||
|
@ -611,6 +623,13 @@ static struct linktype_map {
|
||||||
/* viSDN LAPD */
|
/* viSDN LAPD */
|
||||||
{ DLT_LINUX_LAPD, LINKTYPE_LINUX_LAPD },
|
{ DLT_LINUX_LAPD, LINKTYPE_LINUX_LAPD },
|
||||||
|
|
||||||
|
/* Juniper meta-information before Ether, PPP, Frame Relay, C-HDLC Frames */
|
||||||
|
{ DLT_JUNIPER_ETHER, LINKTYPE_JUNIPER_ETHER },
|
||||||
|
{ DLT_JUNIPER_PPP, LINKTYPE_JUNIPER_PPP },
|
||||||
|
{ DLT_JUNIPER_FRELAY, LINKTYPE_JUNIPER_FRELAY },
|
||||||
|
{ DLT_JUNIPER_CHDLC, LINKTYPE_JUNIPER_CHDLC },
|
||||||
|
|
||||||
|
|
||||||
{ -1, -1 }
|
{ -1, -1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in New Issue