Commit Graph

523 Commits

Author SHA1 Message Date
Guy Harris f37932ff64 Update comments to reflect some information inferred from the Sniffer
documentation.

svn path=/trunk/; revision=6605
2002-11-10 20:52:56 +00:00
Guy Harris cc293e051d It appears that 0x80 in the fs field of an ISDN packet means "network to
user", not "user to network" (SETUP messages are generally sent *to* the
network).

svn path=/trunk/; revision=6592
2002-11-09 08:07:19 +00:00
Guy Harris 70c5b343bf Attempt to handle REC_HEADER2 records in major version 2 DOS Sniffer
captures.

svn path=/trunk/; revision=6591
2002-11-09 07:31:17 +00:00
Guy Harris 8ee4a65f76 From Solomon Peachy: support for new "wlancap" 802.11 extra-information
header.

Add overflow checks to "BYTES_ARE_IN_FRAME()", and cast all arguments to
unsigned values (negative values should never be passed) to squelch
compiler warnings.

svn path=/trunk/; revision=6567
2002-11-06 21:49:34 +00:00
Guy Harris a3cbe709a0 Handle the 3 bytes of padding before the FDDI frame data in iptrace
captures.

Use #defines rather than magic numbers for various header sizes, and put
in a comment explaining the header formats.

svn path=/trunk/; revision=6545
2002-11-01 20:43:11 +00:00
Guy Harris e601f03448 Fix up the handling of WAN captures somewhat, based on looking at a
bunch of those captures.

svn path=/trunk/; revision=6536
2002-11-01 08:18:36 +00:00
Guy Harris f0a7b04a05 Convert the "maj_vers" field of a REC_VERS record to host byte order
before passing it to "skip_header_records()".

svn path=/trunk/; revision=6530
2002-11-01 01:49:39 +00:00
Guy Harris 56f644145e Discard the WTAP_ENCAP_LAPD encapsulation type in favor of a
WTAP_ENCAP_ISDN encapsulation type, which includes a pseudo-header
giving the direction (user-to-network or network-to-user) and the
channel number.

Add a new circuit type, using the ISDN channel number as the circuit ID.

Add an ISDN dissector to put the direction and channel number into the
protocol tree and to call the appropriate dissector for the payload
based on the channel (LAPD for the D channel; V.120, PPP, or data for B
channels, based on some heuristics).

svn path=/trunk/; revision=6521
2002-10-31 07:12:42 +00:00
Guy Harris f806f64b71 Some fields that are treated as 16-bit or 8-bit fields followed by
unknown bytes might actually be 32-bit fields.

The field after the upper 32 bits of the time stamp of the capture start
appears to be the speed of the network, in bits/second.

Put in a field for the rest of the file header, as a bunch of 32-bit
values (most fields are 32 bits, and all of them might be, in that
header), for use when reverse-engineering.

At least in version 002.x of NetXRay-format captures, WAN captures might
be ISDN captures; treat all WAN version 002.x captures as ISDN captures
for now, until we see some captures where that's wrong (and thus stand a
chance of figuring out where in the file header it indicates what type
of capture it is).

svn path=/trunk/; revision=6519
2002-10-29 06:12:35 +00:00
Guy Harris 671ba8b6a6 Put in a comment noting that not *all* captures with a network type of 3
look like Ethernet captures.

svn path=/trunk/; revision=6474
2002-10-22 18:48:15 +00:00
Guy Harris 2a54cd2a76 Add a Wiretap encapsulation type for RFC 2625 IP-over-Fibre Channel, and
map libpcap's DLT_IP_OVER_FC to it.

svn path=/trunk/; revision=6473
2002-10-22 09:11:13 +00:00
Guy Harris d54e50d6a2 From Jason House: include <winsock2.h> early in "wtap-int.h" on Win32
builds with zlib - "zlib.h", alas, includes <winsock.h>, and you can't
include <winsock.h> before including <winsock2.h> (at least you can
include <winsock2.h> before including <winsock.h>; thank heaven for
small favors).

svn path=/trunk/; revision=6427
2002-10-15 05:38:01 +00:00
Guy Harris c0baecc0bb "tm_isdst" must be set to -1 before "mktime()" is called, so that
"mktime()" bases the DST-vs-non-DST decision on the date/time and on the
current time zone.

svn path=/trunk/; revision=6406
2002-10-10 21:47:12 +00:00
Jörg Mayer 110f9caebc Support for both old and brand new libtool versions
svn path=/trunk/; revision=6389
2002-10-09 22:58:53 +00:00
Jörg Mayer 6c895e2d26 Change by Didier Gautheron to make automake 1.7 work.
svn path=/trunk/; revision=6372
2002-10-06 18:18:45 +00:00
Guy Harris 7a973edb96 Update some comments.
svn path=/trunk/; revision=6176
2002-09-04 19:29:59 +00:00
Olivier Abad ca3fcebd1c Update my email.
svn path=/trunk/; revision=6166
2002-09-01 14:30:34 +00:00
Jörg Mayer 64b6acac6d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6115
2002-08-28 20:30:45 +00:00
Jörg Mayer 8874c97191 Add gtk2/glib2 handling to configure. Use --enable-gtk2 to use
gtk2 instead of gtk and glib2 instead of glib.

Right now, --enable-gtk2 will fail during compile unless
acompanied by --disable-ethereal, as ethereal does not yet
support gtk2 (but does support glib2 alone).

svn path=/trunk/; revision=6107
2002-08-28 00:37:31 +00:00
Guy Harris c58356d62a Updates from Motonori Shindo.
svn path=/trunk/; revision=6000
2002-08-16 00:41:39 +00:00
Jörg Mayer e8a4485af4 Sort .cvsignore alphabetically and add libtool where missing.
svn path=/trunk/; revision=5993
2002-08-14 14:45:54 +00:00
Jörg Mayer cd5eb3cb8e Replace usage of AC_PROG_RANLIB which is deprecated for newer versions
of autoconf by AM_PROG_LIBTOOL

svn path=/trunk/; revision=5992
2002-08-14 14:42:42 +00:00
Guy Harris 77bb2477ba Get rid of the "vpi" and "vci" arguments to "atm_guess_traffic_type()",
have it get that information from the pseudo-header instead, and set the
VPI and VCI fields in the pseudo-header before calling it.

Don't call it for non-ATM NetMon captures.

svn path=/trunk/; revision=5982
2002-08-13 03:32:57 +00:00
Guy Harris 8616a33765 Use "atm_guess_traffic_type()" to guess the ATM traffic type for ATM
NetMon captures.

svn path=/trunk/; revision=5981
2002-08-13 03:26:30 +00:00
Guy Harris 1c7b05f665 Properly set the LANE traffic type.
svn path=/trunk/; revision=5967
2002-08-07 06:59:49 +00:00
Guy Harris 20557c1fb7 From Anand V. Narwani: add an entry for the DOCSIS encapsulation to the
Wiretap table of encapsuations.

svn path=/trunk/; revision=5955
2002-08-06 05:40:47 +00:00
Guy Harris dc3ea0605d Fix the declaration of "empty_line()" to match the definition.
svn path=/trunk/; revision=5954
2002-08-06 01:00:07 +00:00
Guy Harris ee623d5b73 Make the argument to "empty_line()" a "const guchar *", so we don't have
to worry about characters with the 8th bit set being sign-extended.

svn path=/trunk/; revision=5953
2002-08-06 00:59:15 +00:00
Jörg Mayer db0d014224 Use <zlib.h> instead of "zlib.h"
svn path=/trunk/; revision=5926
2002-07-31 22:52:38 +00:00
Jörg Mayer bc82e18843 Add conditional include of winsock2.h again, so compilation with MSVC++
will work again without complaints.

svn path=/trunk/; revision=5925
2002-07-31 22:41:34 +00:00
Guy Harris 5d929e0e8f From Motonori Shindo: support for reading CoSine L2 debug output.
svn path=/trunk/; revision=5922
2002-07-31 19:27:57 +00:00
Guy Harris 6e21561be8 From Joerg Mayer:
All files:
  - Replace types from sys/types.h by those from glib.h
  - Replace ntoh family of macros from netinet/in.h and winsock2.h
    by g_ntoh family from glib.h
  - Remove now unneeded includes of sys/types.h, netinet/in.h and
    winsock2.h
wtap.h
  Move includes to the top

svn path=/trunk/; revision=5909
2002-07-29 06:09:59 +00:00
Guy Harris c10a2f283d Don't allocate structures to remember how to re-access a packet's data,
or the array to hold pointers to those structures, if we're only reading
the file sequentially.

svn path=/trunk/; revision=5885
2002-07-16 09:41:32 +00:00
Guy Harris 44d19627ef From Graeme Hewson:
Allow "-" as the output file name in Wiretap, referring to the
	standard error.

	Optimize the capture loop.

Fix some of the error-message printing code in Ethereal and Tethereal.

Have Wiretap check whether it can seek on a file descriptor, and pass
the results of that test to the file-type-specific "open for output"
routine.  Have the "open for output" routines for files where we need to
seek when writing the file return an error if seeks don't work.

svn path=/trunk/; revision=5884
2002-07-16 07:15:09 +00:00
Guy Harris 6f9a78cc79 Clean up the setting of "id_offset" and "sd_offset"; this fixes a bug in
handling the first few packets in a file.

svn path=/trunk/; revision=5875
2002-07-15 09:50:02 +00:00
Guy Harris 2537158d48 Redo the way random access is handled. Save, for each packet, the
offset of the beginning of the first record containing data from that
packet, and the offset from the first byte of data in that record of the
first byte of data from that packet; to read a given packet, seek to the
offset of the first record, and keep processing packets until we find
one with the right direction.

This fixes a problem where it wasn't correctly reading the packet, when
doing random access, in cases where you have a sequence of records that
stop in the middle of a packet.

svn path=/trunk/; revision=5873
2002-07-15 08:45:32 +00:00
Guy Harris 3dc1693e97 Clarify the octet-stuffed framing code, by adding comments and by using
hex values rather than characters in a switch statement.

svn path=/trunk/; revision=5869
2002-07-14 10:59:38 +00:00
Guy Harris 8a9b35cb5e From Anand V. Narwani:
DOCSIS support, including support for "Ethernet" captures where
	    the raw frame is a DOCSIS frame rather than an Ethernet
	    frame (some Cisco cable-modem head-end gear can send out a
	    trace of all traffic on an Ethernet, but what it sends are
	    the raw bytes of DOCSIS frames, not Ethernet frames)

Get rid of second AUTHORS entry for Devin Heitmueller, merging its item
into the older entry.

Clean up the order of some lists of plugin items.

svn path=/trunk/; revision=5861
2002-07-12 22:52:43 +00:00
Guy Harris 78b3b038e1 From Nix:
Don't add "-I/usr/include" to CFLAGS or CPPFLAGS; GCC 3.1 warns
	about it, and it's not necessary.

	Expand the plugin directory path used for installation at
	installation time, rather than configuration time, so the user
	can reset "prefix" at installation time.

svn path=/trunk/; revision=5828
2002-07-06 20:40:50 +00:00
Guy Harris 9745ed6988 From Markus Steinmann: support for writing LANalyzer files.
svn path=/trunk/; revision=5771
2002-06-27 22:46:48 +00:00
Guy Harris 73ef5a2753 WinPcap 2.3's <pcap.h> includes <packet32.h>, and WinPcap 2.3's
<packet32.h> includes <winsock2.h>; we include that rather than
<winsock.h>, to avoid errors due to conflicting declarations in
<winsock.h> and <winsock2.h>.

svn path=/trunk/; revision=5742
2002-06-23 10:32:36 +00:00
Guy Harris 5e42823dc0 Move the entries to map between platform-dependent libpcap link-layer
types and Wiretap encapsulations after the entries to map between
platform-independent libpcap link-layer types and those Wiretap
encapsulations, so that, when writing a libpcap-format file, we choose
the platform-independent link-layer types.

svn path=/trunk/; revision=5668
2002-06-13 11:03:23 +00:00
Guy Harris 63ae5638e1 Add /I$(PCAP_DIR)/include to the list of directories in which to look
for header files, so that we find "pcap.h".

svn path=/trunk/; revision=5667
2002-06-13 10:39:29 +00:00
Guy Harris 5c93900204 Export the new wtap_process_pcap_packet routine.
svn path=/trunk/; revision=5662
2002-06-13 06:50:41 +00:00
Gilbert Ramirez 87e011637c Add #define HAVE_PCAP_H 1 to config.h.win32.
In libpcap.c, move wtap_pcap_encap_to_wtap_encap before libpcap_open
so that if HAVE_PCAP_H is not true, the file will still compile.

svn path=/trunk/; revision=5660
2002-06-10 15:45:30 +00:00
Guy Harris c2b438ddfa Add a Wiretap routine to process packets captured via libpcap, possibly
extracting a pseudo-header, for the use of SunATM captures.

Add support for SunATM capture.

svn path=/trunk/; revision=5652
2002-06-07 21:11:24 +00:00
Guy Harris 1b72ef68e6 Add a new error for attempts to open a pipe or FIFO for random access.
Have "wtap_open_offline()", if asked to open a FIFO, return that error
if it was asked to open the file for random access.

svn path=/trunk/; revision=5643
2002-06-07 07:47:58 +00:00
Guy Harris 2aad75bb82 Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't set
the internal z_err value for the stream if an "fseek()" call it makes
fails, so that if "gzerror()" is subsequently called, it returns Z_OK
rather than an error.

To work around this, we pass "file_seek()" an "int *err", and have the
with-zlib version of "file_seek()" check, if "gzseek()" fails, whether
the return value of "file_error()" is 0 and, if so, have it return
"errno" instead.

svn path=/trunk/; revision=5642
2002-06-07 07:27:35 +00:00
Guy Harris 199aaacbb7 BSD/OS Frame Relay packets just begin with the Frame Relay header, so
they are, in fact, WTAP_ENCAP_FRELAY.  Support 11 as WTAP_ENCAP_FRELAY
if DLT_FR is defined and is equal to 11, and support 107 as
WTAP_ENCAP_FRELAY unconditionally.

Get rid of a comment indicating that 105 isn't used - it's been
supported as DLT_IEEE802_11 for a while.

svn path=/trunk/; revision=5640
2002-06-07 04:48:36 +00:00
Guy Harris 7acc6a8e1a Use "phtons()", not "htons()", just as we use "pntohs()" rather than
"ntohs()".

svn path=/trunk/; revision=5636
2002-06-06 18:58:12 +00:00