Commit Graph

330 Commits

Author SHA1 Message Date
Alexis La Goutte bc5639cdf6 FT_EUI64 need also to specifies encoding !
svn path=/trunk/; revision=39191
2011-09-30 14:26:43 +00:00
Guy Harris f45ade999f Update README.developer to take into account the disappearance of
FT_EBCDIC and the addition of support for character encodings.

svn path=/trunk/; revision=39190
2011-09-29 22:40:32 +00:00
Chris Maynard e69df476e7 Add default modeline settings to the end of the skeleton code.
svn path=/trunk/; revision=39178
2011-09-28 19:40:34 +00:00
Guy Harris 76a2642927 Future tense -> present tense for the encoding argument to
proto_tree_add_item() having more than just a byte order.

svn path=/trunk/; revision=39170
2011-09-27 19:43:54 +00:00
Stig Bjørlykke 5603cef9f2 Remove support for libpcre, we use GRegex in GLib.
svn path=/trunk/; revision=38683
2011-08-23 09:25:06 +00:00
Jörg Mayer 6dace04493 Add instructions how to work with "git svn" instead of "svn"
svn path=/trunk/; revision=38080
2011-07-18 12:44:19 +00:00
Bill Meier f6b5df0c45 Update ptvcursor API description to reflect 'endianness' --> 'encoding' parameter change.
svn path=/trunk/; revision=38048
2011-07-15 17:44:24 +00:00
Gerald Combs 49b92440de More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versions
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove
tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and
reassemble_cleanup() since they were only used for older GLib versions
which didn't support GSlices. Assume we always support the "matches"
operator.

svn path=/trunk/; revision=37978
2011-07-11 20:32:19 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Bill Meier f8ce3da390 Add some info as to the determination of the length of a FT_STRINGZ item.
Add a note not leaving trailing whitespace on a line.

svn path=/trunk/; revision=36434
2011-04-01 20:48:56 +00:00
Jeff Morriss fddb50a582 Document that proto_tree_add_bytes_format() and
proto_tree_add_bytes_format_value() may be given a NULL value_ptr.


svn path=/trunk/; revision=35907
2011-02-10 22:57:50 +00:00
Jeff Morriss 69b78fc118 Document that NTP times can be added with proto_tree_add_item().
svn path=/trunk/; revision=35884
2011-02-09 02:43:10 +00:00
Jaap Keuter a3611f713e Sharpen the description of preference names.
svn path=/trunk/; revision=35671
2011-01-26 21:20:09 +00:00
Jeff Morriss 4eb43096b1 From Alexis La Goutte via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5603 :
Following the discussion on the dev mailing list about ett_ value in subtree
http://www.wireshark.org/lists/wireshark-dev/201101/msg00039.html

a small to update the Readme Developer Guide !

svn path=/trunk/; revision=35610
2011-01-21 17:08:35 +00:00
Chris Maynard 116d67e164 Add tvb_get_[n|le]toh[40|48|56]() accessors. Addresses bug 5082.
svn path=/trunk/; revision=35538
2011-01-14 19:02:38 +00:00
Anders Broman c2cefb1e10 Document and export:
tvb_bcd_dig_to_ep_str();

svn path=/trunk/; revision=35499
2011-01-12 07:25:34 +00:00
Jeff Morriss 0c4e881911 Introduce, and start using, tvb_get_const_stringz(). This function returns a
pointer to a NULL-terminated string in the TVB.  It is no safer than dissectors
which call tvb_get_strsize() and then tvb_get_ptr() but it makes it clear that
this usage of tvb_get_ptr() is safe.

This function is slightly more efficient than tvb_get_ephemeral_stringz()--but
only as long as we're not using composite TVBs.

svn path=/trunk/; revision=35493
2011-01-12 02:25:08 +00:00
Stephen Fisher 1d4c01023b State in the developer documentation that the tvb_fake_unicode() and
tvb_get_ephemeral_fake_unicode() functions have been superceded by
tvb_get_unicode_string() and tvb_get_ephemeral_unicode_string() respectivey.


svn path=/trunk/; revision=35349
2011-01-03 19:37:13 +00:00
Stephen Fisher 159b55ad12 Document new tvb_get_unicode_string() and tvb_get_ephemeral_string()
functions.


svn path=/trunk/; revision=35345
2011-01-03 18:33:02 +00:00
Stephen Fisher 4f5ccc00f8 Introduce new function called tvb_get_ephemeral_unicode_stringz(), which
is a unicode (UTF-16) version of tvb_get_ephemeral_stringz().  It scans
a tvbuff for a UTF-16 string and converts it to UTF-8 upon return.


svn path=/trunk/; revision=35253
2010-12-23 17:59:34 +00:00
Jaap Keuter fc4d25fcc4 Allow for NULL preference descriptions.
svn path=/trunk/; revision=35242
2010-12-22 06:25:33 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier cd5544679a Revert SVN #35214 based upon comments in the Wireshark-dev list.
http://www.wireshark.org/lists/wireshark-dev/201012/msg00206.html

svn path=/trunk/; revision=35218
2010-12-18 17:55:06 +00:00
Bill Meier 160bee8c16 The Styleguide section has been moved to the Wireshark Developer's Guide.
svn path=/trunk/; revision=35214
2010-12-17 20:55:45 +00:00
Bill Meier 2798debd90 Update the "Following Conversations" section to use se_alloc() instead of GMemChunks.
Also: add information about the conversation_set_dissector() function.

svn path=/trunk/; revision=35185
2010-12-14 14:23:27 +00:00
Bill Meier 2041f87240 Add some info about extended value string to section 1.7.1
svn path=/trunk/; revision=34621
2010-10-22 15:00:37 +00:00
Bill Meier 15851701e8 Rework "extended value strings":
- Allow direct access when a range of values begins with a value other than 0;
- Provide value_string_ext_new() for creating extended value strings at runtime;
- Do access to value_string_ext members via a macro (all but value_string.c);
- Update documentation.

svn path=/trunk/; revision=34514
2010-10-14 17:50:35 +00:00
Jeff Morriss 2a0128c258 Document what prefs_register_string_preference() does with your value pointer.
svn path=/trunk/; revision=33873
2010-08-21 03:54:55 +00:00
Bill Meier 432cfde19c Remove an incorrect line of code from the proto_reg_hanoff prototype.
svn path=/trunk/; revision=33790
2010-08-12 20:05:41 +00:00
Guy Harris f0bb5f4c9a Fix grammaro, indent example code.
svn path=/trunk/; revision=33641
2010-07-27 01:19:06 +00:00
Guy Harris 9f4c3409b2 Tell people to be careful about loops like
for (guint8 = 0; guint8 < guint; guint8++)

(one of which recently caused an infinite loop with a fuzzed packet in
the buildbot).

svn path=/trunk/; revision=33639
2010-07-27 01:06:10 +00:00
Stig Bjørlykke c7ed9aa2b8 Update to reflect changes in defines: REP_* > ENC_*
svn path=/trunk/; revision=33286
2010-06-22 11:54:45 +00:00
Guy Harris 7da29cfe69 Put in a warning about the <stdarg.h> problem that I just found and
fixed in one place (and am now fixing in some other places).

svn path=/trunk/; revision=32962
2010-05-26 02:21:23 +00:00
Bill Meier 9bafe20643 Minor rewording; Also: add note to not use "" for a hf[] array blurb.
svn path=/trunk/; revision=32940
2010-05-25 00:00:58 +00:00
Guy Harris 1b444c55fd Refer to the endianness arguments as "encoding" rather than
"representation" - we already use "representation" to refer to the text
representation of fields.

Change some routines with an endianness argument to make it a
representation argument instead; 

svn path=/trunk/; revision=32929
2010-05-24 06:06:17 +00:00
Guy Harris 5e8cbc60d4 Use the new REP_ values for proto_tree_add_item().
svn path=/trunk/; revision=32925
2010-05-24 03:05:19 +00:00
Anders Broman be717625ff Describe values_string_ext.
svn path=/trunk/; revision=32916
2010-05-23 10:00:50 +00:00
Jeff Morriss 37abd28d34 Document find_or_create_conversation()
svn path=/trunk/; revision=32792
2010-05-13 18:57:41 +00:00
Stephen Fisher 63a9ceeb6c Change copyright date in sample dissector code to 201x from 200x for the
new decade.


svn path=/trunk/; revision=32553
2010-04-25 08:23:12 +00:00
Jeff Morriss 6c5201f39a 64-bit integers take the same FIELDDISPLAY as shorter integers
svn path=/trunk/; revision=32551
2010-04-24 14:53:30 +00:00
Bill Meier e635180aeb (Trivial changes)
svn path=/trunk/; revision=32497
2010-04-16 17:28:03 +00:00
Bill Meier e740706aeb Updates:
1. Include stdio.h, stdlib.h and string.h only if needed;
2. Add dissector source filename to epan/CMakeLists.txt as well as 
   epan/Makefile.common.

svn path=/trunk/; revision=32495
2010-04-16 16:37:31 +00:00
Guy Harris fd29d27282 Rename FIELDBASE to FIELDDISPLAY, as it's a "how to display this"
indication, not necessarily a base (the base is "how to display" some
numeric fields, but it's not how to display some other fields).

Note that FIELDDISPLAY is the number of bits in the field containing an
FT_BOOLEAN bitfield.

svn path=/trunk/; revision=32480
2010-04-15 20:54:27 +00:00
Bill Meier b92603b395 Fix a typo
svn path=/trunk/; revision=32475
2010-04-15 19:33:33 +00:00
Guy Harris 500eb99cd9 Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year.  Move the formats
to a "time_fmt.h" file, included by the headers that use it.  Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument.  Document
the ABSOLUTE_TIME_ formats a bit better.  Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.

svn path=/trunk/; revision=32034
2010-02-27 19:01:27 +00:00
Bill Meier f7440d43e4 Add note about not using C99 features.
svn path=/trunk/; revision=31933
2010-02-20 17:36:18 +00:00
Guy Harris 94b8c6433b Rewrite the bit about null vs. non-null "tree" dissector arguments a
bit, so as not to imply that there's some form of global "mode"
Wireshark is in when it passes a null or non-null pointer (there isn't),
and to explicitly note that there is *no* guarantee about the value of
"tree" on the first call to the dissector.  (I.e., please do not build a
mental model of how Wireshark works in that regard, and write your
dissector based on that mental model - you *will* be wrong.)

svn path=/trunk/; revision=31560
2010-01-18 23:21:13 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Guy Harris ed9f7440e3 Clarify that BASE_RANGE_STRING is a flag set in the display field, not
itself a valid value for that field - it should be ORed with a value.

Indicate that it will never be possible to record in a header_field_info
a byte order for all fields, as some protocols do not specify the
endianness of fields (for example, DCE RPC uses "receiver makes it
right", with the sender sending data in its byte order, with an
indication in the packet of what that byte order is).

svn path=/trunk/; revision=31248
2009-12-12 02:33:16 +00:00
Jaap Keuter 6af0e4e002 From Richard Pecl:
Adding prefs_register_protocol_subtree to libwireshark.def

svn path=/trunk/; revision=31246
2009-12-11 17:35:10 +00:00
Guy Harris 0551d2edf8 From Nemeth Marton: in an example of a valid (at least at the C language
level) way to handle passing the result of strlen() to a routine
expecting a int-sized value, mark it as "OK", not "Compiler warning".

svn path=/trunk/; revision=30747
2009-10-28 18:19:54 +00:00
Bill Meier 7b58b17af7 Update: Remove references to the use of check_col() since no longer required.
svn path=/trunk/; revision=29897
2009-09-14 15:28:09 +00:00
Kovarththanan Rajaratnam 49930eff58 We don't use PRId64, PRIu64, PRIx64, PRIX64, and PRIo64 internally in Wireshark, so don't encourage people to use them. Use G_GINT64_FORMAT + friends instead.
svn path=/trunk/; revision=29636
2009-08-31 18:28:10 +00:00
Bill Meier cfde59d509 From dragonlinux AT gmail.com: Fix incorrect location of a right brace;
svn path=/trunk/; revision=29565
2009-08-26 16:39:34 +00:00
Bill Meier 89a44fcd36 Fix a typo
svn path=/trunk/; revision=29241
2009-07-29 23:18:34 +00:00
Stig Bjørlykke 884ef57f1e From Kovarththanan Rajaratnam:
Update to include the new constraints.

svn path=/trunk/; revision=29015
2009-07-08 08:04:30 +00:00
Guy Harris d5289354ab Recommend the expert mechanism, rather than DISSECTOR_ASSERT(), for
checks that really check whether the packet is valid; DISSECTOR_ASSERT()
should only be used for cases where the dissector is making an
assumption about its internal state.

svn path=/trunk/; revision=29006
2009-07-08 00:57:01 +00:00
Anders Broman 568054f777 From Kovarththanan Rajaratnam:
More "Cleanup header_field_info definitions"

svn path=/trunk/; revision=28961
2009-07-06 18:35:05 +00:00
Stig Bjørlykke 9dd57bd754 Use NULL for empty blurb.
svn path=/trunk/; revision=28846
2009-06-26 03:24:08 +00:00
Guy Harris ec5dbeca71 Note that non-ASCII characters in source files cause problems.
svn path=/trunk/; revision=28742
2009-06-15 16:54:07 +00:00
Guy Harris 5dadbecd97 Fix tpyo.
svn path=/trunk/; revision=28708
2009-06-11 17:25:57 +00:00
Stig Bjørlykke 76dfdd6d6f Update the GPL statement used in dissectors.
svn path=/trunk/; revision=28695
2009-06-11 10:29:34 +00:00
Jaap Keuter 8e6cd9ba37 From Reinhard Speyerer:
This patch fixes several misspellings/typos in Wireshark documentation.

svn path=/trunk/; revision=28242
2009-05-02 06:43:24 +00:00
Gerald Combs 31a7e6f676 Add a note about LLP64 portability.
svn path=/trunk/; revision=28080
2009-04-17 20:58:18 +00:00
Gerald Combs 446d43351c Add initial support for string buffers - ep_allocated, growable strings
similar to GLib's GStrings. Use them to create the list of TCP flags.

svn path=/trunk/; revision=27872
2009-03-27 23:05:37 +00:00
Stephen Fisher 1a71ec7c45 Introduce two new functions:
tvb_get_seasonal_string();
  tvb_get_seasonal_stringz();

.. which work the same as the ephemeral versions of the functions, but use
se_alloc() instead of ep_alloc().


svn path=/trunk/; revision=27868
2009-03-27 19:40:23 +00:00
Bill Meier 58f69d7383 Trivial spacing change
svn path=/trunk/; revision=27376
2009-02-05 15:49:52 +00:00
Bill Meier c7450a6a89 Update the description & skeleton code for the use of proto_reg_handoff.
svn path=/trunk/; revision=27239
2009-01-15 16:52:15 +00:00
Stephen Fisher 45ef29a0a8 Wrap "USA." in the address of the FSF onto a new line with a * in front of it.
svn path=/trunk/; revision=26801
2008-11-18 05:15:10 +00:00
Jaap Keuter f1db2a5e83 Update tabsize, re-group bitfield proto_tree functions, extend fieldinfo macro descriptions.
svn path=/trunk/; revision=26667
2008-11-01 14:31:43 +00:00
Bill Meier 6bfb1a0cde Add tvb_bytes_to_str() & tvb_bytes_to_str_punct(); fix a few typos.
svn path=/trunk/; revision=26519
2008-10-23 00:19:58 +00:00
Jaap Keuter 00f08adddb Polish up the proto_tree_add_bitmask() description example.
svn path=/trunk/; revision=26249
2008-09-22 22:15:26 +00:00
Jaap Keuter cc692da997 Fix for bug 2889:
Add description of FT_UINT_BYTES.

svn path=/trunk/; revision=26248
2008-09-22 21:53:44 +00:00
Ulf Lamping e8dedf19b4 compile a document about heuristic dissectors, following:
http://www.wireshark.org/lists/wireshark-dev/200808/msg00234.html

svn path=/trunk/; revision=26146
2008-09-06 11:28:58 +00:00
Bill Meier f2bdbd6a7f Minor rewording; fix a type
svn path=/trunk/; revision=26056
2008-08-22 13:32:25 +00:00
Anders Broman da85c3dfab From Alexey Neyman :
This patch implements a function for dissecting bitfields with better control
over the resulting representation than the existing proto_tree_add_bitmask()
routine. This function will be used by reworked IPMI/ATCA dissector (bug 2048).

The function is described in README.developer. In short, the differences are as
follows:

- The new function does not require a hf_XXX field for the whole bitmask. When
the bitmask includes several unrelated fields, such hf_XXX field does not make
sense.

- The new function allows better control over the way the sub-item descriptions
are added to the top-level item. For example, proto_tree_add_bitmask() function
does not add non-enumerated integers, does not use true_false_string to display
boolean.

- The new function allows to specify "fallback" text for the top-level item
which is used if no items were added to the top-level item.

svn path=/trunk/; revision=25920
2008-08-04 20:41:43 +00:00
Anders Broman 876e751069 From Alexey Neyman :
Implement BASE_CUSTOM display type

svn path=/trunk/; revision=25870
2008-07-30 12:30:02 +00:00
Anders Broman 2e6f9d0dd1 Add information about
tvb_get_bits proto_tree_add_bits_item and proto_tree_add_bits_item_ret_val.

svn path=/trunk/; revision=25866
2008-07-30 10:03:46 +00:00
Jeff Morriss acd338f422 Remove the (long deprecated) proto_tree_add_*_hidden() functions
svn path=/trunk/; revision=25820
2008-07-24 15:35:29 +00:00
Guy Harris 8fa5c9aada Hyphenate "per-packet information".
svn path=/trunk/; revision=25767
2008-07-18 23:44:35 +00:00
Jeff Morriss b54acc9ad7 From Abhik Sarkar via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2661 : fix prototypes of tvb_fake_unicode() and tvb_get_ephemeral_faked_unicode()
svn path=/trunk/; revision=25636
2008-06-30 13:46:34 +00:00
Jaap Keuter 4eb851906f Fix for bug 2612:
cleaned up FT_UINT_STRING type description.

svn path=/trunk/; revision=25459
2008-06-16 05:33:08 +00:00
Bill Meier 007f598798 eth_ --> ws_
svn path=/trunk/; revision=25370
2008-05-23 10:43:04 +00:00
Bill Meier b23ecff0d5 Fix typo
svn path=/trunk/; revision=25346
2008-05-21 19:46:22 +00:00
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