Commit Graph

25 Commits

Author SHA1 Message Date
Guy Harris e7fed6d68b Update README.developer to discuss 'col_set_str' and 'col_clear', to
make the dissector function in the sample dissector code a static
function, and to leave out the "CHECK_DISPLAY_AS_DATA()" call and the
line to set "pinfo->current_proto" in the sample dissector, as the
sample dissector is called through a dissector table, and the code to
call through a dissector table does both of those for you.

svn path=/trunk/; revision=3278
2001-04-09 22:25:39 +00:00
Guy Harris 28aa29c12c Update the list of types, and fix some typos.
svn path=/trunk/; revision=3070
2001-02-23 07:24:21 +00:00
Guy Harris 6d7aa5a618 Update the README.developer file to reflect the recent changes to
"proto_register_protocol()" and the addition of
"prefs_register_module()".

svn path=/trunk/; revision=2813
2001-01-03 08:00:01 +00:00
Guy Harris 4a41bdd1fc Use GLib's G_MODULE_EXPORT when defining constants and functions
exported by a plugin, rather than defining our own DLLEXPORT.

svn path=/trunk/; revision=2713
2000-11-29 09:49:30 +00:00
Guy Harris 6d46509f9c Update to reflect the new style for plugin dissectors.
svn path=/trunk/; revision=2575
2000-11-06 09:56:10 +00:00
Olivier Abad 1fd4721d48 Allow a plugin to specify several underlying protocols (i.e. tcp and udp).
The protocol constant definition in the plugin must be :
DLLEXPORT const gchar protocol[] = "tcp udp";

svn path=/trunk/; revision=2569
2000-11-05 09:40:18 +00:00
Guy Harris 3f4e41dc38 Patch from Craig Rodrigues to fix a call to "check_col()".
Fix a typo in a comment.

svn path=/trunk/; revision=2564
2000-11-05 07:14:40 +00:00
Gilbert Ramirez d1cfc6776b Updates from Jeff Foster.
svn path=/trunk/; revision=2548
2000-11-02 15:47:16 +00:00
Guy Harris 4b15a76ece When looking for definitions of "proto_register" and "proto_reg_handoff"
routines, throw out lines containing semicolons, so that we don't see
*declarations* of those routines.

svn path=/trunk/; revision=2530
2000-10-22 20:01:14 +00:00
Laurent Deniel f395740875 Modify the Gryphon plugin code in order to avoid an abort when the
plugin is enabled -> disabled -> re-enabled due to the fact that
the protocol registration is performed at each plugin_init() call
(and there is no protocol cleanup like with dfilter_cleanup).

Now we use the proto_xxx static variable to check if it is the first
activation or not (in this case, the proto_register_xxx routines are
not called.

svn path=/trunk/; revision=2290
2000-08-18 13:47:59 +00:00
Laurent Deniel 5a5e16ced7 Add the "Edit:Protocols..." feature which currently only implements
the following:

It is now possible to enable/disable a particular protocol decoding
(i.e. the protocol dissector is void or not). When a protocol
is disabled, it is displayed as Data and of course, all linked
sub-protocols are disabled as well.

Disabling a protocol could be interesting:

- in case of buggy dissectors
- in case of wrong heuristics
- for performance reasons
- to decode the data as another protocol (TODO)

Currently (if I am not wrong), all dissectors but NFS can be disabled
(and dissectors that do not register protocols :-)

I do not like the way the RPC sub-dissectors are disabled (in the
sub-dissectors) since this could be done in the RPC dissector itself,
knowing the sub-protocol hfinfo entry (this is why, I've not modified
the NFS one yet).

Two functions are added in proto.c :

gboolean proto_is_protocol_enabled(int n);
void proto_set_decoding(int n, gboolean enabled);

and two MACROs which can be used in dissectors:

OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree)
CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree)

See also the XXX in proto_dlg.c and proto.c around the new functions.

svn path=/trunk/; revision=2268
2000-08-13 14:20:32 +00:00
Laurent Deniel 2de43f748b Miscellaneous code cleaning
- add <stdarg.h> or <varargs.h> in snprintf.h
  and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes

- remove the check of multiple inclusions in source (.c)  code
  (there is a bit loss of _cpp_ performance, but I prefer the gain of
   code reading and maintenance; and nowadays, disk caches and VM are
   correctly optimized ;-).

- protect all (well almost) header files against multiple inclusions

- add header (i.e. GPL license) in some include files

- reorganize a bit the way header files are included:

  First:
  #include <system_include_files>
  #include <external_package_include_files (e.g. gtk, glib etc.)>
  Then
  #include "ethereal_include_files"

  with the correct HAVE_XXX or NEED_XXX protections.

- add some HAVE_XXX checks before including some system header files

- add the same HAVE_XXX in wiretap as in ethereal

Please forgive me, if I break something (I've only compiled and regression
tested on Linux).

svn path=/trunk/; revision=2255
2000-08-11 13:46:34 +00:00
Olivier Abad b977b382b3 Changed my mail address to oabad@cybercable.fr (dhis.net is too
unreliable).

svn path=/trunk/; revision=2019
2000-05-28 17:04:47 +00:00
Guy Harris b0294c712c Document "match_strval()" and "val_to_str()", as per Gerrit Gehnen's
suggestion.

svn path=/trunk/; revision=1897
2000-04-29 07:57:43 +00:00
Gilbert Ramirez 9789501a17 Fixed declaration of ip_dissector_table and clarified bitwidth doco.
Patch from Ben Fowler <wapdev@leedsnet.com>

svn path=/trunk/; revision=1888
2000-04-25 08:55:11 +00:00
Guy Harris 9e8cab115d Update the document to reflect Gilbert's changes to split
"proto_tree_add_item_format()" into multiple routines for different item
types, and to note that a subtree can be added under any item.

svn path=/trunk/; revision=1809
2000-04-06 06:38:24 +00:00
Guy Harris 1321ad97eb Fix some typos.
Get rid of the paragraph about C++-style comments at the beginning of
the document, as it also appears in section 1.1.1 "Comments".

Add a section on how to extract data from packets, which explains the
"pd" and "offset" arguments to a dissector, and notes that you should
not just blithely cast pointers into the packet data to 2-byte or 4-byte
integral types and dereference them, as the pointer may not be aligned,
and the field may not have the same byte order as the processor on which
Ethereal is running (in fact, it's probably *guaranteed* not to on at
least one machine, as Ethereal runs on both big-endian and little-endian
platforms...).

svn path=/trunk/; revision=1710
2000-03-10 08:57:05 +00:00
Olivier Abad 5a89694778 - Jeff Foster's documentation for conversations and coding style
- Documentation for plugins.

svn path=/trunk/; revision=1708
2000-03-09 19:32:31 +00:00
Guy Harris bcb954c51d Document "proto_tree_add_notext()", "proto_item_set_len()", and
"proto_item_set_text()".

svn path=/trunk/; revision=1688
2000-03-03 06:58:28 +00:00
Guy Harris 9490a8ead6 Put in a discussion of "check_col()", "col_add_[f]str()", and
"col_append_[f]str()".

svn path=/trunk/; revision=1687
2000-03-03 06:39:10 +00:00
Guy Harris 8f3dee4470 Put in a note on updating "Makefile.am" and "Makefile.nmake".
svn path=/trunk/; revision=1685
2000-03-03 06:19:50 +00:00
Guy Harris d4de088c60 Merge in Gilbert's "proto_tree" document.
svn path=/trunk/; revision=1684
2000-03-03 06:13:23 +00:00
Guy Harris 0f6d258026 Note that C++-style comments shouldn't be used in dissectors.
svn path=/trunk/; revision=1680
2000-03-02 07:47:20 +00:00
Guy Harris 33afb489e7 Merge in some information from Jeff Foster's developer's notes.
svn path=/trunk/; revision=1674
2000-03-01 08:05:49 +00:00
Guy Harris 4eee1fa7ca James Coe's developer HOWTO.
svn path=/trunk/; revision=1673
2000-03-01 07:48:03 +00:00