aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-20From Sylvain Munaut:Anders Broman1-0/+28
Add support for signed types in _proto_tree_add_bits_ret_val https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6363 svn path=/trunk/; revision=39060
2011-09-16From Sylvain Munaut:Anders Broman1-38/+12
proto: Use fill_label_xxx helpers in _proto_tree_add_bits_ret_val https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6329 svn path=/trunk/; revision=39026
2011-07-05Add some additional routine variants that handle string encodings, andGuy Harris1-51/+19
make FT_STRING and FT_UINT_STRING handle string encodings. Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC. Add some URLs for DRDA. Clean up some stuff in TN3270 and TN5250, including using ENC_ values for proto_tree_add_item(). svn path=/trunk/; revision=37909
2011-07-03Add ENC_ values for UTF-8 and EBCDIC, support them for FT_STRINGZGuy Harris1-1/+8
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-06-25Make guy's fix in revision 37236 actually work:Stig Bjørlykke1-1/+1
"You cannot just make the "len" field of a GByteArray larger, if there's no data to back that length; you can only make it smaller." Two equal values are always equal! This fixes bug 5941. svn path=/trunk/; revision=37783
2011-06-19Make creating a display filter from a custom column defined as integer withStig Bjørlykke1-12/+20
strings and BASE_NONE equal to selecting the filter from the tree entry. svn path=/trunk/; revision=37720
2011-06-19Handle BASE_NONE as BASE_DEC for filter expression in custom columns.Stig Bjørlykke1-0/+1
This fixes bug 6035. svn path=/trunk/; revision=37705
2011-06-16Squelch some compiler warnings.Guy Harris1-3/+6
svn path=/trunk/; revision=37685
2011-06-07Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warningsBill Meier1-3/+1
svn path=/trunk/; revision=37600
2011-05-27Make TVBs opaque for most users.Jeff Morriss1-10/+10
Convert TVB_RAW_OFFSET() and TVB_GET_DS_TVB() into functions. svn path=/trunk/; revision=37422
2011-05-19Add a check that (plain) value_strings that are used in hf items don't haveMartin Mathieson1-0/+48
any conflicting entries. i.e. lots of value_strings have repeated items, but for now only warn for cases where the same numeric value appears with a different string. Because this will slow down startup and output distracting warnings, it has been #if 0'd out for now. As discussed on the dev mailing list, it'd be good to create a #define for developer/non-release builds so that tests such as this can regularly be run. svn path=/trunk/; revision=37274
2011-05-18You cannot just make the "len" field of a GByteArray larger, if there'sGuy Harris1-1/+6
no data to back that length; you can only make it smaller. svn path=/trunk/; revision=37236
2011-05-18Make some more routines not used outside epan/proto.c static.Guy Harris1-3/+3
svn path=/trunk/; revision=37235
2011-05-09Convert SLAB_-s, to sl_-API.Jakub Zawadzki1-13/+16
svn path=/trunk/; revision=37030
2011-05-08Add FT_EUI64 Field TypeAlexis La Goutte1-3/+110
* 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-11Use g_strlcpy() instead of prohibited strncpy() to guarantee NULL-termination.Chris Maynard1-1/+1
svn path=/trunk/; revision=36553
2011-04-10strcpy -> strncpy.Stig Bjørlykke1-1/+1
Coverity 669. svn path=/trunk/; revision=36543
2011-03-29Guard against NULL return from find_protocol_by_id().Stig Bjørlykke1-0/+3
svn path=/trunk/; revision=36393
2011-03-28Don't use prohibited strncpy(). In this case, use g_strlcat() instead.Chris Maynard1-6/+1
svn path=/trunk/; revision=36382
2011-03-26Added a FALLTHRU comment to avoid a coverity warning.Stig Bjørlykke1-0/+1
Coverity 480. svn path=/trunk/; revision=36350
2011-03-20Clean up indentation.Guy Harris1-7/+7
svn path=/trunk/; revision=36213
2011-02-10Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()Jeff Morriss1-2/+14
so that if the start_ptr is NULL the bytes are extracted from the given TVB using the given offset and length. Replace a bunch of: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...]) with: proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...]) svn path=/trunk/; revision=35896
2011-02-08Add support for 4-byte NTP times (only the seconds) in proto_tree_add_item().Jeff Morriss1-18/+27
Use it in packet-diameter.c . Eliminate an unnecessary local variable. svn path=/trunk/; revision=35875
2011-02-07For FT_{ABSOLUTE,RELATIVE}_TIME, make the rest of the encodingGuy Harris1-20/+180
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-21/+28
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
2011-02-04Fix Bug 5500 - failed assertion in ISAKMP dissector (proto.c:4002) Anders Broman1-0/+9
By reinseringt the check in proto_tree_move_item() if tree vissible removed in http://anonsvn.wireshark.org/viewvc?view=rev&revision=32443 Hopefully not breaking tshark again. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5500 svn path=/trunk/; revision=35817
2011-01-02Fix indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=35329
2010-11-14'tshark -G values' - Validate (somewhat) value_string_ext before use to ↵Bill Meier1-0/+4
prevent a crash. svn path=/trunk/; revision=34869
2010-11-12Enhance 'tshark -G values': Add info about extended value strings (including ↵Bill Meier1-9/+31
acess method). svn path=/trunk/; revision=34854
2010-11-12Use val_to_str_const & val_to_str_ext_const where appropriate.Bill Meier1-10/+10
svn path=/trunk/; revision=34850
2010-10-14Rework "extended value strings":Bill Meier1-1/+1
- 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-14Support multiple header fields with the same abbreviation in custom columns.Stig Bjørlykke1-11/+47
We have some different fields using the same abbreviation (e.g "eth.dst" used in both eth and tte), and this patch will fetch values from all fields. When using occurrences the entries listed first is from the field registered last when starting Wireshark, and not ordered from the occurrence in the packet, but I don't see how we can easily fix this. svn path=/trunk/; revision=34513
2010-10-14Fix crash for 'tshark -G values' when printing "extended value string" value.Bill Meier1-1/+1
Fixes bug #5296 [ https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5296 ] svn path=/trunk/; revision=34507
2010-09-25Fix the output of columns with "show resolved" disabled when all occurrences ↵Sake Blok1-67/+68
are displayed. Limit the input field for occurrence to 4 characters to prevent an overflow. Make sure "... as filter" does not result in an invalid filter string if all occurrences are displayed. svn path=/trunk/; revision=34247
2010-09-23Add some more casts.Jeff Morriss1-8/+8
svn path=/trunk/; revision=34208
2010-09-23Revert 34191 and add some casts insteadJeff Morriss1-18/+17
svn path=/trunk/; revision=34193
2010-09-23Use gsize (size_t) in a couple of places to make the Win64 build happy.Jeff Morriss1-7/+8
svn path=/trunk/; revision=34191
2010-09-22Make buildbot happy again...Sake Blok1-1/+1
svn path=/trunk/; revision=34189
2010-09-22When using a custom column, make it possible to select which occurrence to ↵Sake Blok1-168/+203
show if the field has multiple occurrences. svn path=/trunk/; revision=34186
2010-09-08Allow for proto_tree_add_item() with FT_ABSOLUTE_TIME and FT_RELATIVE_TIMEStig Bjørlykke1-3/+9
to have length == 4 (only seconds). svn path=/trunk/; revision=34078
2010-08-18Fix indentation.Anders Broman1-3/+3
svn path=/trunk/; revision=33838
2010-08-14Added proto_item_prepend_text().Stig Bjørlykke1-0/+41
svn path=/trunk/; revision=33800
2010-07-21Fixed adding a boolean value as a custom column.Stig Bjørlykke1-1/+4
This is reported in bug 5039. svn path=/trunk/; revision=33602
2010-06-25Enable "Show Resolved" for custom OID columns.Stig Bjørlykke1-0/+8
svn path=/trunk/; revision=33320
2010-06-24Ensure we use the numeric value when creating a filter from a custom columnStig Bjørlykke1-6/+89
entry displaying a integer value. The resolved string can contain a space, and our routines does not quote integer values, and A DEC_HEX/HEX_DEC combination will never match. svn path=/trunk/; revision=33315
2010-06-22Update to reflect changes in defines: REP_* > ENC_*Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=33286
2010-05-29Increase the base size to 100 000 we are using more than that.Anders Broman1-2/+2
svn path=/trunk/; revision=33020
2010-05-26proto_registrar_dump_fields: output "" for blurb if blurb is a zero-length ↵Bill Meier1-0/+2
string. svn path=/trunk/; revision=32975
2010-05-26More <stdarg.h> cleanup; some are real bugs, some are just "don't doGuy Harris1-5/+7
va_start and va_end unless you're actually going to use the va_list" (those bring the va_start and va_end closer to the use point, which makes it a little more obvious that we're using <stdarg.h> correctly and makes it a little harder to use it incorrectly). svn path=/trunk/; revision=32963
2010-05-24Refer to the endianness arguments as "encoding" rather thanGuy Harris1-43/+112
"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