Commit Graph

1546 Commits

Author SHA1 Message Date
Guy Harris 9f458a52fc Always declare, and define, "file_seek()" to return a "long", as it's
supposed to look like "ftell()".

If you don't have zlib, just define "file_seek" as an alias for "fseek",
rather than defining it as a routine.

svn path=/trunk/; revision=1571
2000-01-26 19:22:04 +00:00
Uwe Girlich 0c64bc4400 Corrected a SEGFAULT in v2 readdir reply, v3 readdir reply, and v3 readdirplus
reply. It came in with the new dissect_rpc_string() with gives the string
back.

svn path=/trunk/; revision=1570
2000-01-26 09:52:42 +00:00
Olivier Abad 744ab22245 Add a debian subdirectory and the files needed to generate a debian package.
The files were created by Frederic Peters <fpeters@debian.org>, the maintainer
of the ethereal debian package.
I just modified `rules' to use autogen.sh when building from a CVS tree.
Building a debian package is now very easy :
- in debian/changelog : change the version number (and replace my name with
                        yours)
- dpkg-buildpackage -rfakeroot -us -uc

svn path=/trunk/; revision=1569
2000-01-26 07:00:26 +00:00
Guy Harris 408eddc7e7 Initialize per-dissection data structures before doing a capture, as
well as before reading a capture file - if the user didn't specify that
the capture should be saved to a file, it'll be dissected as it arrives.

svn path=/trunk/; revision=1568
2000-01-26 05:30:02 +00:00
Guy Harris 01e6fa1a24 In "dissect_clnp()", fill in "clnp" before looking at it.
svn path=/trunk/; revision=1567
2000-01-26 05:04:29 +00:00
Guy Harris 32ab13f9ed In Win32, treat both '/' and '\' as pathname separators.
svn path=/trunk/; revision=1566
2000-01-26 04:56:14 +00:00
Gilbert Ramirez b3ff562157 Credit fix, and fix for building editcap.1 with build dir != $(srcdir)
svn path=/trunk/; revision=1564
2000-01-26 03:42:28 +00:00
Guy Harris cded07171f Itojun did part of the BSD zlib fix.
svn path=/trunk/; revision=1563
2000-01-26 02:35:54 +00:00
Gilbert Ramirez 85a79e34eb Move version to 0.8.2, add Win32 to list of platforms in README.
svn path=/trunk/; revision=1562
2000-01-26 02:31:35 +00:00
Gilbert Ramirez 8897888b04 Fix the File|Open menu problem for builds w/o pcap (aka, win32 builds).
svn path=/trunk/; revision=1561
2000-01-25 17:57:31 +00:00
Gilbert Ramirez b8e2c9ece2 Add O_BINARY flag to open() for win32.
svn path=/trunk/; revision=1560
2000-01-25 17:51:11 +00:00
Gilbert Ramirez 55b37ca14d Add an include of "../menu.h" to fix a win32 build break.
svn path=/trunk/; revision=1559
2000-01-25 17:32:52 +00:00
Gilbert Ramirez 2d2505d558 Enable File|Open menu item when Ethereal is started with no "-r" option.
svn path=/trunk/; revision=1558
2000-01-25 13:44:39 +00:00
Gilbert Ramirez 479dd21121 Added additional manpages and binaries to RPM package. I don't
know if my changes work, or if anyone actually uses the spec file.

svn path=/trunk/; revision=1557
2000-01-25 11:14:48 +00:00
Jun-ichiro itojun Hagino f95500d623 parse multiple COMMUNITIES value.
svn path=/trunk/; revision=1556
2000-01-25 09:24:42 +00:00
Guy Harris d1aac3e35f Provide a "get_dirname()" routine, that takes a pathname and returns
either a pointer to the directory part of the pathname (after stomping
on the pathname separator with a '\0', so don't use this on pathnames
you plan to use afterwards), or NULL if the pathname contains no
directory part, and make it handle Win32 pathnames on Win32 systems.

Use it to get the containing directory of the currently open file, so
that the "chdir()" stuff we do to cause the "File:Open" dialog box to
show you files in the directory in which you last looked works on Win32
systems.

svn path=/trunk/; revision=1555
2000-01-25 05:48:47 +00:00
Guy Harris f71823a907 "gztell()" is also affected by the libz mess on platforms where "off_t"
is bigger than a "long"; this is itojun's fix for that, turning
"file_tell()" into a wrapper function in "file_wrappers.c", just like
"file_seek()".

svn path=/trunk/; revision=1554
2000-01-25 04:49:55 +00:00
Guy Harris 8192b89967 Use "get_basename()" rather than finding the last component of "argv[0]"
by hand.

svn path=/trunk/; revision=1553
2000-01-25 04:44:33 +00:00
Guy Harris 8e68faf22f Encapsulate the code to take a pointer to a pathname and return a
pointer to the name of the file to which it refers (i.e., to the last
component of the pathname) in a "get_basename()" routine, and have the
code in "file.c" call it.

svn path=/trunk/; revision=1552
2000-01-25 04:31:17 +00:00
Gerald Combs b7a9eca9ba If we open a file, and immediately try to open another file while the first
one is loading, we dump core.  Add the "Open..." menu item to the list of
items that we disable while a file is loading.

svn path=/trunk/; revision=1551
2000-01-25 03:48:16 +00:00
Gerald Combs ce6ccdeb1e Try to work around the undraw_cursor() bug in GTK+ 1.2.3 - 1.2.6. Setting
the text widget scroll bar adjustment to 0.0 appears to fix things (on my
system, at least).

svn path=/trunk/; revision=1550
2000-01-25 03:45:45 +00:00
Guy Harris ddbd2ee9ac Update with URLs for the Win32 port on both sides of the Atlantic, and
with notes about possible problems with the latest version.

svn path=/trunk/; revision=1549
2000-01-25 02:11:30 +00:00
Guy Harris 49feff26fb "If there aren't any packets to select" means "if there aren't any
packets displayed", not just "if there aren't any packets" - there may
be packets but no displayed packets if the display filter didn't find
any packets.

NULL out the pointers to the first and last displayed packet when
closing a capture file.

svn path=/trunk/; revision=1548
2000-01-25 01:05:06 +00:00
Guy Harris 4bd85b6d7e If there aren't any packets to select, don't try to select the first
packet; "select_packet()" gets peeved because it can't find the packet,
and panics.

svn path=/trunk/; revision=1547
2000-01-25 00:36:35 +00:00
Guy Harris 184bc12e7e Add support for Cisco ISL.
svn path=/trunk/; revision=1546
2000-01-25 00:18:26 +00:00
Guy Harris 59fcaf5c03 On Win32, when splitting file names into directory and last component,
search for '\' rather than '/'.

svn path=/trunk/; revision=1545
2000-01-25 00:17:01 +00:00
Guy Harris de51ae65a6 The CRC is at the end of the frame, not at the end of the captured data
in the frame.

svn path=/trunk/; revision=1544
2000-01-24 21:56:24 +00:00
Guy Harris a9ef5b8979 Add the CRC of the encapsulated frame to the ISL dissection.
Fix an error in the handling of non-Ethernet, non-Token Ring frames.

svn path=/trunk/; revision=1543
2000-01-24 21:49:39 +00:00
Gilbert Ramirez c11ba26785 Set a fixed-width font for win32.
svn path=/trunk/; revision=1542
2000-01-24 20:29:07 +00:00
Guy Harris def30cb94f Open files with "rb" rather than "r" - this may fix up the problems
Gilbert alluded to with reading capture files on Win32 systems.

svn path=/trunk/; revision=1541
2000-01-24 19:32:13 +00:00
Guy Harris 197cfc585e Ethereal shouldn't use "file_seek()", "file_read()", or "file_write()"
directly; it should use them through Wiretap.  (Arguably, it shouldn't
use "file_open()", "file_dopen()", or "file_close()" directly, and
should use those through Wiretap as well.)

svn path=/trunk/; revision=1540
2000-01-24 19:27:38 +00:00
Guy Harris c245d4ffd5 Add an INFO column with the VLAN ID.
Get the frame type, and call the next dissector, regardless of whether
we're building a protocol tree or not.

svn path=/trunk/; revision=1539
2000-01-24 19:26:09 +00:00
Gilbert Ramirez 46df25f532 Added the O_BINARY flag to open() for win32.
Ethereal on win32 now correctly reads trace files.

svn path=/trunk/; revision=1538
2000-01-24 19:16:39 +00:00
Guy Harris c38ed66e9c Add support for Cisco ISL.
svn path=/trunk/; revision=1537
2000-01-24 18:46:45 +00:00
Guy Harris 2727167b2d Make the Tethereal usage message reflect whether libpcap support was
compiled in or not.

svn path=/trunk/; revision=1536
2000-01-24 05:13:45 +00:00
Guy Harris a6c861577f Add spaces to the usage message, to match what was done to the Tethereal
usage message.

svn path=/trunk/; revision=1535
2000-01-24 05:06:39 +00:00
Guy Harris 6253a38e97 Keep the sample command line in the usage message within 80 characters.
svn path=/trunk/; revision=1534
2000-01-24 04:53:54 +00:00
Guy Harris 0c7e180da6 Include the "-D" flag in the usage message.
svn path=/trunk/; revision=1533
2000-01-24 04:49:45 +00:00
Guy Harris f393a19883 Heikki Vatiainen's patch to add a flag to control whether to interpret
the IPv4 TOS field as a TOS field or as a DiffServ field, and allow that
field to be controlled by a command-line option or an option in the
"Display:Options" dialog box.

svn path=/trunk/; revision=1532
2000-01-24 04:44:58 +00:00
Guy Harris 930d95c0b0 Fix a bunch of dissectors to use "pi.captured_len" rather than
"fd->cap_len" for the frame length - or to use macros such as
"BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which
use "pi.captured_len" - so that they correctly handle frames where the
actual data length of the packet is less than the size of the raw frame,
e.g. with encapsulations such as ISL.

svn path=/trunk/; revision=1531
2000-01-24 03:51:35 +00:00
Guy Harris f2246ebb65 Fix a bunch of dissectors to use "pi.captured_len" rather than
"fd->cap_len" for the frame length - or to use macros such as
"BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which
use "pi.captured_len" - so that they correctly handle frames where the
actual data length of the packet is less than the size of the raw frame,
e.g. with encapsulations such as ISL.

svn path=/trunk/; revision=1530
2000-01-24 03:33:35 +00:00
Guy Harris 9d4c965c81 Add some new SAP values from
http://www.optimized.com/COMPENDI/REF-SAP.htm

svn path=/trunk/; revision=1529
2000-01-24 02:44:52 +00:00
Guy Harris 05b04d0a42 xDLC frames other than I and UI frames may have a payload, e.g. TEST
frames; rename "XDLC_HAS_PAYLOAD()" to "XDLC_IS_INFORMATION()", and if
the frame isn't an "information" frame, dissect its payload (if any) as
data.

svn path=/trunk/; revision=1528
2000-01-24 02:05:39 +00:00
Guy Harris e55dac5888 Put the PID of SNAP frames into the protocol tree regardless of whether
the frame has a payload or not.

Note in a comment that in one capture there's a U frame with a function
of TEST, rather than UI, that appears to have a payload.

svn path=/trunk/; revision=1527
2000-01-24 01:45:12 +00:00
Guy Harris 6ba70926af When computing the total frame length of an 802.3 frame, add to the
value in the length field not only the Ethernet MAC header size, but
also the offset in the frame of the Ethernet MAC header, so that, if the
802.3 frame is encapsulated in some other type of frame, the total frame
length includes the header for that frame as well.

svn path=/trunk/; revision=1526
2000-01-24 01:15:37 +00:00
Guy Harris 2461d79698 In "dissect_eth()", update "pi.len" and "pi.captured_len" regardless of
whether we're building a protocol tree or not.

Make "dissect_eth()" use "BYTES_ARE_IN_FRAME()" to see if we have a full
Ethernet header - it can be called with a non-zero offset, if Ethernet
frames are encapsulated inside other frames (e.g., ATM LANE).

Make capture routines take an "offset" argument if the corresponding
dissect routine takes one (for symmetry, and for Cisco ISL or any other
protocol that encapsulates Ethernet or Token-Ring frames inside other
frames).

Pass the frame lengths to capture routines via the "pi" structure,
rather than as an in-line argument, so that they can macros such as
"BYTES_ARE_IN_FRAME()" the way the corresponding dissect routines do.

Make capture routines update "pi.len" and "pi.captured_len" the same way
the corresponding diseect routines do, if the capture routines then call
other capture routines.

Make "capture_vlan()" count as "other" frames that are too short, the
way other capture routines do.

svn path=/trunk/; revision=1525
2000-01-23 08:55:37 +00:00
Gerald Combs 42d68156a9 Merge Paul Ionescu's CDP fixes with Guy's. Add #defines to oui.h for Cisco
IOS 9.0 and bridged frame relay and update packet-llc.c accordingly.  Add
CDP handler to capture_llc() in packet-llc.c.

svn path=/trunk/; revision=1524
2000-01-22 21:49:50 +00:00
Guy Harris 287efcbbe7 Allow "-w" and/or "-R" to be specified either when doing a live capture
or when reading a saved capture file; if "-w" is specified, the packets
captured or read from the file are written to the specified file rather
than being dissected and printed, and if "-R" is specified, only packets
that pass the specified read filter are dissected and printed or
written.

svn path=/trunk/; revision=1523
2000-01-22 07:19:34 +00:00
Guy Harris 3e067b812c Fix files that had Gilbert's old e-mail address or that didn't have my
forwarding e-mail address.

svn path=/trunk/; revision=1522
2000-01-22 06:22:44 +00:00
Guy Harris 167999e61e Give "dissect_rpc_string()" an extra "char **" argument; if it's
non-null, it returns through that argument a pointer to the displayed
version of the string, otherwise it just frees that string.

Use that to put, in the tree item for READDIR and READDIRPLUS reply
directory entry items, the file name from the directory entry.

svn path=/trunk/; revision=1521
2000-01-22 05:49:08 +00:00