aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
AgeCommit message (Collapse)AuthorFilesLines
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
2010-02-27Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with theGuy Harris1-8/+3
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-01-25Changed from using own defined GNUC_FORMAT_CHECK to G_GNUC_PRINTFStig Bjørlykke1-43/+42
defined in GLib. Removed epan/gnuc_format_check.h. svn path=/trunk/; revision=31657
2010-01-23Add _format_value variants of the proto_tree_add_bits functionGerasimos Dimitriadis1-0/+64
for different header field types; now possible to add bits item for FT_FLOAT and FT_INT types. svn path=/trunk/; revision=31633
2010-01-19Fix a double-free bug which was causing a crash. Our decryption bufferGerald Combs1-2/+2
length doesn't change, so allocate it just once. Add an expert item for a successful decryption. svn path=/trunk/; revision=31571
2009-12-19For fields of type FT_ABSOLUTE_TIME, have the "display" value be one ofGuy Harris1-0/+9
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-18Added expert info group PI_PROTOCOL.Stig Bjørlykke1-1/+3
svn path=/trunk/; revision=31308
2009-12-12Rename BASE_STRUCTURE_RESET to BASE_DISPLAY_E_MASK, to clarify that it'sGuy Harris1-12/+20
a mask to select the base_display_e value from a display field in a header_field_info structure. Never select that value by masking out the BASE_RANGE_STRING flag bit, as that won't continue to work if more flag bits, or other bitfields, are added. Instead, mask with BASE_DISPLAY_E_MASK. Note that the base_display_e value and BASE_RANGE_STRING flag are only for integral field types, and clarify what BASE_DISPLAY_E_MASK is. Give at least one of the reasons why hiding protocol fields is not considered a good idea. svn path=/trunk/; revision=31249
2009-11-21Don't rely on G_STMTKovarththanan Rajaratnam1-16/+16
svn path=/trunk/; revision=31042
2009-11-21Rewrite macros to not use ternary operatorKovarththanan Rajaratnam1-4/+17
svn path=/trunk/; revision=31041
2009-10-20Make sure no one calls PROTO_ITEM_SET_*(proto_tree_add_*) by forcing a ↵Jeff Morriss1-2/+2
compile error if they do. svn path=/trunk/; revision=30645
2009-09-30Rename hfinfo.ref_count to hfinfo.ref_type since that's now how it's used.Bill Meier1-26/+26
svn path=/trunk/; revision=30216
2009-09-08From : Didier GautheronAnders Broman1-2/+2
speed up a little proto_custom_set. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3972 svn path=/trunk/; revision=29789
2009-09-06Introduce TRY_TO_FAKE_THIS_REPR which is an optimization similar to the ↵Kovarththanan Rajaratnam1-16/+16
existing TRY_TO_FAKE_THIS_ITEM. The purpose of TRY_TO_FAKE_THIS_REPR is to avoid generating the string representation for the protocol item. There is no point in doing this if the protocol tree isn't visible. In this case the result will be discarded any way. svn path=/trunk/; revision=29731
2009-09-06The frame dissector disables the TRY_TO_FAKE_THIS_ITEM() optimization by ↵Kovarththanan Rajaratnam1-2/+3
marking the protocol tree as permamently visible. It only needs to disable the optimization temporarily while it creates the protocol item it intends to use proto_item_append_string() on svn path=/trunk/; revision=29730
2009-08-25Add missing semicolon.Martin Mathieson1-1/+1
svn path=/trunk/; revision=29553
2009-08-25From Didier Gautheron:Anders Broman1-0/+11
move custom col set from proto_tree_set_xxx() to epan_dissect_fill_in_columns(). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3930 I'v added the new functions to the .h files. svn path=/trunk/; revision=29551
2009-08-21Also fake empty field_info's by gracefully handling NULL field_info pointer ↵Kovarththanan Rajaratnam1-3/+2
elsewhere. svn path=/trunk/; revision=29490
2009-08-11TRY_TO_FAKE_THIS_ITEM now fakes FT_PROTOCOL per default. If there are any ↵Kovarththanan Rajaratnam1-0/+7
users (e.g. proto_hier_stats.c, others?) that relies on FT_PROTOCOL nodes being created they'll now need to call the newly introduced epan_dissect_fake_protocols() to disable this optimization. Also make use of TRY_TO_FAKE_THIS_ITEM in proto_tree_add_text_node(), proto_tree_add_none_format() and proto_tree_add_protocol_format(). svn path=/trunk/; revision=29380
2009-08-09Use PITEM_FINFO.Kovarththanan Rajaratnam1-6/+6
svn path=/trunk/; revision=29357