diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-11-17 07:50:33 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-11-17 07:50:33 +0000 |
commit | 2937a86a62c8bc99f4cb024dae852d5486a243e6 (patch) | |
tree | 2799b6fe1d1e36d443a410e03185a071c330f029 /wiretap/iptrace.c | |
parent | cffca60b0345776797652aef076d2087397fb255 (diff) |
Add some comment based on some spelunking done in some capture files,
and on a comment that "libpcap"/BPF on AIX appears to return 6 as the
network type for an Ethernet device - the BSD IFT_ETHER is 6.
svn path=/trunk/; revision=1048
Diffstat (limited to 'wiretap/iptrace.c')
-rw-r--r-- | wiretap/iptrace.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c index 2bbabe5ca5..7d004458d9 100644 --- a/wiretap/iptrace.c +++ b/wiretap/iptrace.c @@ -1,6 +1,6 @@ /* iptrace.c * - * $Id: iptrace.c,v 1.15 1999/10/06 03:30:21 guy Exp $ + * $Id: iptrace.c,v 1.16 1999/11/17 07:50:33 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu> @@ -84,6 +84,10 @@ static int iptrace_read(wtap *wth, int *err) } wth->data_offset += 40; + /* + * Is this a 2-byte value, with two bytes of other information + * before it, or is it a 4-byte value? + */ packet_size = pntohs(&header[2]) - 32; /* Read the packet data */ @@ -109,6 +113,11 @@ static int iptrace_read(wtap *wth, int *err) * program to know when to use nsec or usec */ wth->phdr.ts.tv_usec = pntohl(&header[36]) / 1000; + /* + * Byte 28 of the frame header appears to be a BSD-style IFT_xxx + * value giving the type of the interface. Check out the + * <net/if_types.h> header file. + */ if_name1 = header[12]; if_name2 = header[13]; if (if_name1 == 't' && if_name2 == 'r') { |