diff options
author | guy <guy> | 2000-10-12 03:53:57 +0000 |
---|---|---|
committer | guy <guy> | 2000-10-12 03:53:57 +0000 |
commit | 2c961ff2248fe951e57e1453bbe2a3e388912a37 (patch) | |
tree | 7396548168bb33608336f4c570f206005f0189f3 /pcap-enet.c | |
parent | f7179f8b0d0e788eb0386b8f79f5e6092adca9a9 (diff) |
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.
Diffstat (limited to 'pcap-enet.c')
-rw-r--r-- | pcap-enet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-enet.c b/pcap-enet.c index 829f4b0c..821a0d9e 100644 --- a/pcap-enet.c +++ b/pcap-enet.c @@ -8,7 +8,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-enet.c,v 1.4 2000-09-17 04:04:37 guy Exp $"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-enet.c,v 1.5 2000-10-12 03:53:59 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -229,7 +229,7 @@ initdevice(char *device, int pflag, int *linktype) /* * "enetfilter" supports only ethernets. */ - *linktype = PCAP_ENCAP_ETHERNET; + *linktype = DLT_EN10MB; return(if_fd); } |