diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-03-25 06:04:54 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-03-25 06:04:54 +0000 |
commit | aee3f97aba0081b8ba24379c59794e83c339b20c (patch) | |
tree | 700f673f6b8d6150dc0cc7798d1e6bb9477d1f0f /pcap-util.c | |
parent | d851f3651928399f4fecc50a740ed7aa293fac3b (diff) |
AIX's BPF, and thus its tcpdump, appears to use 24 as the link-layer
type for loopback devices; map it to DLT_NULL when reading libpcap files
with a major version of 2 and a minor version of 2, and when capturing
from an "loN" device on AIX.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7361 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'pcap-util.c')
-rw-r--r-- | pcap-util.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/pcap-util.c b/pcap-util.c index 4f44078060..655301d23b 100644 --- a/pcap-util.c +++ b/pcap-util.c @@ -1,7 +1,7 @@ /* pcap-util.c * Utility routines for packet capture * - * $Id: pcap-util.c,v 1.10 2002/08/28 21:00:40 jmayer Exp $ + * $Id: pcap-util.c,v 1.11 2003/03/25 06:04:51 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -100,6 +100,8 @@ get_pcap_linktype(pcap_t *pch, char *devname * Token Ring 9 * FDDI 15 * + * and the ifType value for a loopback device is 24. + * * The AIX names for LAN devices begin with: * * Ethernet en @@ -107,6 +109,8 @@ get_pcap_linktype(pcap_t *pch, char *devname * Token Ring tr * FDDI fi * + * and the AIX names for loopback devices begin with "lo". + * * (The difference between "Ethernet" and "802.3" is presumably * whether packets have an Ethernet header, with a packet type, * or an 802.3 header, with a packet length, followed by an 802.2 @@ -174,6 +178,15 @@ get_pcap_linktype(pcap_t *pch, char *devname */ linktype = 10; } + } else if (strncmp(ifacename, "lo") == 0) { + if (linktype == 24) { + /* + * That's the RFC 1573 value for "software loopback" + * devices; map it to DLT_NULL, which is what's used + * for loopback devices on BSD. + */ + linktype = 0; + } } #endif |