From 2c961ff2248fe951e57e1453bbe2a3e388912a37 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 12 Oct 2000 03:53:57 +0000 Subject: Get rid of the PCAP_ENCAP_ values - if an application uses them, that application won't build with any other version of libpcap, which means that a lot of applications won't use them. In addition, "pcap_linktype()" needs to return DLT_ values, so that platforms that build libpcap as a shared library won't break binary compatibility if they update to this version of libpcap. Instead, we map from DLT_ values to LINKTYPE_ values when writing savefiles, and map from LINKTYPE_ values to DLT_ values when reading savefiles, so that savefiles don't have platform-dependent DLT_ values in the header as the link type, they have platform-independent LINKTYPE_ values. This means we don't need to make DLT_ATM_RFC1483, DLT_RAW, etc. have platform-independent values starting at 100 - only the values in the savefile header need to be like that. --- pcap-dlpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pcap-dlpi.c') diff --git a/pcap-dlpi.c b/pcap-dlpi.c index 8337dbf..608c8a2 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -38,7 +38,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.60 2000-09-17 04:04:37 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.61 2000-10-12 03:53:58 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -439,12 +439,12 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf) case DL_CSMACD: case DL_ETHER: - p->linktype = PCAP_ENCAP_ETHERNET; + p->linktype = DLT_EN10MB; p->offset = 2; break; case DL_FDDI: - p->linktype = PCAP_ENCAP_FDDI; + p->linktype = DLT_FDDI; p->offset = 3; break; -- cgit v1.2.3