Commit Graph

136 Commits

Author SHA1 Message Date
Guy Harris c23a824fa5 Remove the unused "offset_saved" variable, as per the changes to
"ethereal_gen.py" not to generate the line setting it.

svn path=/trunk/; revision=5409
2002-05-06 21:53:33 +00:00
Guy Harris 3355fdf0f3 Fix the declaration of pointers to "tcp_dissect_pdus()".
svn path=/trunk/; revision=5400
2002-05-05 22:30:39 +00:00
Guy Harris a6e169fc27 Put the pointer to "tcp_dissect_pdus()" in the function pointer table
where the pointer to "dissect_data()" was in 0.9.3; the pointer to
"dissect_data()" wasn't initialized in 0.9.3 (as the function wasn't
exported - you call it through a handle), so no plugin should have been
using it, and putting the pointer to "tcp_dissect_pdus()" in its place
means the structure offsets of all function pointers after it will be
the same in 0.9.3 and the next release, preserving binary compatibility
for plugins.

svn path=/trunk/; revision=5395
2002-05-05 00:34:12 +00:00
Guy Harris eb70c97a9b Make a "tcp_dissect_pdus()" with the standard loop for a TCP segment,
extracting PDUs from it and possibly doing reassembly.  Make the COPS,
DNS, DSI, Gryphon, and SCCP dissectors use it.

Add "set_actual_length()", "tcp_dissect_pdus()",
"decode_boolean_bitfield()", "decode_numeric_bitfield()", and
"decode_enumerated_bitfield()" to the list of routines available to
dissectors on platforms where routines in the main program aren't
available to dynamically-loaded code.

Declare routines in "to_str.h" as "extern"; as I remember, that's
necessary to allow the "decode_XXX_bitfield()" routines declared therein
to be made available to plugins as per the above.

Note that new exported routines should be added to the end of the table
if that's the only change being made to the table.

Create a new "plugin_api_decls.h" header file, used to declare both the
"p_" variables and the "p_" structure members in the routine-exporting
mechanism; this reduces the number of places you have to change to
change the list of exported routines.

svn path=/trunk/; revision=5394
2002-05-05 00:16:38 +00:00
Guy Harris c54e2fd1d5 Update the dissectors (by hand) to match the changes to
"ethereal_gen.py".

svn path=/trunk/; revision=5391
2002-05-04 11:03:18 +00:00
Guy Harris 09f812b7c2 Get rid of unused arguments.
svn path=/trunk/; revision=5325
2002-05-01 06:56:16 +00:00
Guy Harris 2793de4cf9 Make more use of "val_to_str()" and "decode_boolean_bitfield()".
svn path=/trunk/; revision=5324
2002-05-01 06:46:52 +00:00
Guy Harris 66bbf2411a Use the bitfield decoding routines for bitfields.
Show the value of flag fields in the top-level item for the field.

Use "%u", not "%d", to display unsigned quantities.

svn path=/trunk/; revision=5323
2002-05-01 06:15:44 +00:00
Guy Harris 573530d0e2 Add desegmentation support.
As a result of that, we now construct a tvbuff for each Gryphon message;
this obviates the need to pass a message length to the dissectors for
each message type.

svn path=/trunk/; revision=5321
2002-05-01 05:24:42 +00:00
Guy Harris a977e68fbc Mark the "plugin_address_table_t *" argument to "plugin_init()" as
unused if PLUGINS_NEED_ADDRESS_TABLE isn't defined.

Get rid of some other unused arguments.

svn path=/trunk/; revision=5312
2002-04-30 10:37:37 +00:00
Guy Harris 1c715bb383 Mark the "plugin_address_table_t *" argument to "plugin_init()" as
unused if PLUGINS_NEED_ADDRESS_TABLE isn't defined.

svn path=/trunk/; revision=5311
2002-04-30 10:36:26 +00:00
Guy Harris c8fdc30fe2 Make "dissect_data()" static - it's only called through handles.
svn path=/trunk/; revision=5096
2002-04-04 05:16:15 +00:00
Guy Harris df4072814f Fix the declaration of "addr_call_dissector" to match the function
signature of "call_dissector()".

svn path=/trunk/; revision=4828
2002-02-27 21:26:37 +00:00
Guy Harris b4971b39bf From Joerg Mayer:
In the "configure.in" files, add

		-D_U_="__attribute__((unused))"

	to CFLAGS if we're using GCC, and add

		-D_U_=""

	otherwise, so _U_ can be used to mark arguments as unused.

Add -D_U_="" arguments to the Makefile.nmake files as well, so _U_ works
with Microsoft Visual C++ as well.

Add comments and RCS IDs to the Makefile.nmake files that don't already
have them.

svn path=/trunk/; revision=4824
2002-02-27 09:42:52 +00:00
Guy Harris 7027650b5c "is_tpkt()" is always used to check a TCP segment to see if it might
have a TPKT header at the beginning, so there's not need for it to have
an offset as an argument; its callers don't have to know how big the
TPKT header is (or we can put a #define in "packet-tpkt.h" for it).  Get
rid of the second argument.

svn path=/trunk/; revision=4791
2002-02-23 02:30:16 +00:00
Guy Harris e9bc3da370 Handle TPKT packets split across segment boundaries, and multiple TPKT
packets per segment.

Instead of having a routine for dissectors such as the Q.931 dissector
to call to dissect the TPKT header, have a routine that does all the
reassembly and multiple-packets-per-segment work, and have the Q.931
dissector call it.  Export "is_tpkt()", and the new routine, to plugins.

Add preferences for TPKT and Q.931 reassembly.

svn path=/trunk/; revision=4778
2002-02-22 08:56:48 +00:00
Guy Harris 2c0ceea42f Export "conversation_set_dissector()" in the plugin API table.
svn path=/trunk/; revision=4760
2002-02-20 08:24:52 +00:00
Guy Harris bcaa0c5c58 Fix up the declaration of "addr_tvb_new_real_data" to match
"tvb_new_real_data()".

svn path=/trunk/; revision=4755
2002-02-19 01:28:43 +00:00
Guy Harris 0afa2b5aeb Routines added to the plugin table, and include-once #ifndef/#define
wrappers added to plugin header files, by Charlie Duke.

svn path=/trunk/; revision=4676
2002-02-02 03:42:18 +00:00
Guy Harris a2e6d3175a Updated GIOP plugins, from Frank Singleton.
svn path=/trunk/; revision=4631
2002-01-30 18:55:39 +00:00
Guy Harris c873f79156 Support for capturing on, and reading captures from, OpenBSD firewall
logging virtual interface, from Mike Frantzen.

svn path=/trunk/; revision=4616
2002-01-29 08:44:53 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris a45d3d3bfe Fix some problems in protocol preferences blurbs.
svn path=/trunk/; revision=4582
2002-01-20 23:25:55 +00:00
Gilbert Ramirez 0b9b02c6ea Long NCP traces can easily have many packets whose "uniqueness"
variables wrap-around. Since the request/reply packets are related via
a hash based on these uniqueness variables, long NCP traces can
have mis-matches reqeust/reply records.

Thus, only do the hash-lookup for the reply packet during the first
sequential scan of the trace file. Once the pertinent info is found,
store it in the packet's private data area.

Since the memory allocated for the hash and for the structures that make
up the keys are no longer needed after the first sequential run through
the trace file, arrange to free that memory after the first sequential
run. Similar to the register_init_routine() that allows dissectors
to register callbacks for calling *before* a capture file is loaded,
set up a register_postseq_cleanup_routine() function that allows
dissectors to register callbacks for calling *after* the first
sequential run-through of the trace file is made. This is not
a *final* cleanup callback, since Ethereal will still have that trace file
open for random-access reading.

I didn't have tethereal call postseq_cleanup_all_protocols() since
tethereal doesn't keep the trace file open for random-access reading.
I could easily be swayed to make tethereal call that function, however.

svn path=/trunk/; revision=4484
2002-01-05 04:12:17 +00:00
Guy Harris 887799e01a From Bernd Becker: don't clear COL_INFO until the GIOP subdissecrors are
fixed to put something interesting there, fix the GIOP dissector to
restore the Protocol column if no heuristic dissector succeeded, and fix
up the plugin GIOP subdissectors to use "col_set_str()" to set the
Protocol column.

svn path=/trunk/; revision=4424
2001-12-19 08:59:08 +00:00
Guy Harris ee04f7826f Now that the GIOP dissector sets "pinfo->current_proto" before calling
subdissectors, the subdissectors don't have to set it themselves.

svn path=/trunk/; revision=4417
2001-12-17 22:51:42 +00:00
Guy Harris 39362af814 From Motonori Shindo:
fix a bogus batch mode inference rule of make, so that
	"vc60.pdb" files are created in the proper directory;

	delete ".pdb" files in a "nmake -f Makefile.nmake clean";

	include the text2pcap and mergecap ".pdb" files in the Windows
	binary distribution.

svn path=/trunk/; revision=4385
2001-12-12 01:29:13 +00:00
Guy Harris fcfa433ff0 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4371
2001-12-10 01:48:27 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Guy Harris 7c0dc64096 Remove the no-longer-extant "conv_dissector_add()" from the list of
plugin APIs, and add the new "dissector_add_handle()".

Add an entry in the dissector table structure for
"create_dissector_handle".

svn path=/trunk/; revision=4314
2001-12-03 10:00:23 +00:00
Guy Harris bced8711f6 Make "dissector_add()", "dissector_delete()", and "dissector_change()"
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID.  Associate dissector handles with
dissector table entries.

svn path=/trunk/; revision=4308
2001-12-03 04:00:26 +00:00
Ed Warnicke 89babba223 This should be the final bit of removing the dissect_data symbol
from being required by anyone other than packet-data.c.
It can now be accessed with call_dissector() with the name "data".
dissect_data is now also of dissect_t.

svn path=/trunk/; revision=4271
2001-11-26 05:41:15 +00:00
Guy Harris 1f27f45a1b Finish removing the pointer to the no-longer-extant global "packet_info"
structure "pi" from the plugin API.

svn path=/trunk/; revision=4259
2001-11-24 21:55:54 +00:00
Gilbert Ramirez a07ec65cce Remove the pointer to the global packet_info from the table of
pointers used for plugins on win32.

svn path=/trunk/; revision=4247
2001-11-21 23:34:09 +00:00
Gilbert Ramirez f14a6b8b91 Hopefully the last time I have to change my e-mail address.
svn path=/trunk/; revision=4199
2001-11-13 23:55:44 +00:00
Guy Harris f0c86f5537 Include "conversation.h", as the plugin API now includes the routines to
create and find conversations.

svn path=/trunk/; revision=4155
2001-11-04 22:14:43 +00:00
Guy Harris d859325753 Additional routines made available to plugins, from Tomas Kukosa.
svn path=/trunk/; revision=4150
2001-11-04 03:37:29 +00:00
Guy Harris 8789943142 In "plugin_api_defs.h", just do
addr_XXX p_XXX;

for all the declarations, to simplify things, as per Tomas Kukosa's
suggestion.

Fix a couple of comments.

svn path=/trunk/; revision=4149
2001-11-04 03:16:47 +00:00
Guy Harris f9ff2a9ab3 Fix some declarations to match the signatures of "tvb_find_guint8()" and
"tvb_pbrk_guint8()".

svn path=/trunk/; revision=4121
2001-11-01 09:53:13 +00:00
Guy Harris 97a05828cd Sigh. Well, if you make the function declarations external, that means
that they're external when the plugin is compiled, and there's no
definition to satisfy the extern, so plugins fail to compile.

Add a "plugins/plugin_api_defs.h" header file that defines them, and
include that in one (and only one) source file for a particular plugin.

svn path=/trunk/; revision=4117
2001-10-31 10:40:58 +00:00
Guy Harris 62d224011d Stop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as the
former depends on having "guint64" and the latter depends on
"%ll[douxX]" being what's used to print 64-bit integers, and there are
platforms on which Etheeal runs that don't have "guint64" or that don't
use "%ll[douxX]" to print 64-bit integers.

Get rid of the routines to extract 64-bit integers into "gint64"s and
"guint64"s, as per Ronnie Sahlberg's suggestion, to discourage people
from writing code that won't work on all platforms; they should be using
FT_UINT64, or the routines in "int-64bit.c", instead.

svn path=/trunk/; revision=4102
2001-10-29 21:56:50 +00:00
Gilbert Ramirez c2cdf8acd0 Enable building of the coseventcomm plugin on Win32.
Some of these changs are from Frank Singleton, some are mine.

svn path=/trunk/; revision=4035
2001-10-17 19:27:43 +00:00
Guy Harris ce626b31af Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3935
2001-09-14 07:16:42 +00:00
Guy Harris 0e68611e41 From Thomas Wittwer: add "prefs_register_string_preference()" to the
list of functions available to plugins.

svn path=/trunk/; revision=3906
2001-09-04 01:05:41 +00:00
Guy Harris fbe8da33f5 Add a "proto_item_append_text()" routine, which is like
"proto_item_set_text()" except that it appends the result of the
formatting to the item's current text, rather than replacing the item's
current text.  Use it in the DNS dissector.

svn path=/trunk/; revision=3880
2001-08-29 00:51:10 +00:00
Guy Harris aa4cd01b9b Get rid of "proto_tree_add_notext()" - if you create a subtree using it,
but, before you set the text, you throw an exception while putting stuff
under the subtree, you end up with an absolutely blank protocol tree
item, which is really gross.  Instead of calling
"proto_tree_add_notext()", call "proto_tree_add_text()" with at least a
minimal label - yes, it does mean you do some work that will probably be
unnecessary, but, absent a scheme to arrange to do that work if it *is*
necessary (e.g., catching exceptions), the alternative is an ugly
protocol tree display.

svn path=/trunk/; revision=3879
2001-08-28 08:28:19 +00:00
Guy Harris 6287e86539 Add a bunch of routines used by GIOP plugins to the plugin address
table.

svn path=/trunk/; revision=3764
2001-07-22 10:12:11 +00:00
Guy Harris c5c33a0554 Update .cvsignore.
svn path=/trunk/; revision=3760
2001-07-21 06:32:27 +00:00
Guy Harris 5a0855bf57 CosEventComm dissector, from Frank Singleton.
svn path=/trunk/; revision=3756
2001-07-20 20:56:18 +00:00
Guy Harris d7b4534d38 Get rid of zero-length arrays.
svn path=/trunk/; revision=3753
2001-07-20 09:51:19 +00:00