Commit Graph

2175 Commits

Author SHA1 Message Date
Guy Harris 6a4a59ea1e Make "ip_checksum()" take just pointer and length arguments, and make
"ip_checksum_shouldbe()" compute the correct checksum given the computed
whole-packet checksum and the value of the checksum field; that scheme
can be better extended in the future to handle checksums other than the
IP header checksum, e.g. ICMP, UDP, and TCP checksums (although we'd
want a somewhat more optimized checksumming routine for that, and
perhaps have an option to control whether to do checksum checking on TCP
and UDP packets, as that could be expensive).

That requires that we remember the value of the computed checksum, not
just check it against 0; that renders "ip_checksum_state()"
uninteresting, as we can just compare the value against 0 in line.

svn path=/trunk/; revision=2210
2000-08-05 05:08:21 +00:00
Guy Harris 88f4dbf0e9 More changes from Peter Kjellerstedt.
svn path=/trunk/; revision=2209
2000-08-05 00:55:55 +00:00
Guy Harris 9dee6d52ed ICQ improvements from Peter Kjellerstedt.
svn path=/trunk/; revision=2208
2000-08-04 23:12:21 +00:00
Guy Harris ffc1f0a6a2 Fix to the SRVLOC dissector to correctly handle the error field of the
Service Reply (i.e., treat it as the 16-bit field that it is), from
Peter Kjellerstedt.

svn path=/trunk/; revision=2207
2000-08-04 22:56:27 +00:00
Guy Harris 1239d0e5d2 Clean up the checksumming stuff a bit:
have "ip_checksum()" compute the checksum of the IP header;

	have "ip_checksum_state()" call "ip_checksum()" and then return
	TRUE if the result is 0 and FALSE otherwise;

	have "ip_checksum_shouldbe()" save the current value of the
	checksum field in the header, set that field to 0, call
	"ip_checksum()" to get the checksum, restore the value of the
	checksum field in the header to the saved value, and then return
	what "ip_checksum()" returned;

rather than having duplicated code to compute checksums.

svn path=/trunk/; revision=2206
2000-08-04 22:43:45 +00:00
Gilbert Ramirez b20fbb9d9f Re-organize the README so that people who just want to run ethereal, not
compile it, find their info at the top of the file.

Explain the generated sources for developers, and the Unix-ish tools that
are needed.

svn path=/trunk/; revision=2205
2000-08-04 15:40:54 +00:00
Guy Harris 3d9c2b3507 Fix a number of problems, and do some checking to make sure we don't run
past the end of the frame.

svn path=/trunk/; revision=2204
2000-08-04 07:38:13 +00:00
Gilbert Ramirez afc31a3c22 Mention IDSN4BSD's i4btrace utility as a supported trace file format.
svn path=/trunk/; revision=2203
2000-08-04 05:17:18 +00:00
Gilbert Ramirez a98522712d If IP checksum is incorrect, show what correct value should be.
From "Johannes Hennecke" <Johannes.Hennecke@elsa.de>

svn path=/trunk/; revision=2202
2000-08-04 04:54:22 +00:00
Guy Harris 4793e45e75 Add some error values that, whilst they're not in the NFS V2 spec, are,
as I remember, issued by some NFS V2 servers (EXDEV, for one, can almost
certainly be issued by most V2 servers).

svn path=/trunk/; revision=2201
2000-08-03 19:27:19 +00:00
Gilbert Ramirez a3e7190456 Add a "Save As" feature to the TCP Follow dialogue, to save the stream
file to a user-specified file.

Move the file-copy routine in save_cap_file() to an indepenent
function in file.c  (copy_binary_file()) so that follow_dlg.c can use it.

Remove #include "follow.h" from the C files that don't need it.

svn path=/trunk/; revision=2200
2000-08-03 12:44:40 +00:00
Gilbert Ramirez 15a399d338 Replace calls to sprintf() with snprintf() in file_*_error_message routines,
as a long filename may overflow the buffer.

svn path=/trunk/; revision=2199
2000-08-03 12:02:15 +00:00
Gilbert Ramirez 4b09c25049 Fix typo in description of Diameter.tcp.port preference.
From Jakob Schlyter <jakob@crt.se>

svn path=/trunk/; revision=2198
2000-08-03 09:30:32 +00:00
Gilbert Ramirez 52903b26a8 Move to version 0.8.11
svn path=/trunk/; revision=2196
2000-08-03 01:54:53 +00:00
Uwe Girlich 2aff407c79 All 4 protocol versions included (as templates but not as decodings).
svn path=/trunk/; revision=2195
2000-08-02 11:36:18 +00:00
Uwe Girlich bfb39fbc44 Procedure numbers as constants are much better.
svn path=/trunk/; revision=2194
2000-08-02 11:32:31 +00:00
Gilbert Ramirez 5f3191082f Allow filtering on strings.
svn path=/trunk/; revision=2193
2000-08-01 18:10:06 +00:00
Guy Harris 2bcc0d3c13 There is a <sys/stat.h> available on Win32, and, in fact, we now include
it in "util.c", so we have to define HAVE_SYS_STAT_H in Win32.

svn path=/trunk/; revision=2192
2000-07-31 15:55:46 +00:00
Uwe Girlich 682f88aa5c Dissector now knows the actual game data communication too.
svn path=/trunk/; revision=2191
2000-07-31 12:59:51 +00:00
Guy Harris 3d20d56999 Add a routine to check whether a file is a directory or not.
To test whether a file the user selected to be opened from the file
selection box is really a directory (so that we can point the file
selection box at it, rather than trying to open the directory as a
capture file, which wouldn't work), use the routine in question.

To make the GTK+ file selection box start out in the last directory from
which we opened a file, use "gtk_file_selection_complete()", rather than
"chdir()"ing to that directory.

Those changes keep us from "chdir()"ing all over the place; that way, if
Ethereal dumps core, the core dump shows up in the directory from which
it was run, rather than in the directory from which you last opened or
into which you last saved a file.

svn path=/trunk/; revision=2190
2000-07-31 04:53:40 +00:00
Guy Harris 3b56e37043 Add a comment explaining why we're defining S_ISDIR and company.
svn path=/trunk/; revision=2189
2000-07-31 04:48:54 +00:00
Guy Harris a459c2bea7 It appears that, at least with Visual C++ 6.0, the "stat()" supplied in
the C run-time library sets "statb.st_mode" appropriately, at least for
plain files and directories; it just doesn't offer the POSIX "S_ISxxx()"
macros to test the file type.

If those macros aren't defined (which might also be the case on really
ancient UNIX systems), define them appropriately, and use them even on
Win32 systems, so that we can properly report attempts by a user to read
from a directory on Win32, just as we do on UNIX.

svn path=/trunk/; revision=2188
2000-07-31 04:19:54 +00:00
Guy Harris 0b406c38ba In "buffer.h", include <winsock.h> if we have it, so that "u_char" is
defined on Win32 systems - it's not defined in <sys/types.h> on those
systems.

In "buffer.c", include "config.h", to cause HAVE_WINSOCK_H to be
defined, on systems that have it, so that we include it in <buffer.h>.

svn path=/trunk/; revision=2187
2000-07-31 04:15:58 +00:00
Guy Harris 5fb74c28df Include "packet.h", not <packet.h> - the latter, at least on Win32,
causes a system <packet.h> header to be includes, which causes the
compiler to get quite upset.

svn path=/trunk/; revision=2186
2000-07-31 04:12:04 +00:00
Guy Harris d902b190dd Include <time.h> to declare "localtime()" and "strftime()", and use
"guint32" rather than "uint32_t" so that it'll compile on systems (e.g.,
Win32, and probably some UNIX flavors) that don't declare "uint32_t".

svn path=/trunk/; revision=2185
2000-07-31 04:09:54 +00:00
Guy Harris d8b8ee50a0 Fix it to compile on non-Linux UNIX-flavored systems and Win32 systems.
svn path=/trunk/; revision=2184
2000-07-31 04:03:31 +00:00
Guy Harris 88bc1fbf6e Include "ptvcursor.obj" in the list of object that have to be linked in.
svn path=/trunk/; revision=2183
2000-07-31 03:45:53 +00:00
Olivier Abad 00492ede72 Add missing function prototypes.
svn path=/trunk/; revision=2182
2000-07-30 16:59:07 +00:00
Olivier Abad 9348644164 Support for capturing packet data from a pipe (a FIFO, or standard input).
capture.c :
- modified capture() to try to open an interface as a pipe if pcap_open_live()
  failed, and then read data in libpcap format from this pipe ;
- add new functions used by capture() : pipe_open_live() and pipe_dispatch()
  which are equivalents to the pcap_ functions.

libpcap.[ch] :
- moved the MAGIC and headers definitions from libpcap.c to libpcap.h
  because capture() now needs it.

svn path=/trunk/; revision=2181
2000-07-30 16:54:12 +00:00
Richard Sharpe 3d80db01df A small change to SMB dissector so it lists near the other SMB-related
dissectors when you do 'ethereal -G' ...

svn path=/trunk/; revision=2180
2000-07-30 14:35:39 +00:00
Guy Harris 9fb66f8e93 Update and add ".cvsignore" files to reduce the level of noise from CVS.
svn path=/trunk/; revision=2179
2000-07-30 08:32:54 +00:00
Guy Harris 0aa7bec73d In TCP segments with RST and data, display the data as text, labeling it
as a cause for the RST, as per RFC 1122:

	4.2.2.12  RST Segment: RFC-793 Section 3.4

	  A TCP SHOULD allow a received RST segment to include data.

	  DISCUSSION
 	       It has been suggested that a RST segment could contain
 	       ASCII text that encoded and explained the cause of the
	       RST.  No standard has yet been established for such
	       data.

Thanks and a tip of the Hatlo hat to Kevin Steves of HP for mentioning
this on the tcpdump-workers list (he contributed a tcpdump patch to do
the same).

svn path=/trunk/; revision=2178
2000-07-30 08:20:52 +00:00
Guy Harris f900856343 "rd_match_strval()" just does what "val_to_str()" does with a format
argument of "Undefined(%d)"; just use "val_to_str()" (and use "%u"
rather than "%d", as the value passed to it is unsigned).

svn path=/trunk/; revision=2177
2000-07-30 08:11:46 +00:00
Guy Harris 888b5a1cdb David Frascone's DIAMETER dissector.
svn path=/trunk/; revision=2176
2000-07-30 07:16:11 +00:00
Guy Harris 838b254def Squelch a GCC complaint.
svn path=/trunk/; revision=2175
2000-07-30 06:54:03 +00:00
Richard Sharpe a194f2b07a Added changes so Edit->Filters...->Apply works as I think
it should.

Also added the two files I need to generate an sgml list of fields
that the UserGuide etc needs.

svn path=/trunk/; revision=2174
2000-07-29 03:20:51 +00:00
Gilbert Ramirez 8ceb7d40f9 Add the re-write of the NetWare Core Protocol dissector. It's mostly
a framework for the dissector; of the more than 400 NCP packet types, only
a handful are defined. But this dissector framework is much better than
the previous one.

svn path=/trunk/; revision=2173
2000-07-28 20:03:59 +00:00
Gilbert Ramirez 551a4d58fd ... and remove the old dfilter2pod.in template.
svn path=/trunk/; revision=2172
2000-07-28 16:31:18 +00:00
Gilbert Ramirez 25935e6b19 Don't create dfilter2pod from dfilter2pod.in just for @PERL_PATH@; it's
a waste of time. Instead, set $(PERL) to @PERL_PATH@ in the Makefile and
call dfilter2pod.pl via $(PERL) $(src_dir)/dfilter2pod.pl

svn path=/trunk/; revision=2171
2000-07-28 16:30:28 +00:00
Gilbert Ramirez eb633dffce For packets with GIOP versions that are not supported by the dissector,
identify the packet as GIOP, but let the user know that the version is
not supported.

svn path=/trunk/; revision=2170
2000-07-27 17:11:44 +00:00
Uwe Girlich 672efa58e2 Quake dissector packet-quake.c added.
svn path=/trunk/; revision=2169
2000-07-27 11:00:48 +00:00
Uwe Girlich 415c41b251 A Quake dissector. It can only dissect Quake 1 packets to UDP port 26000,
which are the connection establishing phase.
The actual game data are not covered yet.

svn path=/trunk/; revision=2168
2000-07-27 10:57:12 +00:00
Gilbert Ramirez 9e4260ae46 Add initial attempt at FT_NSTRING_UINT8, a string with a single byte prefix
indicating the string length. It's available only with proto_tree_add_item().

Add proto_item_get_len(), so that dissectors can find out how long
the FT_NSTRING_UINT8 turned out to be.

In proto_tree_add_item(), don't add a proto_item to the proto_tree until
*after* the attempt to pull data from the tvbuff. That way, if the tvbuff
raises an exception, an item with garbage data won't be left in the
proto_tree.

svn path=/trunk/; revision=2167
2000-07-27 06:41:59 +00:00
Gerald Combs 1cbca8fb96 Remove some "Makefile.in"s that I accidentally committed last night.
svn path=/trunk/; revision=2166
2000-07-26 14:00:41 +00:00
Guy Harris ec9f9cb687 Add a script, "aclocal-flags", which figures out where
1) aclocal expects autoconf/automake macros to be hidden;

	2) GTK+ hid its autoconf/automake macros;

and, if both places exist but aren't the same directory, returns a "-I"
flag to tell aclocal to look in GTK+'s directory.

Then have "autogen.sh", and Makefiles in directories with "acinclude.m4"
files, use that script and pass what flag it supplies, if any, to
aclocal.

This should, I hope, avoid problems such as those FreeBSD systems where
GTK+ was installed from a port or package (and thus stuck its macros in
"/usr/X11R6/share/aclocal") but aclocal doesn't look there.

(It doesn't solve the problem of somebody downloading and installing,
say, libtool from source - which means it probably shows up under
"/usr/local", with its macros in "/usr/local/share/aclocal" - on a
system that comes with aclocal (meaning it probably just looks in
"/usr/share/aclocal", but that may be best fixed by, whenever you
download a source tarball for something that's part of your OS,
configuring it to install in the standard system directories and
*overwriting* your OS's version.)

svn path=/trunk/; revision=2165
2000-07-26 08:03:57 +00:00
Guy Harris 7de3b988bd In the final scene of the horror movie, just when you think the monster
is finally dead, and you're walking away, it springs up again and
attacks.

It appears that the ss990915 version of Alexey Kuznetzov's libpcap patch
has some extra stuff in the per-packet header for some sort of SMP
debugging, and that SuSE Linux 6.3 picked it up.

Thus, even if a libpcap file has the modified magic number, we *still*
have to go through the usual heuristic hell to figure out what type of
file it is.

svn path=/trunk/; revision=2164
2000-07-26 06:04:34 +00:00
Gerald Combs dd094a8891 Actually delete the top ethereal.spec.in and packaging/solaris/* files this
time.

svn path=/trunk/; revision=2163
2000-07-26 03:46:02 +00:00
Gerald Combs 7baf3c1730 Switch Solaris package build naming to a more generic SVR4. Add RPM and SRPM
package build targets.  Move ethereal.spec(.in) to packaging/rpm.

The spec file is different from Henri's.  We might want to switch to his
for the sake of consistency.

svn path=/trunk/; revision=2162
2000-07-26 03:39:11 +00:00
Gilbert Ramirez eeade6de43 When rescanning a file, all state information for the frames has
been deleted. So we have to set fdata->flags.visited to 0 for each frame,
denoting a "fresh" scan.

svn path=/trunk/; revision=2161
2000-07-26 03:08:56 +00:00
Guy Harris f48ff36e64 Use unsigned character pointers and arrays rather than signed character
pointers and arrays in a number of places, to remove warnings some
compilers give.

svn path=/trunk/; revision=2160
2000-07-26 00:20:09 +00:00