Commit Graph

169 Commits

Author SHA1 Message Date
Sebastien Tandel 0ca67aef30 - new ptvcursor subtrees management functions :
* ptvcursor_push_subtree(), ptvcursor_pop_subtree() for pushing/popping
    subtrees. Multiple levels of subtrees (256 max.), allocation per 8 levels.
  * Two new functions creating an item in the tree and pushing a subtree at the
    same time. These two functions accept an undefined length
    (SUBTREE_UNDEFINED_LENGTH). The length of the item is set at the next pop.
        1) ptvcursor_add_with_subtree
	2) ptvcursor_add_text_with_subtree
- get rid of potential memory leaks with g_new in ptvcursor_new().

- Documentation of the new ptvcursor functions in README.developer


svn path=/trunk/; revision=21276
2007-03-30 00:21:39 +00:00
Jeff Morriss 62596bffb3 Fix bug 552:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=552

by enforcing that header fields have names of length > 0.  This should fix
the display of those fields and also make them filterable (which was the
subject of the bug).  Abbreviations are (still) optional: if they are empty
then the field is not filterable.

Update README.developer with this information.

Add header field names in several dissectors where they were missing.

In packet-arp.c give "packet-storm-detected" a name (as above) but also set it
as _GENERATED.

Also remove trailing white space from all the files checked in.

svn path=/trunk/; revision=21018
2007-03-11 06:16:00 +00:00
Jaap Keuter 88a508d407 From Richard van der Hoff:
I've had a good look at the code in packet-tcp.c, and whilst it's
somewhat impenetrable, I've come to the conclusion that it just doesn't
support multiple pdus as described.

That's not entirely unreasonable in itself; my objection is solely to
the fact that README.developer is completely misleading. In fact, even
the example dissect_cstr won't work on the tcp dissector, because if you
set desegment_len=1 the tcp dissector believes that you know what you
are doing and doesn't let you change your mind later.

Furthermore, 2.7.2 says that you can set desegment_len=-1; that doesn't
work either, because the tcp dissector expects
DESEGMENT_ONE_MORE_SEGMENT, which is 0x0fffffff, which is nowhere near -1.

In short, I think the relevant section of README.developer needs a
rewrite. I attach a patch - comments welcome.

svn path=/trunk/; revision=20974
2007-03-05 20:25:54 +00:00
Stephen Fisher aa897723ff From Sebastien Tandel:
Here is an updated patch for proto_tree_add_item and the
range_string structure. The new macro RVALS() can be used as the macro
VALS() in the declaration of your hf_register_info with another
structure (range_string).  Be aware that you *have to* ORed the value of
the field display with BASE_RANGE_STRING constant and it can 'only' be
used with FT_(U)INT* types in a header_field_info.


svn path=/trunk/; revision=20805
2007-02-14 00:39:48 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Jeff Morriss e166f9c4e6 Explain what 'base' in 'prefs_register_uint_preference()' is: it's used in 'strtoul()'
svn path=/trunk/; revision=20636
2007-01-31 01:59:12 +00:00
Jaap Keuter e4e739a5ca From Graham Bloice:
In the Developers Guide, Section 9.3, Example 9.17. Decompressing data
packets for dissection

The code calls tvb_set_free_cb() for the newly created next_tvb.  This
is unnecessary as the call to tvb_set_child_real_data() adds next_tvb to
the chained list of tvb, thus ensuring that next_tvb is correctly
deleted.  In fact when I had the call in, Visual Studio kept breaking
deep down in ntdll.dll, probably because of a double free every time the
main tvb was deleted.

In README.developer, para 2..2.7 The example conversation code doesn't
assign the result of conversation_new() back into the conversation variable.

svn path=/trunk/; revision=20569
2007-01-26 17:12:00 +00:00
Jaap Keuter f8422ab7db Extending true_false_string support
- Separate tfs.[ch]
- Add larger sample collection
- Properly export DATA

svn path=/trunk/; revision=20373
2007-01-10 07:47:00 +00:00
Stephen Fisher 8b8b648ad6 From Stig Bjorlykke:
* Fixed a typo in README.developer


svn path=/trunk/; revision=20132
2006-12-14 00:05:03 +00:00
Stephen Fisher c980cede98 From Francesco Fondelli:
I defined a range_string struct. It's like value_string
but stores range <-> string pairs.
Moreover I wrote rval_to_str(), match_strrval_idx()
match_strrval() which are behaving exactly as
val_to_str(), match_strval_idx() and match_strval().


svn path=/trunk/; revision=20061
2006-12-07 20:29:40 +00:00
Jeff Morriss 39c6f8bf89 Add documentation of the col_set_fence() and col_prepend_fence_fstr() calls. I *think* I got the description of col_prepend_fence_fstr() right.
svn path=/trunk/; revision=20015
2006-11-29 13:42:16 +00:00
Ronnie Sahlberg 3ea6b058d9 add description of proto_tree_add_bitmask()
svn path=/trunk/; revision=20011
2006-11-28 09:09:58 +00:00
Jeff Morriss 09078377d9 Change to show how to write a 'new style' dissector (that is, one that returns the number of bytes it was able to dissect). I think the Developer's Guide (docbook/) probably needs similar updates but I'm a bit shy about editing XML with good old vi; maybe if I can figure out if I can build the doc in the first place... Also rewrap a few pararaphs that went past 80 columns.
svn path=/trunk/; revision=19989
2006-11-26 14:00:01 +00:00
Guy Harris 9bf2e75f68 If you're doing TCP reassembly by hand rather than with
tcp_dissect_pdus(), pinfo->desegment_len indicates whether your
dissector needs more data from TCP or not - the return value doesn't
indicate that.

Fix typo.

It appears that the Id keyword is one of the case-insensitive ones in
the svn:keywords property, so if you set it to "ID" it still expands
"$Id$"; it also appears not to expand "$ID$".  We use Revision, Date,
and Author in the document to indicate the revision, and don't expand
Id, so that references to "$Id$" get left alone.

Rewrap paragraphs.

svn path=/trunk/; revision=19950
2006-11-21 20:10:10 +00:00
Jaap Keuter 45aa24f1ec Correct comments and examples on get_pdu_len().
svn path=/trunk/; revision=19949
2006-11-21 14:18:46 +00:00
Gerald Combs 50998dea36 Add comments to the indentation style section.
svn path=/trunk/; revision=19910
2006-11-16 18:28:09 +00:00
Guy Harris 8f3f19975d Add Yet Another Portability Recommendation.
svn path=/trunk/; revision=19855
2006-11-07 09:12:30 +00:00
Guy Harris 6c0027f4a9 Mention the 64-bit-integer accessors.
svn path=/trunk/; revision=19703
2006-10-26 10:27:16 +00:00
Ulf Lamping 2117343868 - some more cleanup
- mention the other README files
- encode some @ chars to [AT] in mail addresses

svn path=/trunk/; revision=19551
2006-10-16 03:25:50 +00:00
Ulf Lamping 262774ad51 split the display filter engine doc into it's own file
svn path=/trunk/; revision=19549
2006-10-16 02:37:06 +00:00
Ulf Lamping 565d3841b9 add a prerequisites section and some minor changes
svn path=/trunk/; revision=19545
2006-10-15 22:42:22 +00:00
Jaap Keuter aafce04fd4 Update FSF address in code template
svn path=/trunk/; revision=19531
2006-10-14 19:00:31 +00:00
Jaap Keuter a4ed1160e0 Cleanup sample code.
Cleanup some text and headings.
Play trick with keyword so text remains untouched.

svn path=/trunk/; revision=19504
2006-10-12 10:38:24 +00:00
Ulf Lamping 27b3b45627 from Stephen Fisher:
"I ran doc/README.developer through a spell checker and conservatively 
changed misspelled words.  Attached is a compressed patch with the 
corrections."

svn path=/trunk/; revision=19070
2006-08-29 00:15:09 +00:00
Jörg Mayer bffc4ab0e5 Stephen Fisher:
This patch fixes two typos in README.developer

svn path=/trunk/; revision=18870
2006-08-10 10:21:44 +00:00
Jaap Keuter cc1a6ebfa6 Update the ptvcursors chapter.
svn path=/trunk/; revision=18639
2006-07-03 09:26:19 +00:00
Jaap Keuter 257f76d96a Stricter wording for PROTOABBREV
svn path=/trunk/; revision=18535
2006-06-21 19:33:05 +00:00
Gerald Combs eb71f7fb96 Rename the main executable to "wireshark", along with more conversions:
ethereal.com -> wireshark.org
  mailing lists and addresses
  ETHEREAL -> WIRESHARK
  Man pages
  Automake/Autoconf names


svn path=/trunk/; revision=18271
2006-05-31 19:12:15 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Ronnie Sahlberg 6075ec39fb ethereal->wireshark
svn path=/trunk/; revision=18207
2006-05-22 08:21:22 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Tomas Kukosa d31072a9a2 update with FT_GUID, FT_OID, BASE_DEC_HEX, BASE_HEX_DEC
svn path=/trunk/; revision=18163
2006-05-15 16:28:49 +00:00
Gilbert Ramirez e3899ed4a4 Add infrastructure for display filter functions.
Add upper() and lower() display filter functions for string fields.

svn path=/trunk/; revision=18071
2006-05-02 14:26:17 +00:00
Jörg Mayer c7a3dd2938 Remove references to README.tvbuff. The Makefile.am should fix the
buildbot failure.

svn path=/trunk/; revision=17405
2006-02-25 02:02:36 +00:00
Jaap Keuter 6a8533fbb0 Remove obsolete document README.tvbuff
svn path=/trunk/; revision=17401
2006-02-24 21:54:54 +00:00
Guy Harris 13a8667b08 Document the proto_tree_add_XXX_format_value() routines.
svn path=/trunk/; revision=17318
2006-02-16 11:51:02 +00:00
Gilbert Ramirez 7764c48771 Document ptvcursors.
svn path=/trunk/; revision=16308
2005-10-25 17:10:04 +00:00
Ronnie Sahlberg e9ab01f4e3 add some text to discourage using strcpy and friends and how to do string buffer allocation less rpone to memory leaks and buffer overflows.
svn path=/trunk/; revision=16232
2005-10-15 23:44:28 +00:00
Guy Harris 266e1a3491 Add "tvb_get_ipv4()" and "tvb_get_ipv6()" addresses, to fetch IPv4 and
IPv6 addresses.  Use "tvb_get_ipv4()" in the WINS Replication dissector,
so that it gets the right answer on little-endian *AND* big-endian
machines.

svn path=/trunk/; revision=15753
2005-09-10 19:43:41 +00:00
Ronnie Sahlberg 9599cf9e3b add new function tvb_get_ephemeral_stringz()
svn path=/trunk/; revision=15273
2005-08-10 14:25:59 +00:00
Ronnie Sahlberg b4441e6748 rename ep_tvb_fake_unicode() to tvb_get_ephemeral_faked_unicode() and update the README file.
svn path=/trunk/; revision=15271
2005-08-10 13:56:34 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +00:00
Jörg Mayer 6f4033bc83 Don't initialize variables in their declaration with non-constant
values.

svn path=/trunk/; revision=15211
2005-08-04 21:40:58 +00:00
Gerald Combs f97247e3d0 Add a note about fuzz testing.
svn path=/trunk/; revision=14679
2005-06-17 15:03:26 +00:00
Anders Broman 46a9c67335 From Mike Duigou
Minor corrections to README.developer and README.tapping

svn path=/trunk/; revision=14593
2005-06-09 05:40:26 +00:00
Anders Broman d656e253db From Mike Duigou:
A few doxygen updates and an improved section on 
writing dissectors that don't use tcp_dissect_pdus().

svn path=/trunk/; revision=14538
2005-06-03 06:36:07 +00:00
Ronnie Sahlberg fcab322ada Some applications do very naughty things like reusing a port for a different protocol during different stages of an application cycle.
This is very naughty and will cause problems when we have assigned a dissector to a dynamic port using conversation_set_dissector().


To make ethereal handle this case I have changed the try_conversation_dissector() to allow it to fail and return 0,   meaning   yes there is indeed a protocol registered for this conversation but that protocol rejected this packet.
(which only happens for "new" style dissectors, "old" style dissectors will never reject a packet that way)

When this happens  the decode_udp_port() helper will still allow other dissectors to be tried, in the hope that the conversation is now used for some other protocol and thus someone else might be able to decode the packet.


Update SNMP and TFTP dissectors to  check that even if there already is a conversation but that conversation does NOT have snmp/tftp registered as the dissector for it, then create a new conversation anyway and attach the proper dissector.

Since ethereal keeps track of which frame number a conversation started in, this actually works really well.



svn path=/trunk/; revision=14345
2005-05-11 10:40:53 +00:00
Ronnie Sahlberg 4656201984 From Jon R
Update to README.developer for the conversation changes


svn path=/trunk/; revision=14135
2005-04-19 12:05:50 +00:00
Gerald Combs c9be421b16 Add a note about testing to the "Robustness" section.
svn path=/trunk/; revision=14050
2005-04-11 01:57:00 +00:00