Commit Graph

84 Commits

Author SHA1 Message Date
Guy Harris 3de139644b Clarify the previous checkin - that applies to the 'value' argument.
svn path=/trunk/; revision=8797
2003-10-28 05:50:52 +00:00
Guy Harris 5900986044 As per a suggestion by Olivier Biot, note that objects pointed to by
pointer arguments to "proto_tree_add_XXX" functions are copied - if you
allocated a buffer for one of them (e.g., a string), and you don't free
that buffer when you're done with it, you'll leak memory.

svn path=/trunk/; revision=8796
2003-10-28 05:49:29 +00:00
Guy Harris d4fcd2d0a9 Warn about Yet Another GCCism.
svn path=/trunk/; revision=8742
2003-10-20 23:07:43 +00:00
Guy Harris dca567002e From Lo�c Minier: information on how to do reassembly of PDUs atop TCP.
svn path=/trunk/; revision=8651
2003-10-09 21:18:41 +00:00
Guy Harris 23f4abb9f9 Add an item about prefixing #define names and enum names with a prefix
to avoid name collisions.

svn path=/trunk/; revision=8649
2003-10-09 18:57:37 +00:00
Guy Harris b7183b32b9 Add One More Item to the list of things not all compilers can handle.
svn path=/trunk/; revision=8627
2003-10-06 19:11:41 +00:00
Guy Harris 25adf89ed4 Fix a typo.
Wrap text to 80 columns.

Add myself to the authors list (e.g. for the portability section).

svn path=/trunk/; revision=8108
2003-07-30 23:18:55 +00:00
Gilbert Ramirez 086774b71f Add to the fundamental types passed between the scanner and the parser.
Besides "STRING", there is now "UNPARSED_STRING", where the distinction
is that "STRING" was a double-quoted string and "UNPARSED_STRING" is just
a sequence of characters that the scanner didn't know how to scan/parse,
so it's up to the Ftype to parse it.

This gives us more flexibility and prepares the dfilter parsing engine
for the upcoming addition of the "contains" operator.

In the process of doing this, I also re-did the double-quoted string
support in the scanner, so that instead of the naively-simple support we
used to have, double-quoted strings now can have embedded dobule-quotes,
embedded octal sequences, and embedded hexadecimal sequences:
    "\""    embedded double-quote
    "\110"  embedded octal
    "\x48"  embedded hex

Enhance the dfilter unit test script to be able to run a single collection
of tests instead of having to run all of them all the time.

svn path=/trunk/; revision=8083
2003-07-25 03:44:05 +00:00
Guy Harris c664749b18 Typo fix, from Brad Hards.
svn path=/trunk/; revision=7977
2003-07-07 22:59:54 +00:00
Guy Harris 48aa4ea7ac Clarify the comment about not doing dissection work if "tree" is NULL,
to indicate what you should avoid doing *and* to indicate what you still
have to do (i.e., call subdissectors).

svn path=/trunk/; revision=7864
2003-06-12 10:15:25 +00:00
Laurent Deniel dc01cb646b - conversation_get_protocol_data -> conversation_get_proto_data
- miscellaneous typos corrected

svn path=/trunk/; revision=7329
2003-03-09 22:00:26 +00:00
Guy Harris 5bf33b9ca9 Note that you need <io.h> on Windows if you want to use "open()",
"close()", "read()", "write()", etc..

svn path=/trunk/; revision=7314
2003-03-07 21:50:34 +00:00
Guy Harris e431a83cde Throw in some additional portability notes about:
not using "%l[doux]" with guint32;

	not including <unistd.h> without #ifdef HAVE_UNISTD_H;

	not fopening binary files with "r", "w", etc., and not opening
	them with "open()" without using O_BINARY.

svn path=/trunk/; revision=7302
2003-03-06 22:41:39 +00:00
Guy Harris 59c18d6bd4 Note that one shouldn't put a comma after the last element of an enum.
svn path=/trunk/; revision=7115
2003-02-10 19:21:25 +00:00
Guy Harris ab552d3746 Get rid of BASE_BIN - it's just the same as BASE_DEC, but people seemed
to be using it for stuff that should be hex, and for stuff that should
be Boolean.  Use BASE_DEC if it should be decimal, BASE_HEX if it should
be hex, and make it Boolean if it should be Boolean.

svn path=/trunk/; revision=7053
2003-01-31 03:17:56 +00:00
Guy Harris 3b6d2f5df9 More completely explain the "name" argument to the
"prefs_register_XXX_preference" routines, to note that it should *NOT*
include the protocol name - the protocol name is automatically prepended
to it, with a "." separator, as the preference is registered in a module
whose name is that of the protocol.

svn path=/trunk/; revision=7031
2003-01-29 00:39:02 +00:00
Laurent Deniel 1a66f9aec9 Update my email address in various places since my old one no longer works
svn path=/trunk/; revision=7003
2003-01-26 19:35:31 +00:00
Guy Harris 58d1820542 Document FT_FRAMENUM.
svn path=/trunk/; revision=6805
2002-12-19 05:28:40 +00:00
Gerald Combs d44e27b17c Fix a typo.
svn path=/trunk/; revision=6769
2002-12-09 03:09:35 +00:00
Guy Harris 753ef1fb73 Put in a note about "ntoh[ls]()" and "hton[ls]()" vs. the GLib versions
of same.

svn path=/trunk/; revision=6594
2002-11-09 08:37:00 +00:00
Guy Harris 85eafc7e25 From Jean-Baptiste Marchand: fix a typo in README.developer.
Also, put him into the list of authors in the man page.

svn path=/trunk/; revision=6554
2002-11-03 20:24:12 +00:00
Guy Harris 749d00f331 Put in a portability note telling people to use "strchr()" and
"strrchr()", not "index()" and "rindex()"; MSVC++ doesn't declare
"index()" or "rindex()" if you include <string.h>, and they're
non-standard routines (the ANSI C names for those functions are
"strchr()" and "strrchr()").

Add a bit more to the other portability note on the topic of
non-standard vs. ANSI standard functions.

svn path=/trunk/; revision=6539
2002-11-01 09:41:36 +00:00
Guy Harris 9ce0f18987 Put in a note telling people not to use "long" for 32-bit quantities.
svn path=/trunk/; revision=6446
2002-10-17 20:05:04 +00:00
Guy Harris 915e66e434 Document FT_FLOAT and the "proto_tree_add_float" routines.
svn path=/trunk/; revision=6088
2002-08-26 09:36:22 +00:00
Jörg Mayer 81125f51c0 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents in the READMEs and examples in the doc/ directory.

svn path=/trunk/; revision=5933
2002-08-02 23:46:26 +00:00
Guy Harris a650adbf57 Fix a sample call to add an item to the subtree for a protocol to add it
there rather than to the top-level tree, and use
"proto_tree_add_item()".

Add a description of PROTOSHORTNAME, and give an example of the way
PROTONAME, PROTOSHORTNAME, and PROTOABBREV would be set for a protocol.

svn path=/trunk/; revision=5877
2002-07-15 20:31:06 +00:00
Guy Harris 90922fb718 Fix some other errors.
svn path=/trunk/; revision=5852
2002-07-10 04:29:23 +00:00
Guy Harris caaccf5a94 Fix an erroneous example.
svn path=/trunk/; revision=5851
2002-07-10 04:24:37 +00:00
Guy Harris 0d206a890a Put in a note about casting the result of "tvb_get_ptr()" to a structure
pointer and using that pointer.

svn path=/trunk/; revision=5793
2002-06-29 00:15:18 +00:00
Guy Harris 69d58fab15 Update the note on adding dissector source files to match current
reality, and add a note on adding dissector *header* files.

svn path=/trunk/; revision=5780
2002-06-28 20:20:22 +00:00
Guy Harris 6b0931859d Add "uint" to the list of "u..." types not to use.
Fix the argument lists of the "proto_tree_add_" routines to include the
tvbuff argument.

svn path=/trunk/; revision=5738
2002-06-22 21:00:53 +00:00
Guy Harris aa576abd08 Put in an additional portability note about "bzero()"/"bcopy()"/"bcmp()"
vs. "memset()"/"memcpy()"/"memmove()"/"memcmp()".

svn path=/trunk/; revision=5700
2002-06-18 20:25:12 +00:00
Guy Harris 7483a6197a Document the tvbuff accessors for IEEE floating-point numbers.
svn path=/trunk/; revision=5246
2002-04-24 21:53:47 +00:00
Guy Harris 0b4145f7d7 Add information about 64-bit integral field support.
Fix some items on the tvbuff accessors for integers.

svn path=/trunk/; revision=4965
2002-03-18 00:20:18 +00:00
Guy Harris 481b4bca97 Update the developer documentation to reflect current reality (or a
subset thereof).

svn path=/trunk/; revision=4953
2002-03-16 20:22:14 +00:00
Guy Harris 95ee7f0ac1 Tell people not to use "ulong" or "ushort".
svn path=/trunk/; revision=4845
2002-03-02 07:56:16 +00:00
Guy Harris 37c1109287 Fix two references to "proto_item_set_text()" and
"proto_item_append_text()" to use the right names.

svn path=/trunk/; revision=4838
2002-03-01 20:19:44 +00:00
Guy Harris 84b6b76cf3 Improve the note on how to deal with items with subtrees when the text
for the item should reflect what's in the subtree.

svn path=/trunk/; revision=4832
2002-02-28 23:23:12 +00:00
Guy Harris 95106816d3 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=4587
2002-01-21 07:52:35 +00:00
Guy Harris 92915713d3 Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff".  This can be used if

	1) the item covers the entire packet or the remaining payload in
	   the packet

or

	2) the item's length won't be known until it's dissected, and
	   will be then set with "proto_item_set_len()" - if an
	   exception is thrown in the dissection, it means the item ran
	   *past* the end of the tvbuff, so saying it runs to the end of
	   the tvbuff is reasonable.

Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).

In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).

Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.

Fix some indentation.

svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
Guy Harris 1409de29e4 Put in a note about labels requiring statements following them.
svn path=/trunk/; revision=4413
2001-12-17 08:35:09 +00:00
Guy Harris fcda4ee579 Get rid of all mentions of old-style dissectors, and fix up an example
to reflect tvbuff-based access to packet data.

Update calls that deal with columns to pass "pinfo->cinfo" rather than
"pinfo->fd".

Update the example of preference registration to reflect the replacement
of the BXXP dissector with the BEEP dissector.

svn path=/trunk/; revision=4376
2001-12-10 06:31:49 +00:00
Guy Harris d304535254 Update the sample dissector handoff registration routine to match the
current calling sequence for "dissector_add()".

svn path=/trunk/; revision=4309
2001-12-03 04:12:53 +00:00
Guy Harris 703189dd9d Reflect the change to "conversation_set_dissector()" to take a dissector
handle as an argument.

svn path=/trunk/; revision=4282
2001-11-27 07:21:55 +00:00
Guy Harris 3ab9a4931f Clarify what the tvbuff handed to a dissector contains (i.e., it's not
the raw frame data, it's the data that the dissector should look at).

svn path=/trunk/; revision=4278
2001-11-27 05:05:02 +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 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