Commit Graph

196 Commits

Author SHA1 Message Date
Bill Meier cfeb34f62b Only Glib/GTK+ >= 2.4/2.4 supported; checkAPIs.pl should be used to verify code.
svn path=/trunk/; revision=25340
2008-05-21 14:27:31 +00:00
Jaap Keuter 1fb551a7ba Clean up PTV cursor documentation.
svn path=/trunk/; revision=25321
2008-05-20 06:28:12 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Jaap Keuter d08a9666b2 From William Pursell:
typos in documentation.

svn path=/trunk/; revision=24719
2008-03-23 09:05:57 +00:00
Stephen Fisher b906bf1708 Fix bug #2382: Typos in README.developer
svn path=/trunk/; revision=24712
2008-03-21 23:41:04 +00:00
Jaap Keuter 0612b830c7 Complete binary tree description with string keys.
Update some entries in developer doc.
Add some preference description in POD.

svn path=/trunk/; revision=24594
2008-03-09 19:48:50 +00:00
Anders Broman e9eb4ce2c2 from Andrew Feren :
Trivial agreement problem in documentation.

svn path=/trunk/; revision=24568
2008-03-05 20:47:36 +00:00
Bill Meier 150fa49c3c Back out useing $Id$; There's a reason for using Date/Author/etc. (Oops)
svn path=/trunk/; revision=24387
2008-02-19 03:44:10 +00:00
Bill Meier b1e58cea59 Fix typo
svn path=/trunk/; revision=24381
2008-02-18 21:07:35 +00:00
Bill Meier 2f9f8d7df8 Fix some some properties
svn path=/trunk/; revision=24380
2008-02-18 21:01:11 +00:00
Stig Bjørlykke f4ad6f2ac0 From Marton Nemeth:
- The "showHex" name cannot be the name paramter. Changing it to "show_hex" should be fine.
- There is also a missing ';' at the end of a line in the example.

This fixes bug 2092.

svn path=/trunk/; revision=23840
2007-12-11 18:39:34 +00:00
Stig Bjørlykke ac3f5f885d From Michael:
Fixed two typos in ReadMe.Developer documentation:
In the example code given, a comment is not properly closed and a semicolon was
missing in variable definition.

This fixes bug 2085.

svn path=/trunk/; revision=23824
2007-12-10 09:22:03 +00:00
Jaap Keuter 73a7469bb1 Update FIELDDESCR with NULL option.
Example code should never show what not to do.

svn path=/trunk/; revision=23779
2007-12-06 08:02:58 +00:00
Stephen Fisher 849e628334 Introduce a new field type called FT_EBCDIC. This field works the same as
FT_STRING, except that it converts the data from the packet from EBCDIC
to ASCII for display in Wireshark.


svn path=/trunk/; revision=23503
2007-11-19 21:27:01 +00:00
Bill Meier c74d7d243a From Andrew Feren: Fix an assortment of typos and other minor errors
svn path=/trunk/; revision=23277
2007-10-26 15:26:04 +00:00
Jeff Morriss 853e791444 Change more fopen() to eth_fopen() to finish fixing bug 1827:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1827

Update README.developer to tell developers not to use fopen() and friends
directly.

svn path=/trunk/; revision=23206
2007-10-16 15:43:18 +00:00
Sake Blok 6a0b11a1dd Update to README.developer describing the use of conversation timestamps
(which was added in SVN 22966 and 23058)


svn path=/trunk/; revision=23169
2007-10-13 07:33:32 +00:00
Jeff Morriss 8ec05eb569 Add a small note saying not to use proto_tree_add_text() in new code unless you have a specific reason (like those given in the next paragraphs).
svn path=/trunk/; revision=23011
2007-09-28 13:39:20 +00:00
Jeff Morriss 7efd1b9a76 Add notes suggesting not to use hidden fields but if you're going to, use PROTO_ITEM_SET_HIDDEN() instead of proto_tree_add_*_hidden(). (I thought that was in here already...) Suggest putting fields-you-want-hidden in subtrees where they can be found by ordinary users.
svn path=/trunk/; revision=23010
2007-09-28 13:33:54 +00:00
Stephen Fisher 5775a1dca8 The dissector packet-dcp.c now fails to compile on MacOS X (gcc 4.0.1/Apple). Change G_INLINE_FUNC back to inline per GLib documentation (also remove recommendation in developer's guide to not use inline):
http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Macros.html#id2571572

G_INLINE_FUNC

#define             G_INLINE_FUNC
This macro is used to export function prototypes so they can be linked with an external version when no inlining is performed. The file which implements the functions should define G_IMPLEMENTS_INLINES before including the headers which contain G_INLINE_FUNC declarations. Since inlining is very compiler-dependent using these macros correctly is very difficult. Their use is strongly discouraged.

This macro is often mistaken for a replacement for the inline keyword; inline is already declared in a portable manner in the glib headers and can be used normally.


svn path=/trunk/; revision=22980
2007-09-26 03:05:42 +00:00
Guy Harris cd4d203af2 Don't use
case N ... M:

as that's not supported by all compilers.

Say so in the Portability section of README.developer, in the hopes of
discouraging others from using that GCCism.

svn path=/trunk/; revision=22976
2007-09-26 00:41:00 +00:00
Jaap Keuter b989e08afd Added remark on anonymous unions.
svn path=/trunk/; revision=22294
2007-07-13 06:28:44 +00:00
Jeff Morriss 25df9f2133 From Guillem Hernandez: fix decoding of EOSP bit. From Jaap Keuter: fix description of 'value' in proto_tree_add_boolean() that caused the former bug.
svn path=/trunk/; revision=22293
2007-07-12 22:36:35 +00:00
Jaap Keuter 29b56573a0 Add a note on how to handle obsolete preferences
svn path=/trunk/; revision=22279
2007-07-09 16:44:30 +00:00
Guy Harris 2c1e75d519 Update to reflect the use of G_GINT64_MODIFIER, rather than PRI[douxX],
with GLib routines and the routines that love them.

svn path=/trunk/; revision=21991
2007-05-29 18:59:50 +00:00
Jeff Morriss a5f4e7b85a Make RX a new style dissector: return 0 if there isn't at least 28 bytes of message or if it receives an unknown Type. Add a check of tvb length to README.developer's cut-n-paste dissector code.
svn path=/trunk/; revision=21300
2007-04-02 08:25:43 +00:00
Ulf Lamping b05d384d71 add a small section, that code should be warning free
svn path=/trunk/; revision=21291
2007-03-31 15:32:06 +00:00
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