add support for DLT_JUNIPER_VP
This commit is contained in:
parent
13a838cb48
commit
b7d2f597d1
10
gencode.c
10
gencode.c
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.266 2006-03-16 08:46:13 hannes Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.267 2006-05-18 08:40:52 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -1191,6 +1191,12 @@ init_linktype(p)
|
|||
off_nl_nosnap = -1; /* no 802.2 LLC */
|
||||
return;
|
||||
|
||||
case DLT_JUNIPER_VP:
|
||||
off_linktype = 18;
|
||||
off_nl = -1;
|
||||
off_nl_nosnap = -1;
|
||||
return;
|
||||
|
||||
case DLT_MTP2:
|
||||
off_sio = 3;
|
||||
off_opc = 4;
|
||||
|
@ -2296,6 +2302,7 @@ gen_linktype(proto)
|
|||
case DLT_JUNIPER_PPP:
|
||||
case DLT_JUNIPER_FRELAY:
|
||||
case DLT_JUNIPER_CHDLC:
|
||||
case DLT_JUNIPER_VP:
|
||||
/* just lets verify the magic number for now -
|
||||
* 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
|
||||
|
@ -6115,6 +6122,7 @@ gen_inbound(dir)
|
|||
case DLT_JUNIPER_PPP:
|
||||
case DLT_JUNIPER_FRELAY:
|
||||
case DLT_JUNIPER_CHDLC:
|
||||
case DLT_JUNIPER_VP:
|
||||
/* juniper flags (including direction) are stored
|
||||
* the byte after the 3-byte magic number */
|
||||
if (dir) {
|
||||
|
|
11
pcap-bpf.h
11
pcap-bpf.h
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.41 2005-12-13 13:41:39 hannes Exp $ (LBL)
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.42 2006-05-18 08:40:52 hannes Exp $ (LBL)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -610,6 +610,15 @@ struct bpf_version {
|
|||
*/
|
||||
#define DLT_MFR 182
|
||||
|
||||
/*
|
||||
* Juniper-private data link type, as per request from
|
||||
* Hannes Gredler <hannes@juniper.net>.
|
||||
* The DLT_ is used for internal communication with a
|
||||
* voice Adapter Card (PIC)
|
||||
*/
|
||||
#define DLT_JUNIPER_VP 183
|
||||
|
||||
|
||||
/*
|
||||
* The instruction encodings.
|
||||
*/
|
||||
|
|
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.98 2006-01-22 20:11:26 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.99 2006-05-18 08:40:52 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -380,6 +380,7 @@ static struct dlt_choice dlt_choices[] = {
|
|||
DLT_CHOICE(DLT_JUNIPER_FRELAY, "Juniper Frame Relay"),
|
||||
DLT_CHOICE(DLT_JUNIPER_CHDLC, "Juniper C-HDLC"),
|
||||
DLT_CHOICE(DLT_MFR, "FRF.16 Frame Relay"),
|
||||
DLT_CHOICE(DLT_JUNIPER_VP, "Juniper Voice PIC"),
|
||||
DLT_CHOICE_SENTINEL
|
||||
};
|
||||
|
||||
|
|
13
savefile.c
13
savefile.c
|
@ -30,7 +30,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.141 2005-12-13 13:41:39 hannes Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.142 2006-05-18 08:40:52 hannes Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -435,6 +435,14 @@ static const char rcsid[] _U_ =
|
|||
*/
|
||||
#define LINKTYPE_MFR 182
|
||||
|
||||
/*
|
||||
* Juniper-private data link type, as per request from
|
||||
* Hannes Gredler <hannes@juniper.net>.
|
||||
* The DLT_ is used for internal communication with a
|
||||
* voice Adapter Card (PIC)
|
||||
*/
|
||||
#define LINKTYPE_JUNIPER_VP 183
|
||||
|
||||
static struct linktype_map {
|
||||
int dlt;
|
||||
int linktype;
|
||||
|
@ -643,6 +651,9 @@ static struct linktype_map {
|
|||
/* Multi Link Frame Relay (FRF.16) */
|
||||
{ DLT_MFR, LINKTYPE_MFR },
|
||||
|
||||
/* Juniper Voice PIC */
|
||||
{ DLT_JUNIPER_VP, LINKTYPE_JUNIPER_VP },
|
||||
|
||||
{ -1, -1 }
|
||||
};
|
||||
|
||||
|
|
Reference in New Issue