dect
/
libpcap
Archived
13
0
Fork 0

Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the

right value for CAN).
Added the definition of DLT_A429 and LINKTYPE_A429 as #184.
Added these two link layers in the global array dlt_choices.
This commit is contained in:
gianluca 2006-07-19 20:51:50 +00:00
parent d91be5b8af
commit 303bc7bd43
3 changed files with 28 additions and 5 deletions

View File

@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.43 2006-05-20 00:23:45 gianluca Exp $ (LBL)
* @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.44 2006-07-19 20:51:50 gianluca Exp $ (LBL)
*/
/*
@ -618,6 +618,15 @@ struct bpf_version {
*/
#define DLT_JUNIPER_VP 183
/*
* Arinc 429 frames.
* DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
* Every frame contains a 32bit A429 label.
* More documentation on Arinc 429 can be found at
* http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
*/
#define LINKTYPE_A429 184
/*
* Controller Area Network (CAN) v. 2.0B packets.
* DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
@ -625,7 +634,7 @@ struct bpf_version {
* More documentation on the CAN v2.0B frames can be found at
* http://www.can-cia.org/downloads/?269
*/
#define DLT_CAN20B 184
#define DLT_CAN20B 190
/*

4
pcap.c
View File

@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.99 2006-05-18 08:40:52 hannes Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.100 2006-07-19 20:51:50 gianluca Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -381,6 +381,8 @@ static struct dlt_choice dlt_choices[] = {
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(DLT_A429, "Arinc 429"),
DLT_CHOICE(DLT_CAN20B, "Controller Area Network (CAN) v. 2.0B"),
DLT_CHOICE_SENTINEL
};

View File

@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.143 2006-05-20 00:23:45 gianluca Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.144 2006-07-19 20:51:50 gianluca Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -443,6 +443,15 @@ static const char rcsid[] _U_ =
*/
#define LINKTYPE_JUNIPER_VP 183
/*
* Arinc 429 frames.
* DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
* Every frame contains a 32bit A429 label.
* More documentation on Arinc 429 can be found at
* http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
*/
#define LINKTYPE_A429 184
/*
* Controller Area Network (CAN) v. 2.0B packets.
* DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
@ -450,7 +459,7 @@ static const char rcsid[] _U_ =
* More documentation on the CAN v2.0B frames can be found at
* http://www.can-cia.org/downloads/?269
*/
#define LINKTYPE_CAN20B 184
#define LINKTYPE_CAN20B 190
static struct linktype_map {
int dlt;
@ -663,6 +672,9 @@ static struct linktype_map {
/* Juniper Voice PIC */
{ DLT_JUNIPER_VP, LINKTYPE_JUNIPER_VP },
/* Controller Area Network (CAN) v2.0B */
{ DLT_A429, LINKTYPE_A429 },
/* Controller Area Network (CAN) v2.0B */
{ DLT_CAN20B, LINKTYPE_CAN20B },