Commit Graph

32 Commits

Author SHA1 Message Date
Guy Harris f6c0519c0a Support string dissector tables in the Tethereal "decode as" stuff.
Make the Ethereal "decode as" stuff not blow up with string dissector
tables.

Selectors for uint dissector tables are unsigned, not signed.

svn path=/trunk/; revision=8408
2003-09-07 00:47:57 +00:00
Laurent Deniel 9c27b912d6 Add an "Apply" button to "Decode As" window.
svn path=/trunk/; revision=7243
2003-03-01 13:08:59 +00:00
Olivier Abad 3cd4fed22d Use gtk1/gtk2 compatibility macros.
svn path=/trunk/; revision=6616
2002-11-11 18:57:00 +00:00
Olivier Abad 048ab33a26 Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6597
2002-11-09 20:52:39 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Jörg Mayer 34141201f2 Add (back) some #include <string.h>
svn path=/trunk/; revision=6394
2002-10-10 01:49:21 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer 7c4176d868 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=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 96ab70e209 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the gtk/ directory.

svn path=/trunk/; revision=5930
2002-08-02 22:34:54 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +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
Gilbert Ramirez 791f5774d0 Provide for per-protocol-tree data in the proto_tree code.
Put a hash-table of "interesting" fields in the per-proto-tree data.
The dfilter code records which fields/protocols are "interesting" (by which
I mean, their value or existence is checked). Thus, the proto_tree routines
can create special arrays of field_info*'s that are ready for the dfilter
engine to use during a filter operation.

Also store the "proto_tree_is_visible" boolean, renamed "visible", in
the per-proto-tree data.

Move epan_dissect_t to its own header file to make #include dependencies
easier to handle.

Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t*
as an argument.

epan_dissect_new() needs to be followed by epan_dissect_run() for the
dissection to actually take place. Between those two calls,
epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to
prime the empty proto_tree with the "intersesting" fields from the dfilter_t.

svn path=/trunk/; revision=4422
2001-12-18 19:09:08 +00:00
Guy Harris 75cc056222 Attach a descriptive name field type and base to dissector tables; that
specifies how the selector values used as keys in those tables are to be
displayed, and the title to use when displaying the table.

Use that information in the code to display the initial and current
entries of various dissector tables.

Have the dissector for BACnet APDUs register itself by name, and have
the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set,
rather than doing it with a dissector table.

svn path=/trunk/; revision=4358
2001-12-08 06:41:48 +00:00
Guy Harris 824071e92f Handle the case of the initial, or current, dissector handle for a
particular port number being null.

svn path=/trunk/; revision=4347
2001-12-06 08:50:14 +00:00
Guy Harris 64ee59907d "ptype" is always set, even if only to PT_NONE; it will be set to PT_TCP
only there's TCP in the current frame and it will be set to PT_UDP only
if there's UDP in the current frame.  As such, there's no need to check
"ipproto" before checking "ptype" - and we should check "ptype" as well
as "ipproto" when deciding whether we'll put up a "Decode As" dialog
with anything in it.

(Not that there's anything other than IPv4 or IPv6 over which we
currently dissect TCP or UDP....)

svn path=/trunk/; revision=4318
2001-12-03 21:05:59 +00:00
Guy Harris a492a07a51 To check whether the current frame contains TCP or UDP traffic, check
whether the port type is PT_TCP or PT_UDP, don't check the IP protocol
type at the network layer (except to check whether it's set at all, to
decide whether it's IP/IPv6 - if it's not, the transport isn't TCP or
UDP); that way, we don't have to keep track of which IP protocol numbers
are being decoded as TCP or UDP.

svn path=/trunk/; revision=4317
2001-12-03 20:49:03 +00:00
Guy Harris 4212ae25fd When the dissector tables are reset to the default settings, the list of
IP protocol numbers to be decoded as TCP and as UDP should be reset as
well.

svn path=/trunk/; revision=4313
2001-12-03 09:09:11 +00:00
Guy Harris c22d3fdc96 Get rid of the lists of conversation dissectors; instead, have a
dissector table contain both a hash table, to use to look up port
numbers to find a dissector, and a list of all dissectors that *could*
be assigned to ports in that hash table, to be used by user interface
code.

Make the "Decode As" dialog box code use that.

Also make it *not* let you choose whether to set the dissector for both
the UDP and TCP versions of a port; some protocols run only atop TCP,
some run only atop UDP, and even those that can run atop both may have
different dissector handles to use over TCP and UDP, so handling a
single merged list would be a mess.  (If the user is setting the
dissector for a TCP port, only those protocols that Ethereal can handle
over TCP should be listed; if the user is setting the dissector for a
UDP port, only those protocols that Ethereal can handle over TCP should
be listed; if the user is setting a dissector for both, only those
protocols that Ethereal can handle over *both* TCP *and* UDP should be
listed, *and* there needs to be a way to let the "Decode As" code get
both the TCP handle *and* the UDP handle and use the right ones.  If
somebody really wants that, they need to implement all of the above if
they want the code to be correct.)

Fix the code that handles setting the dissection for the IP protocol
number to correctly update the lists of protocols being dissected as TCP
and as UDP; the code before this change wasn't updating the single such
list to add new protocols.

svn path=/trunk/; revision=4311
2001-12-03 08:47:31 +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
Gilbert Ramirez 8743a4a8a7 Remove the global packet_info called "pi". Dissectors now only
access their own "pinfo". A packet_info is stored in epan_dissect_t,
which is created for the dissection of a single packet.

GUI functions which need to access the packet_info of the currently
selected packet used to use "pi"; now they use cfile.edt->pi. cfile's
"edt" member is the epan_dissect_t of the currently-selected packet.

The functionality of blank_packetinfo() was moved into
dissect_packet(), as that's the only place that called blank_packetinfo(),
after a spurious call to blank_packetinfo() was removed from
packet_list_select_cb().

svn path=/trunk/; revision=4246
2001-11-21 23:16:26 +00:00
Guy Harris fbc3f2eb0e Include protocols for TCP conversation dissectors in the list of
protocols that can be used to decode stuff.

svn path=/trunk/; revision=4152
2001-11-04 04:12:03 +00:00
Guy Harris dffa2a989a Get rid of a bunch of stuff that was there to support non-tvbuffified
dissectors and that's no longer needed.

svn path=/trunk/; revision=4112
2001-10-31 05:59:20 +00:00
Guy Harris d7973c6ede Fix a typo.
svn path=/trunk/; revision=3860
2001-08-21 07:03:50 +00:00
Guy Harris 25c2cb0ec0 A better fix - we don't use "assigned" if the action was E_DECODE_NO, so
don't bother fetching it if the action is E_DECODE_NO; that means we can
also avoid fetching the currently selected row if the action is
E_DECODE_NO, so the fact that we've cleared the selection if the action
is E_DECODE_NO doesn't matter.

svn path=/trunk/; revision=3606
2001-06-25 08:10:38 +00:00
Guy Harris 9c046f18a3 In "decode_network()", get the information about the currently selected
row *before* calling "decode_simple()", as, if the "Do not decode" radio
button is selected, "decode_simple()" will clear the current selection.

svn path=/trunk/; revision=3605
2001-06-25 07:57:50 +00:00
Guy Harris cc6b18e6ab No old-style dissectors call "old_dissector_try_port()", so get rid of
"old_dissector_try_port()".

There are no longer any old-style heuristic or conversation dissectors,
so get rid of "old_heur_dissector_add()" and "old_conv_dissector_add()"
and the data-structure members that support old-style heuristic and
conversation dissectors.

svn path=/trunk/; revision=3478
2001-05-30 06:41:08 +00:00
Guy Harris c75f555d8c Move the declarations of IP protocol numbers to "ipproto.h" from
"packet-ip.h".

Fix Gerald's address in some files while we're at it.

svn path=/trunk/; revision=3366
2001-04-23 17:51:37 +00:00
Guy Harris 92e96d7e9f GUI code fixes from Eduardo P�rez Ureta.
svn path=/trunk/; revision=3189
2001-03-26 10:28:34 +00:00
Guy Harris f6f6aa6424 "Decode As" UI cleanups, and documentation, from David Hampton.
svn path=/trunk/; revision=3032
2001-02-14 07:15:39 +00:00
Guy Harris 076c614cfb Display Ethernet protocol types in hex, not decimal (that's how they're
generally shown), and display port numbers and IP protocol numbers as
unsigned.

svn path=/trunk/; revision=3022
2001-02-12 01:17:23 +00:00
Guy Harris 55662a3607 Inactivate the "Decode As" menu item if the "Decode As" dialog box
wouldn't actually offer any options to the user.

Make a bunch of routines static that aren't used outside
"decode_as_dlg.c".

Remove the declaration of the nonexistent "decode_as_register_tcpudp()"
routine.

svn path=/trunk/; revision=3020
2001-02-11 23:02:05 +00:00
Guy Harris 8b51643203 "Decode As" dialog, from David Hampton.
svn path=/trunk/; revision=2965
2001-02-01 07:34:33 +00:00