Commit Graph

39 Commits

Author SHA1 Message Date
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 36facef286 Put in a note telling people NOT to use "tvb_get_ntohl()" or
"tvb_get_letohl()" to fetch IPv4 addresses.

svn path=/trunk/; revision=4110
2001-10-30 21:35:09 +00:00
Gerald Combs d5cda0d90c Fix conversation_new description. Add descriptions for
conversation_add_proto_data, conversation_get_proto_data, and
conversation_delete_proto_data.

svn path=/trunk/; revision=4031
2001-10-16 01:57:12 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Guy Harris ef787a1d84 Update the documentation to reflect the fact that the arguments to
"conversation_new()" and "find_conversation()" do not have fixed
identities as source and destination addresses, and to reflect the name
changes we made to arguments and flags to dispel any notion that they
had such fixed identities.

svn path=/trunk/; revision=3887
2001-08-31 09:04:36 +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 6e2d931517 Add some more notes on What Not To Do when writing code for Ethereal, so
as not to end up with, for example, code that works fine with GCC but
fails to compile with other compilers.

svn path=/trunk/; revision=3758
2001-07-20 23:38:30 +00:00
Guy Harris a627bc2463 Tell people *NOT* to create zero-length "hf[]" arrays if they don't have
any fields to register.

svn path=/trunk/; revision=3754
2001-07-20 09:55:08 +00:00
Guy Harris b5c9211473 Describe the use of FT_NONE, FT_STRING and other string-of-character
types, and FT_BYTES in more detail.

FT_TEXT_ONLY is gone; remove it.

svn path=/trunk/; revision=3730
2001-07-16 06:16:14 +00:00
Ed Warnicke 9e6250e336 Moved documentation for plugins to README.plugins and expanded
it.  Removed most of the Plugins section from README.developers

svn path=/trunk/; revision=3675
2001-07-10 01:22:58 +00:00
Guy Harris b361003bc5 Explain BASE_{DEC,HEX,OCT,BIN} a bit more, note that BASE_BIN is for
binary but currently is just decimal, and note that you may not use
BASE_NONE for integers.

svn path=/trunk/; revision=3352
2001-04-20 22:00:27 +00:00
Guy Harris 3c1508a6b3 Fix Gerald's e-mail address - and fix it in "README.developer", so
people don't blindly insert the old address into new dissectors, which
is probably how it got into the dissectors being fixed here.

svn path=/trunk/; revision=3348
2001-04-20 20:34:31 +00:00
Guy Harris 61f7a8eb4b Fix up some other README.developer items.
svn path=/trunk/; revision=3280
2001-04-10 07:21:38 +00:00
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