aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
AgeCommit message (Collapse)AuthorFilesLines
2012-05-14Get rid of remaining Booleans-as-encoding-arguments inGuy Harris1-8/+10
proto_tree_add_item() calls. Add new "add_packet_field" method to the TreeItem class, taking a protocol field (*not* a protocol), TvbRange, and encoding value as arguments. Add the ENC_ values to init.lua. Make them all hex #defines so make-init-lua.pl can easily extract them. Export tvb_unicode_strsize() for use by Lua (and elsewhere as desired). Note that it handles UTF-16 and UTF-8, and fix the comment to note that its count of hexadectets *does* include the null terminator (that's what the code does). svn path=/trunk/; revision=42621
2012-05-11Add ENC_UTF_16 and ENC_UCS_2. Note that UTF-16 and UCS-2 are not theGuy Harris1-24/+26
same, and that the routines to get "Unicode" strings are really doing UCS-2 (and not doing anything about code values that aren't valid in UCS-2 strings). Have tvb_get_ephemeral_string_enc() separate cases for ASCII and UTF-8, even though they're *currently* treated the same. For FT_UINT_STRING, treat an encoding value of TRUE as meaning "little-endian ASCII"; pass all other encodings through to tvb_get_ephemeral_string_enc(). svn path=/trunk/; revision=42592
2012-05-11proto_registrar_get_ftype() returns an FT_ value; make its return typeGuy Harris1-1/+1
"enum ftenum" to reflect that, and fix the "switch doesn't handle XXX" warnings that provokes. svn path=/trunk/; revision=42579
2012-05-04From Jakub Zawadzki: Use custom model in Filter Expression dialog.Anders Broman1-0/+1
svn path=/trunk/; revision=42411
2012-04-19From Evan Huus: Add DISSECTOR_ASSERT_HINT() macro ↵Anders Broman1-0/+17
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7142 svn path=/trunk/; revision=42137
2012-04-04Make bit_offset in _tvb_get_bits64 and related functions unsigned. ThisGerald Combs1-12/+12
removes a potential buffer overflow and should fix a bunch of Coverity errors mentioned in bug 6878. We might want to do the same for no_of_bits. svn path=/trunk/; revision=41945
2012-03-02Use the expert system to show packet comments.Anders Broman1-1/+3
The packet comment widget should be replaced by a ListView with two columns, packet no and Comment. svn path=/trunk/; revision=41322
2012-03-01From Mike Morrin: A small patch to correct the name of the function ↵Anders Broman1-2/+4
proto_tree_add_split_bits_item_ret_val() svn path=/trunk/; revision=41255
2012-02-29From Mike Morrin:Anders Broman1-0/+52
The attached patches add the ability to dissect split bit-strings as discussed under bug 6797. proto_tree_add_split_bits_ret_val() proto_tree_add_split_bits_crumb() svn path=/trunk/; revision=41246
2011-12-27Add a "-G ftypes" option, which dumps our supprted FT_… names andGerald Combs1-0/+3
descriptions. Captitalize and fix up the descriptions. Use its output to create the field type list in the wireshark-filter man page. svn path=/trunk/; revision=40306
2011-11-17(Trivial) remove an extra blank line.Bill Meier1-1/+0
svn path=/trunk/; revision=39909
2011-11-16Move FI_RESET_FLAG and PROTO_ITEM_SET_VISIBLE macros to proto.h and fix the ↵Chris Maynard1-1/+14
FI_RESET_FLAG macro, being sure to use the 1's complement operator, '~', instead of the logical negation operator, '!'. (Fixes Coverity CID 1326). svn path=/trunk/; revision=39888
2011-10-24Convert proto_tree_add_bitmask(), proto_tree_add_bitmask_text(), ↵Bill Meier1-4/+4
proto_tree_add_bitmask_tree() to have 'encoding' arg rather than 'little_endian' arg svn path=/trunk/; revision=39538
2011-10-18Note some character encodings that can probably be used Real Soon Now,Guy Harris1-0/+19
and the dissectors that deal with them. svn path=/trunk/; revision=39456
2011-10-05Some minor documentation changes: little_endian -> encoding. Also, fully ↵Chris Maynard1-6/+5
parenthesize FI_BITS_OFFSET, FI_BITS_SIZE, and FI_GET_FLAG macro arguments. svn path=/trunk/; revision=39273
2011-10-04Add proto_unregister_field().Stig Bjørlykke1-0/+6
This can be used to unregister fields registered in dissector UAT's. svn path=/trunk/; revision=39248
2011-09-27In proto_tree_add_bits... use const guint encoding to be consistent with ↵Anders Broman1-2/+2
proto_tree_add_item(). svn path=/trunk/; revision=39163
2011-09-20Add an ENC_ASCII; right now, it's the same as ENC_UTF_8, but it shouldGuy Harris1-1/+12
eventually cause all bytes with the 8th bit set to be displayed as error indications. svn path=/trunk/; revision=39064
2011-07-11More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versionsGerald Combs1-1/+0
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-03Add a tvb_get_ephemeral_string_enc() routine that's likeGuy Harris1-9/+10
tvb_get_ephemeral_string() but takes an ENC_ value for the character encoding. Use it in the MQ dissector to fetch strings to put, for example, into the Info column, so we properly handle EBCDIC strings there. svn path=/trunk/; revision=37876
2011-07-03Add ENC_ values for UTF-8 and EBCDIC, support them for FT_STRINGZGuy Harris1-0/+21
values, and use them in the MQ dissector, so EBCDIC strings are displayed as such. Fix up some other final arguments to proto_tree_add_item(). svn path=/trunk/; revision=37872
2011-05-08Add FT_EUI64 Field TypeAlexis La Goutte1-0/+45
* 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-04-22As suggested by Jakub Zawadzki:Jeff Morriss1-8/+2
Rename g_gnuc_malloc.h to g_gnuc.h (since it contains non-malloc related GNUC stuff). Use G_GNUC_WARN_UNUSED_RESULT from glib instead of using warn_unused_result directly. svn path=/trunk/; revision=36825
2011-04-22Fix whitespace a bit and add field names from doc/README.developer toStephen Fisher1-7/+7
comments such as FIELDNAME, FIELDABBREV, etc. svn path=/trunk/; revision=36817
2011-04-22If we're using GNUC, use attribute warn_unused_result to verify that theJeff Morriss1-2/+7
return value of proto_item_add_subtree() is used. (The WARN_IF_UNUSED macro doesn't belong here... But where should it go?) svn path=/trunk/; revision=36812
2011-02-17Add a hint for Visual C++ to DISSECTOR_ASSERT. Hopefully this willGerald Combs1-1/+14
reduce some of the /analyze false positives. svn path=/trunk/; revision=35990
2011-02-07For FT_{ABSOLUTE,RELATIVE}_TIME, make the rest of the encodingGuy Harris1-6/+9
orthogonal to the byte order. This means that we can't just test for a non-zero encoding to determine whether the format is big-endian or little-endian when we set the field's endianness flag; instead, for the types where we accept any non-zero value as meaning "litle-endian", map it to ENC_LITTLE_ENDIAN. When we use ENC_TIME_NTP, OR in the byte order flag. While we're at it, in the dissectors that used ENC_TIME_NTP, update all the other encoding items in proto_tree_add_item() calls to use the appropriate ENC_ value. svn path=/trunk/; revision=35841
2011-02-07Add support for passing NTP times to proto_tree_add_item() by specifyingJeff Morriss1-0/+7
an encoding of ENC_TIME_NTP. This increases the number of decimal places shown for NTP times (from 6 to 9), so round the value to the nearest microsecond. (I can't tell if NTP times are ever more precise than a microsecond--this rounding is mainly to be closer to the old behavior.) Use proto_tree_add_item() for some NTP times. svn path=/trunk/; revision=35840
2010-10-11Add comments indicating that the DISSECTOR_ASSERT() routines should not be ↵Jeff Morriss1-0/+9
used to report malformed packets. svn path=/trunk/; revision=34466
2010-09-23Revert 34191 and add some casts insteadJeff Morriss1-3/+3
svn path=/trunk/; revision=34193
2010-09-23Use gsize (size_t) in a couple of places to make the Win64 build happy.Jeff Morriss1-4/+4
svn path=/trunk/; revision=34191
2010-09-22When using a custom column, make it possible to select which occurrence to ↵Sake Blok1-0/+2
show if the field has multiple occurrences. svn path=/trunk/; revision=34186
2010-08-29Doxygen changes.Anders Broman1-2/+2
svn path=/trunk/; revision=33990
2010-08-28Doxygen changes.Anders Broman1-18/+19
svn path=/trunk/; revision=33981
2010-08-26Fix doxygen errors.Anders Broman1-9/+12
svn path=/trunk/; revision=33938
2010-08-14Added proto_item_prepend_text().Stig Bjørlykke1-0/+7
svn path=/trunk/; revision=33800
2010-05-26Expert severity was still overlapping with bits length, so separate them.Martin Mathieson1-5/+5
svn path=/trunk/; revision=32974
2010-05-25Re-organise which FI bits are used to store expert severity and event info, ↵Martin Mathieson1-16/+17
in order to avoid clash with bit offset and length as added in 4413 (Improve bitview display). The event info values were (mostly) done as though they were flags rather than values, but as it doesn't really make sense to combine events I changed them to use contiguous values. They now use the 8 m.s. bits, so there are now 9 unused bits available for new uses. svn path=/trunk/; revision=32945
2010-05-24Refer to the endianness arguments as "encoding" rather thanGuy Harris1-16/+16
"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-13Create a new REP_NA value for fields where there are no representationsGuy Harris1-0/+8
from which to choose; use that for protocol fields in some protocols (modify the CORBA generator to use it, and manually update the generated CORBA dissectors accordingly). svn path=/trunk/; revision=32777
2010-05-12Add REP_{BIG,LITTLE}_ENDIAN #defines, for possible future use inGuy Harris1-0/+51
proto_tree_add_item() and field definitions, and for current use if somebody finds it more self-documenting (some dissectors already have their own #defines for that purpose). svn path=/trunk/; revision=32775
2010-05-02From Jakub Zawadzki:Anders Broman1-0/+8
Fix copy&paste error + add support for proto_tree_add_bits API https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4413 svn path=/trunk/; revision=32634
2010-04-27From Jakub Zawadzki:Anders Broman1-4/+0
- use function pointers instead of switch. - initalize ->match_type during first use of match_str() func. svn path=/trunk/; revision=32576
2010-04-27From Jakub Zawadzki:Anders Broman1-0/+5
Itroduce value_string_ext for faster value matching in value_strings. svn path=/trunk/; revision=32574
2010-04-20From Jakub Zawadzki:Anders Broman1-0/+5
Add support for multi byte entries. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4413 svn path=/trunk/; revision=32525
2010-04-15Revise comment on use of 'display' field in hf[] entry to showBill Meier1-1/+1
that for FT_BOOLEAN the display field contains the bit-field width only when hf[] entry bitmask is non-zero. svn path=/trunk/; revision=32476
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-51/+51
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-50/+50
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-50/+50
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2010-03-15Fix for bug 4565:Jaap Keuter1-1/+1
As a true 'pseudo' GLib function, act benign when presented a NULL pointer. svn path=/trunk/; revision=32193