Commit Graph

2947 Commits

Author SHA1 Message Date
Guy Harris 52bf014948 Tvbuffify the RSVP dissector.
Display the message checksum, and check it if possible.

Fix some IPv6 entries to be 16 bytes long, not 4 bytes long.

Make the routine to fetch an IEEE floating point number and turn it into
a "long" take a tvbuff pointer and offset rather than a pointer to data.

svn path=/trunk/; revision=2987
2001-02-04 08:21:35 +00:00
Gerald Combs ebba9ea2d0 As pointed out by Aaron C. Springer (and according to RFC 1827), it's
"Encapsulating Security Payload," and not "Encapsulated Security Payload."

svn path=/trunk/; revision=2986
2001-02-03 20:08:04 +00:00
Guy Harris 0d6e9f2533 Tvbuffify the Oracle TNS dissector.
svn path=/trunk/; revision=2985
2001-02-03 08:21:47 +00:00
Guy Harris 93eea18379 Use "pinfo", not "pi", to get packet info.
svn path=/trunk/; revision=2984
2001-02-03 08:07:04 +00:00
Guy Harris 64af6d155c Tvbuffify the IRC dissector.
svn path=/trunk/; revision=2983
2001-02-03 07:58:27 +00:00
Guy Harris c1e36ebccc Use "dfilter_apply_edt()" rather than "dfilter_apply()".
svn path=/trunk/; revision=2982
2001-02-03 06:25:17 +00:00
Guy Harris cacd37893a Increment the line number for every line seen.
Fix the handling of one error case.

svn path=/trunk/; revision=2981
2001-02-03 06:10:11 +00:00
Guy Harris 0910e8317f Allow filter names and expressions of arbitrary length, and, in the
filter files, escape quotes and backslashes so that quotes and
backslashes in filter names work.

svn path=/trunk/; revision=2980
2001-02-03 06:03:42 +00:00
Gilbert Ramirez 95e09f5ac3 Add Makefile.nmake files for new subdirs.
Add them to EXTRA_DIST in corresponding Makefile.am's so that they
get packaged with the distribution.

svn path=/trunk/; revision=2979
2001-02-02 04:03:43 +00:00
Gilbert Ramirez 9627904c2a Catch any exception thrown by accessing the tvbuff.
svn path=/trunk/; revision=2978
2001-02-01 23:39:18 +00:00
Guy Harris 046863344e Fix the previous checkin to correctly handle presence tests on
protocols.

svn path=/trunk/; revision=2977
2001-02-01 22:40:49 +00:00
Guy Harris c4f0b539d7 For protocols, call the test for the field being present "has this
protocol" rather than "is present".

svn path=/trunk/; revision=2976
2001-02-01 22:33:58 +00:00
Guy Harris bf4d3052e8 Use the pretty name for the type, not the internal name, in the help
dialog for display filter fields.

svn path=/trunk/; revision=2975
2001-02-01 22:28:58 +00:00
Guy Harris e7d46da0dd Use the ftype routines to determine what tests can be done on a field,
and whether you can slice a field.

svn path=/trunk/; revision=2974
2001-02-01 22:21:30 +00:00
Guy Harris baee1df878 FT_PROTOCOL is like FT_NONE; you can only test for the field's presence
(XXX or absence - we should offer that choice in the dialog).

svn path=/trunk/; revision=2973
2001-02-01 22:01:42 +00:00
Guy Harris ebf6ae7cf6 Make some pointers "guchar" pointers, so that characters extracted from
strings are unsigned, so that we can hand them to "isXXX()" macros
without GCC warning us that an array subscript is "char" (as in "if this
is a character with the 8th bit set, you may not get the answer you
think you should from 'isXXX()'").

svn path=/trunk/; revision=2972
2001-02-01 21:52:16 +00:00
Guy Harris c3ad47d04c Declare "proto_tree_set_protocol_tvb()" at the top, along with the other
"proto_tree_set_XXX_tvb()" routines.

svn path=/trunk/; revision=2971
2001-02-01 21:48:02 +00:00
Guy Harris d12fb1f952 Rename the "optarg()" and "opterr()" functions to "get_optarg()" and
"get_opterr()" so they don't collide with "getopt()"s "optarg" and
"opterr" globals (Solaris 2.6's <stdio.h> declares both "optarg" and
"opterr", causing "lemon.c" not to compile).

Define "safe_isXXX()" macros to call "isXXX()" after casting the
argument to "unsigned char" to handle characters with the 8th bit set.
Make some "int" variables used only to hold characters "char" instead.

svn path=/trunk/; revision=2970
2001-02-01 21:46:48 +00:00
Gilbert Ramirez c3d01c2f3f Always show the scrollbar in the tree view panel, so that the scrollbar
doesn't appearn and disappear depending on the size of the proto tree
in relation to the view window. I didn't like the horizontal jumps that
the proto tree had to do when the scrollbar either disappeared or
appeared.

svn path=/trunk/; revision=2969
2001-02-01 20:36:01 +00:00
Gilbert Ramirez 96e0398fc6 Grumble, grumble. I forgot to add the license comment at the top
of these files.

svn path=/trunk/; revision=2968
2001-02-01 20:31:21 +00:00
Gilbert Ramirez 8f1fff2e6a Create a more modular type system for the FT_* types. Put them
into epan/ftypes.

Re-write display filter routines using Lemon parser instead of yacc.
Besides using a different tool, the new grammar is much simpler, while
the display filter engine itself is more powerful and more easily extended.

Add dftest executable, to test display filter "bytecode" generation.
Add option to "configure" to build dftest or randpkt, both of which are not
built by default.

Implement Ed Warnicke's ideas about dranges in the new display filter and
ftype code.

Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered
as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree,
while FT_PROTOCOL is used for protocols. This was necessary for being
able to make byte slices (ranges) out of protocols, like "frame[0:3]"

Win32 Makefile.nmake's will be added tonight.

svn path=/trunk/; revision=2967
2001-02-01 20:21:25 +00:00
Guy Harris 07a925ef8b Updates from Alexandre P. Ferreira.
svn path=/trunk/; revision=2966
2001-02-01 19:59:40 +00:00
Guy Harris 8b51643203 "Decode As" dialog, from David Hampton.
svn path=/trunk/; revision=2965
2001-02-01 07:34:33 +00:00
Guy Harris 562eae009f Updates from Johan Jorgensen:
Correct number of addresses shown in dataframes.
	Duration ID changed to "Association ID" in power-save polls
	Added sequence and fragment numbers.
	Corrected representation of frame-control flags.
	Added dissection of data frames with piggybacked CF-Ack, Poll but no
	data.
	Cleaned up code a bit (mostly empty lines)...

svn path=/trunk/; revision=2964
2001-02-01 06:20:25 +00:00
Gilbert Ramirez 95c0b516c1 Correct a comment.
svn path=/trunk/; revision=2963
2001-01-31 05:52:24 +00:00
Guy Harris bffa9e3075 The plugin mechanism no longer uses display filters, so "plugins.h" no
longer needs to include "dfilter.h".

svn path=/trunk/; revision=2962
2001-01-31 05:41:57 +00:00
Guy Harris a267b11066 Work around a CMU SNMP bug wherein "sprint_value()" dumps core if there
are no entries in any of the MIBs for any of the components of the
variable's OID.

svn path=/trunk/; revision=2961
2001-01-30 07:16:28 +00:00
Guy Harris 6b69c22f88 WTLS support and WSP fixes, from Alexandre P. Ferreira.
svn path=/trunk/; revision=2960
2001-01-30 05:54:19 +00:00
Gerald Combs 59dda02da5 Slightly better invalid packet handling.
svn path=/trunk/; revision=2959
2001-01-30 02:38:33 +00:00
Gerald Combs ad07bc1b53 Fix a bounds checking problem when handed an invalid SIP packet, as
discovered by Ruud Linders <ruud@lucent.com>.

svn path=/trunk/; revision=2958
2001-01-30 02:22:23 +00:00
Guy Harris 418d1cd9f8 SNMPv2u support.
svn path=/trunk/; revision=2957
2001-01-30 02:13:43 +00:00
Richard Sharpe 82d18e3d1a Added a new error code I just found ... no such share.
svn path=/trunk/; revision=2956
2001-01-29 08:14:42 +00:00
Guy Harris defc02babb There's no need for a member of a "capture_file" structure holding a
compiled capture filter program, so remove it, and remove the include of
<pcap.h> from "file.h"; instead, have local "struct bpf_program"
structures where needed, and have those files that need stuff from
<pcap.h> include it.

This cleans stuff up a bit, and should eliminate a pile of compile
warnings with Visual C++ due to <pcap.h> and some GTK+/GLib header file
(or files they include) both defining "inline".

svn path=/trunk/; revision=2955
2001-01-29 00:09:38 +00:00
Guy Harris 00fcdc0900 There's no need for a member of a "capture_file" structure holding a
compiled capture filter program, so remove it, and remove the include of
<pcap.h> from "file.h"; instead, have local "struct bpf_program"
structures where needed, and have those files that need stuff from
<pcap.h> include it.

This cleans stuff up a bit, and should eliminate a pile of compile
warnings with Visual C++ due to <pcap.h> and some GTK+/GLib header file
(or files they include) both defining "inline".

svn path=/trunk/; revision=2954
2001-01-28 23:56:29 +00:00
Guy Harris 22a76b4ca6 Include <direct.h>, if we have it, to declare "mkdir()" on Windows.
svn path=/trunk/; revision=2953
2001-01-28 22:28:31 +00:00
Guy Harris 5999b61fdd Use "Close", rather than "Cancel", in the filter dialog box; clicking
that button doesn't undo edits you've made to the list of filters it's
displaying.

Don't show an "OK" button if the dialog isn't attached to a text entry
box, as the "OK" button means "enter the current filter into the
attached text entry box, and close the dialog", and if there *is* no
attached text entry box, "OK" doesn't do what you might expect (it's
equivalent to "Close").

svn path=/trunk/; revision=2952
2001-01-28 21:30:53 +00:00
Guy Harris 6d30354129 Get rid of support for old-style plugins (support for old-style plugins
requires that the dfilter code be initialized before the plugins are
added; this required us to *re*-initialize the dfilter code after
reading in all the plugins, as the plugins may themselves have added new
filterable fields - that was a bit of a mess), and make the
"Tools->Plugins" dialog box show the new-style plugins.

svn path=/trunk/; revision=2951
2001-01-28 21:22:54 +00:00
Guy Harris cc74cc0a5f Get rid of support for old-style plugins (support for old-style plugins
requires that the dfilter code be initialized before the plugins are
added; this required us to *re*-initialize the dfilter code after
reading in all the plugins, as the plugins may themselves have added new
filterable fields - that was a bit of a mess), and make the
"Tools->Plugins" dialog box show the new-style plugins.

svn path=/trunk/; revision=2950
2001-01-28 21:17:29 +00:00
Guy Harris 7eaadf4048 Add "col_clear()" to the list of functions in the transfer vector for
plugins, as the MGCP dissector uses it.

Don't set pointers to "dfilter_init()" and "dfilter_cleanup()" in that
transfer vector, as there *aren't* any pointers to them in the transfer
vector.

svn path=/trunk/; revision=2949
2001-01-28 20:26:20 +00:00
Guy Harris ceef26d2c1 Have separate capture and display filter lists; some filter dialog boxes
use the capture filter lists, and others use the display filter list, as
appropriate.

Have separate menu items for editing the capture and display filter
lists.

Have separate "~/.ethereal/cfilters" and "~/.ethereal/dfilters" files
for the two lists; if either of those files isn't found, we try
"~/.ethereal/filters", which means that you will start out with two
identical lists holding all your filters - if certain filters belong
only in one list, you'll have to delete them by hand from the other
list.

Do I/O error checking when reading and writing filter lists; when
writing a filter list, write it to a new file, and then rename the new
file on top of the old file, so that you don't lose your old filter list
if, for example, you run out of disk space or disk quota.

svn path=/trunk/; revision=2948
2001-01-28 09:13:10 +00:00
Guy Harris 3c596f5d71 Call "get_filter_list()" when Ethereal starts up.
Have it free up any list of filters we already have before reading in
new filters.

svn path=/trunk/; revision=2947
2001-01-28 04:52:29 +00:00
Guy Harris c8639c08ee Pull the stuff to read and write the list of filter expressions up into
a file in the top-level directory.

svn path=/trunk/; revision=2946
2001-01-28 04:43:26 +00:00
Guy Harris 7fc0d00b8a Fix up the indentation, to make it correct, and to keep the code from
running quite as far to the right.

svn path=/trunk/; revision=2945
2001-01-28 04:26:53 +00:00
Guy Harris cf107222a5 Make a bunch of routines not used outside of "packet-wsp.c" static.
svn path=/trunk/; revision=2944
2001-01-28 04:21:59 +00:00
Guy Harris b2ae96ed4d Allow dissectors of ONC RPC-based protocols to register themselves
either with a table of old-style dissectors or a table of tvbuffified
dissectors, and have the RPC dissector pass the appropriate arguments to
the dissectors.

Finish tvbuffifying the NLM dissector, getting rid of the last traces of
old-style dissector code.

In those routines in the NFS dissector that take new-style arguments
(because they're called from the NLM dissector), make them take an
offset as an argument, so they don't assume that they're handed a tvbuff
starting at the stuff they're supposed to dissect, and make the versions
that take old-style arguments construct a tvbuff and call the versions
that take new-style arguments.  Do the latter with the routines in
"packet-rpc.c" as well.

svn path=/trunk/; revision=2943
2001-01-28 03:39:48 +00:00
Guy Harris 67fb533233 "autoheader" recognizes AC_CHECK_HEADERS as a macro that defines
HAVE_XXX_H if xxx.h is present, but doesn't recognize AC_CHECK_HEADER as
such, and thus doesn't put anything about HAVE_XXX_H into "config.h.in",
and thus HAVE_XXX_H doesn't get defined even if xxx.h is present.

svn path=/trunk/; revision=2942
2001-01-27 23:47:16 +00:00
Guy Harris 2865386fe4 HCLNFSD support, from Mike Frisch.
svn path=/trunk/; revision=2941
2001-01-27 20:33:01 +00:00
Guy Harris e7ea7a34e9 Clean up the dissector registration up a bit - arrange that all plugins
be loaded and their initialization routines called in right after we
call the initialization routines for built-in dissectors, but don't call
their handoff registration routines yet, and then call the handoff
registration routines right after calling the handoff registration
routines for built-in dissectors.

Do all that in "proto_init()", rather than "epan_init()".

That way, we call all dissector registration routines together, and then
call all dissector handoff registration routines together; all the
registration routines are called before any handoff registration
routines, as is required, and, as "proto_init()" is called by
"epan_init()" before "dfilter_init()" is called, all filterable fields
have been registered before "dfilter_init()" is called, and no plugins
have to call "dfilter_init()" themselves to get their fields registered.

Remove pointers to "dfilter_init()" and "dfilter_cleanup()" from the
plugin address table, as plugins shouldn't be calling them any more, and
remove calls to them from plugins.

svn path=/trunk/; revision=2940
2001-01-26 06:14:53 +00:00
Guy Harris f72f3b7861 Finish up support for writing NetMon 2.x capture files.
(We really need to put in some rudimentary 64-bit integer support, for
the benefit of platforms+compilers that don't support it; the
floating-point calculations we're doing now appear not to get exactly
the right answer, from an experiment at reading a NetMon 2.x file and
writing it back out as NetMon 2.x with editcap.)

svn path=/trunk/; revision=2939
2001-01-25 21:47:23 +00:00
Guy Harris 32d63ecb30 Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.

Move the setting of the Protocol column in various dissectors before
anything is fetched from the packet, and also clear the Info column at
that point in those and some other dissectors, so that if an exception
is thrown, the columns don't reflect the previous protocol.

"Tvbuffify" the Mobile IP dissector (it took old-style arguments, and
then converted them into tvbuff arguments, so there wasn't much to do,
other than to fix references to "fd" to refer to "pinfo->fd").

In the SCTP dissector, refer to the port type and source and destination
ports through "pinfo" rather than through the global "pi", as it's a
tvbuffified dissector.

In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather
than "TCP_PORT_SMTP" when checking whether the packet is a request or
reply, just in case somebody makes a non-standard port be dissected as
SMTP or Time.  (Also, remove a bogus comment from the Time dissector; it
was probably cut-and-pasted from the TFTP dissector.)

svn path=/trunk/; revision=2938
2001-01-25 06:14:14 +00:00