dect
/
libpcap
Archived
13
0
Fork 0

allocate DLT_JUNIPER_ST as per request from Hannes Gredler <hannes@juniper.net>

This commit is contained in:
hannes 2007-09-10 20:17:18 +00:00
parent 266b20f3d4
commit 18341fc1b5
4 changed files with 31 additions and 4 deletions

View File

@ -21,7 +21,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.284 2007-06-22 06:32:06 guy Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.285 2007-09-10 20:17:18 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -1250,6 +1250,12 @@ init_linktype(p)
off_nl_nosnap = -1;
return;
case DLT_JUNIPER_ST:
off_linktype = 18;
off_nl = -1;
off_nl_nosnap = -1;
return;
case DLT_JUNIPER_ISM:
off_linktype = 8;
off_nl = -1;
@ -2575,6 +2581,7 @@ gen_linktype(proto)
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
case DLT_JUNIPER_VP:
case DLT_JUNIPER_ST:
case DLT_JUNIPER_ISM:
/* just lets verify the magic number for now -
* on ATM we may have up to 6 different encapsulations on the wire
@ -6421,6 +6428,7 @@ gen_inbound(dir)
case DLT_JUNIPER_FRELAY:
case DLT_JUNIPER_CHDLC:
case DLT_JUNIPER_VP:
case DLT_JUNIPER_ST:
case DLT_JUNIPER_ISM:
/* juniper flags (including direction) are stored
* the byte after the 3-byte magic number */

3
pcap.c
View File

@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.107 2007-06-22 06:45:54 guy Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.108 2007-09-10 20:17:18 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -389,6 +389,7 @@ static struct dlt_choice dlt_choices[] = {
DLT_CHOICE(DLT_USB_LINUX, "USB with Linux header"),
DLT_CHOICE(DLT_CAN20B, "Controller Area Network (CAN) v. 2.0B"),
DLT_CHOICE(DLT_MTP2_WITH_PHDR, "SS7 MTP2 with Pseudo-header"),
DLT_CHOICE(DLT_JUNIPER_ST, "Juniper Secure Tunnel"),
DLT_CHOICE_SENTINEL
};

View File

@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
* @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.15 2007-08-14 20:56:01 guy Exp $ (LBL)
* @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.16 2007-09-10 20:17:18 hannes Exp $ (LBL)
*/
/*
@ -728,6 +728,13 @@ struct bpf_version {
*/
#define DLT_IPMB 199
/*
* Juniper-private data link type, as per request from
* Hannes Gredler <hannes@juniper.net>.
* The DLT_ is used for capturing data on a secure tunnel interface.
*/
#define DLT_JUNIPER_ST 200
/*
* The instruction encodings.

View File

@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.162 2007-08-14 20:56:01 guy Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.163 2007-09-10 20:17:18 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -552,6 +552,13 @@ static const char rcsid[] _U_ =
*/
#define LINKTYPE_IPMB 199
/*
* Juniper-private data link type, as per request from
* Hannes Gredler <hannes@juniper.net>.
* The DLT_ is used for capturing data on a secure tunnel interface.
*/
#define LINKTYPE_JUNIPER_ST 200
static struct linktype_map {
int dlt;
@ -812,6 +819,10 @@ static struct linktype_map {
/* IPMB */
{ DLT_IPMB, LINKTYPE_IPMB },
/* Juniper Secure Tunnel */
{ DLT_JUNIPER_ST, LINKTYPE_JUNIPER_ST },
{ -1, -1 }
};