aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-15Lua: Added support for ProtoField framenum type.Stig Bjørlykke1-1/+6
Change-Id: I1d4cddd4026f08416005f2b3212536b3984d1a8d Reviewed-on: https://code.wireshark.org/review/11834 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-02RTPS: added new encoding to proto.c and used it in the rtps dissectorJuanjo Martin1-0/+50
RTPS uses NTP encoding with a BASETIME equal to 0. Also, changed "magic" by "Magic" Change-Id: I2512176f2018396edaa6b2a1478facd26118cb13 Reviewed-on: https://code.wireshark.org/review/11184 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-4/+4
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-20LTE dialogs: tidy up some loose endsMartin Mathieson1-2/+5
Change-Id: I18f099311f7660c91cffdf21bbacdb88b7c0fd7e Reviewed-on: https://code.wireshark.org/review/11182 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-10-15Remove ability to make dissectors "private"Michael Mann1-20/+0
Change-Id: If5897e8137f729503edf2cafb49b2ebeab4716ad Reviewed-on: https://code.wireshark.org/review/10997 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-4/+5
tvb_get_ipv6() takes a struct e_in6_addr *, use that here too. Change-Id: Id8b368daa05c151a61d4bc01dc88c00da13e9c88 Reviewed-on: https://code.wireshark.org/review/10953 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-10-12Add BASE_PT_ types to proto_registrar_dump_fields()João Valverde1-14/+6
Change-Id: Ic6b3d71c3c9a14688b55d98f402d359f69524394 Reviewed-on: https://code.wireshark.org/review/10939 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-12Fix hfinfo_*_format_display() for BASE_PT_ display typesJoão Valverde1-0/+8
Change-Id: I1a2a988a737c6821db6ac3a2b9ee9ff48add28c2 Reviewed-on: https://code.wireshark.org/review/10935 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05Add BASE_PT_ field display typesJoão Valverde1-1/+50
Avoid displaying duplicate port numbers with transport name resolution disabled and make some dissector code simpler. Introduces port_with_resolution_to_str_buf() function and amends UDP/TCP/DCCP/SCTP to use the new field display type. Change-Id: Ifb97810b9c669ccbb1a310a2c0ffd6e2b63af210 Reviewed-on: https://code.wireshark.org/review/10625 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-01Treat IPv4 subnet masks as distinct from addressesJeffrey Smith1-1/+24
While IPv4 subnet masks are obviously related and similar to IPv4 addresses, they are distinct enough that they need to be treated seperately in some aspects. For instance, there is no value in attempting to resolve a subnet mask. This change creates a new display type: BASE_NETMASK, which allows distinction from FT_IPv4 (and possible name resolution) where appropriate. Change-Id: I99e19c9a58eb613f8e58d481af84c30e2e5e14d7 Reviewed-on: https://code.wireshark.org/review/10438 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-23Add a test to verify we pre-allocated enough hf entries.Jeff Morriss1-9/+19
This way we'll know as soon as we drop below the pre-allocated limit. As suggested by Graham on https://code.wireshark.org/review/10601 Change-Id: Ieeb14bdcf991d7a67c30787c97ca24ebb35d1763 Reviewed-on: https://code.wireshark.org/review/10627 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-23Add a "fieldcount" report to tshark -G to let us easily see how many fieldsJeff Morriss1-0/+42
are registered. Change-Id: I06f10d96916640cb9a782cae87898a5dd6c9c6e3 Reviewed-on: https://code.wireshark.org/review/10601 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-23Increase the number of pre-allocated hfs (from 144k to 170k).Jeff Morriss1-1/+1
169756 header fields are currently registered. Including the 5k expert info field pre-allocation this gives us about 5k unused entries (until we should increase this number again). Change-Id: Id8ea979cbe9e80756c12b5b73e816bbe3e9856ad Reviewed-on: https://code.wireshark.org/review/10599 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-21Remove proto_tree_add_text API.Michael Mann1-9/+7
Its time has finally come. Technically I just renamed it to proto_tree_add_text_internal and removed the WS_DLL_PUBLIC (so it shouldn't link outside of epan). It's still (legitimately) used by expert.c otherwise I would have made it static within proto.c (and the rename wouldn't have been necessary). Change-Id: I9bdf888d5e92bc7b70a3f5461b9297a66d994b80 Reviewed-on: https://code.wireshark.org/review/10594 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-09-13Make other_decode_bitfield_value private to proto.c.Michael Mann1-0/+35
This is further encouragement to not try to manually create a bitstring while formatting a field. Change-Id: I4efbeb39a210cf1fd26203cd8560859276b333b0 Reviewed-on: https://code.wireshark.org/review/10494 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-28Speed up column sorting.Gerald Combs1-2/+35
The GTK+ UI sequentially dissects and caches column strings for all rows before sorting a column. Do the same in the Qt UI, which can improve performance considerably. Don't colorize packets when sorting in the Qt UI unless it's necessary. When sorting in the Qt UI, let the user cancel the initial packet dissection. Note that we'll need to replace std::sort in order to cancel out of sorting. Use a pre-allocated and pre-compiled GRexex when we prime columns. Note that we probably shouldn't parse a regular expression there. Cache the last result of proto_registrar_get_byname. Note performance hot spots elsewhere in the code. To do: GeoIP in packet-ip.c is pretty slow. Bug: 11467 Change-Id: Ib34038fee08ef0319261faeffc4eca01e52f4bd3 Reviewed-on: https://code.wireshark.org/review/10275 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-24Fixed typo in hfinfo_remove_from_gpa_name_mapStig Bjørlykke1-2/+2
Change-Id: Ic80fbe9397e50c41fa01ef9147319dd2ac0c0b91 Reviewed-on: https://code.wireshark.org/review/10226 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-24Lua: Support deregister ProtoField with existing abbrevStig Bjørlykke1-1/+24
Change-Id: Icb06792bb2662dcee6e5495359ceef420a5b4498 Reviewed-on: https://code.wireshark.org/review/10212 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-15Lua: Free true_false_string values at reloadStig Bjørlykke1-2/+5
Change-Id: I8ab194bf094e82f08ddafb0a1451aec42989b93d Reviewed-on: https://code.wireshark.org/review/10044 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14Added some missing breaksStig Bjørlykke1-0/+2
Change-Id: I3b2f25832ca878ec3e7f9e4dcce258dc870fc5ad Reviewed-on: https://code.wireshark.org/review/10031 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14Free all hfi->strings in free_deregister_fieldStig Bjørlykke1-13/+33
Change-Id: I6fe78266a2e881fa80e1e3a3423b685d3c1764de Reviewed-on: https://code.wireshark.org/review/10029 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14Free protocol in proto_free_deregistered_fieldsStig Bjørlykke1-11/+7
This fixes some issues with use-after-free when reload Lua plugins. Change-Id: I63f3fd9ebe8a19008f560e72067f2078f5eaf759 Reviewed-on: https://code.wireshark.org/review/10026 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12Added guards for deregistered fieldsStig Bjørlykke1-2/+15
This is functions used when redissecting after a Lua plugins reload. Change-Id: Ida14526faec1992006938a6732ee894ac83c2d12 Reviewed-on: https://code.wireshark.org/review/9995 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11Added Reload Lua plugins.Stig Bjørlykke1-2/+45
This is initial support for reloading Lua plugins without restarting the application. Still todo: - Deregister FileHandlers - Support deregister ProtoField with existing abbrev (same_name_hfinfo) - Add a progress dialog when reloading many plugins - Search for memory leakages in wslua functions Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1 Reviewed-on: https://code.wireshark.org/review/5028 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-02proto.c: exclude hf_text_only from proto_registrar_is_protocol()Pascal Quantin1-1/+1
This pseudo field is a specific case that is not linked to any protocol (despite parent being set to -1). This prevents a crash in Qt GUI when selecting a line added with proto_tree_add_subtree() or similar. Change-Id: I3b1cc2e6c7e71a71898f2ee9a02e9158eccf6fac Reviewed-on: https://code.wireshark.org/review/9845 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-25Fix ptvcursor_add() so it can dissect the last bytes in a TVB again.Jeff Morriss1-1/+1
ptvc->offset has already been incremented by the item length so don't use it as the offset to test_length(); we need to use the original offset. Problem introduced by Idfd258c734e7a946300b2564bebf6e4cb374c8d1 . Change-Id: I0421539bde6e8eb7b5aa3e22dbb0ca8098e88d6f Reviewed-on: https://code.wireshark.org/review/9779 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-23Add test_length to ptvcursor_add so it can do some bounds checking.Michael Mann1-24/+27
Ping-Bug: 11358 Change-Id: Idfd258c734e7a946300b2564bebf6e4cb374c8d1 Reviewed-on: https://code.wireshark.org/review/9655 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-23Add Enabled Protocols dialog for QtMichael Mann1-0/+25
This dialog combines the "protocols" and heuristic dissectors (from GTK) into a single tree view where heuristic dissectors are children of their protocol. Change-Id: I107656afd079c1d1c8a98161b736e4b4ad84f813 Reviewed-on: https://code.wireshark.org/review/9739 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-16Add the RTP Stream Analysis dialog.Gerald Combs1-1/+4
Combine the GTK+ RTP Stream Analysis and RTP Graph Analysis dialogs into one. Yell at the user less. Disable the Analyze RTP Stream menu item if we don't have an RTP stream selected. There are a *lot* of moving parts in this dialog. I've tested with the few RTP captures I have but it's by no means complete. "To do" items are listed at the top of rtp_analysis.cpp. Change-Id: Id503977f069bebc46cc68bc749f0c9cbf4d37bf6 Reviewed-on: https://code.wireshark.org/review/9650 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-02Do not try to display a value_string for FT_FRAMENUM typePascal Quantin1-1/+1
The hfinfo->strings pointer is used to store a ft_framenum_type_t Bug: 11325 Change-Id: Ia6ee1bdd4f1e6ff93907e6107fcecab56c0320de Reviewed-on: https://code.wireshark.org/review/9458 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-01proto.c : fix indentAlexis La Goutte1-1/+1
Change-Id: I74461666bcfc6e85a92409819e2c63811284e8f8 Reviewed-on: https://code.wireshark.org/review/9433 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25Fix proto_tree_add_bytes_item() when we fail to decode number from stringPascal Quantin1-0/+2
We still need to insert an empty g_byte_array Bug: 11309 Change-Id: Idf2ed8ea81b3f612ef8d6ae1aed158108dcc4356 Reviewed-on: https://code.wireshark.org/review/9114 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-23proto_tree_add_item_ret_(u)int: do the NULL check at the startMartin Kaiser1-2/+4
before hfinfo is actually used (coverity 1293631) Change-Id: I270c30c4699cd6f831a38986e6c8024c2e9ef47a Reviewed-on: https://code.wireshark.org/review/9061 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-04[MSVC 2015] Try to fix warinings turned errors.Anders1-1/+1
Change-Id: Ife5aba55d6953fbd3874095f2e469a844ca8ef2e Reviewed-on: https://code.wireshark.org/review/8762 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-11proto: use correct mask when checking displayEvan Huus1-24/+24
Otherwise numeric fields with BASE_EXT_STRING don't match anything and cause an assertion failure. Also fix indentation. Change-Id: I2708be50a6c5aff5400ec44e6a141db39d2d94e7 Reviewed-on: https://code.wireshark.org/review/8391 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-04-30Make bit masks unsigned.Guy Harris1-4/+4
To quote a run-time error reported in https://www.wireshark.org/lists/wireshark-dev/201504/msg00084.html "left shift of 1 by 31 places cannot be represented in type 'int'", so use type "unsigned int" instead, by shifting 1U rather than 1 left. Change-Id: I95cf5ce53aa3b94ccb9f246d31863715bb682409 Reviewed-on: https://code.wireshark.org/review/8252 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20The previous change doesn't work; do it right.Guy Harris1-1/+18
The correct bit has to be set in the value passed in; create a proto_tree_add_boolean64() that takes a 64-bit argument and use that. Change-Id: I28eaab38308baa908bdc1b043b2f0b87a17afe0d Reviewed-on: https://code.wireshark.org/review/8131 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-20Make sure we handle Booleans even with the upper 32 bits set.Guy Harris1-1/+1
Just pass 1 or 0 to proto_tree_add_boolean() depending on whether the 64-bit value is non-zero or zero. Change-Id: I5b55c9aff4e559fb8e62bd96ae2b0b34e45189fa Reviewed-on: https://code.wireshark.org/review/8129 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-19Don't use proto_tree_add_uint() to add FT_BOOLEAN values.Guy Harris1-3/+31
In proto_item_add_bitmask_tree(), if use_value is true, base the routine we use to add the item to the tree on the type of the field being added. Also, use DISSECTOR_ASSERT_NOT_REACHED(), not g_assert_not_reached(), to catch types that aren't integral or Boolean. Change-Id: I6ff9867bddcae16ddf8b689b48fdc93c6f949105 Reviewed-on: https://code.wireshark.org/review/8127 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-13Add more "bitmask grouping" APIs.Michael Mann1-31/+77
Add proto_tree_add_bitmask_value, proto_tree_add_bitmask_value_with_flags and proto_tree_add_bitmask_list to aid in the removal of proto_tree_add_boolean "groupings" as well as "groups" of fields that use proto_tree_add_item with the same offset/len. This may be able to be optimized later, but the first step will be converting dissectors to use it. A sample conversion of each API is also included. Change-Id: I53febc7450ad632482f82615a7fa62174f8472c9 Reviewed-on: https://code.wireshark.org/review/8038 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-09Replace PROTO_TREE_ADD_XXX_ITEM macro use with real code.Michael Mann1-40/+63
PROTO_TREE_ADD_XXX_ITEM had a bug in it for int values. This was fixed by adding proto_tree_set_ ## ctype ## to the macro, but not all compilers support macros at the end of a function, so just remove the macro entirely and just have the duplicate code. Change-Id: Icf92a6786daa0e84305ba174ce155833f90b6463 Reviewed-on: https://code.wireshark.org/review/8006 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-09Correct macro expansion in PROTO_TREE_ADD_XXX_ITEM for integer fields.Michael Mann1-1/+1
Change-Id: I57e5dcfabc1c1b4c024b9e1cbfd8b9a34c79c330 Reviewed-on: https://code.wireshark.org/review/8003 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-02Fixup our anonsvn URLs.Gerald Combs1-1/+1
Change-Id: Id18d392bf7ff948fc78b684d8222c5c3725d302a Reviewed-on: https://code.wireshark.org/review/7886 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19Implement proto_tree_add_item_ret_int() and proto_tree_add_item_ret_uint() whichAndersBroman1-0/+79
works as proto_tree_add_item(), but also returns the value of (u)ints of 8,16,24 and 32 bits length in a 32 bit variable. It's based on Hadriels previous work. Change-Id: If3b4b8588b63251f1ee9b954a202acde7c02ce86 Reviewed-on: https://code.wireshark.org/review/7230 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-19Eliminate decode_bitfield_value from "public" use.Michael Mann1-0/+11
This "encourages" (forces) dissectors to use the bitmask field of the header_field_info structure to get "bitmask formatting" of a field. other_decode_bitfield_value should be treated the same (eventually eliminated), but there are still replacements to be made in the dissectors. Change-Id: I8a0d829c3fef2d5e5a588667a259e231bca559e6 Reviewed-on: https://code.wireshark.org/review/7736 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-05Qt: Add extra related packet indicator types.Gerald Combs1-3/+4
Add the ability to set frame number types: none, request, or response. Use the types to draw different related packet indicators in the packet list. Track the conversation in PacketListRecord. Use it to draw dashed lines for unrelated frames. Set frame number types for DNS and ICMP. Instead of drawing a transparent QImage, alpha blend our foreground color and draw directly in our painter. Blend more toward the foreground color. Add FRAMENUM_TYPE to checkAPIs. Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214 Reviewed-on: https://code.wireshark.org/review/7436 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24proto.c: avoid corrupting stack when printing a 64 bits field in ↵Pascal Quantin1-13/+13
BASE_DEC_HEX or BASE_HEX_DEC format Bug: 10994 Change-Id: Id5049054d5b04838df325f03a6bfa238a2063fb7 Reviewed-on: https://code.wireshark.org/review/7329 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-22Make FT_{U}INT{40,48,56,64} handle BASE_CUSTOM.Guy Harris1-85/+23
Finish the job of handling integral values > 32 bits similarly to who we handle values 32 bits or less. In cases that "should not happen", and where we might *not* be executing in the context of a dissector (filling in the field label can be done lazily, being deferred to "print" time, and that doesn't happen in the context of a dissector), use g_assert_not_reached() rather than DISSECTOR_ASSERT_NOT_REACHED() - the latter throws an assertion that's not caught if we're not doing dissection, so we crash anyway. Bug: 10983 Change-Id: Ia81a0a4925394f99aa35193a333f3e9659a9b93d Reviewed-on: https://code.wireshark.org/review/7307 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22Set 64-bit signed values with proto_tree_set_int64().Guy Harris1-1/+1
As in "don't set it with proto_tree_set_uint64(), signed vs. unsigned matters". Change-Id: I23ef3d172fa40c0867dfb6a078ce292bd5282170 Reviewed-on: https://code.wireshark.org/review/7306 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22Fetch values appropriately according to the value's type.Guy Harris1-4/+5
This fixes some crashes. Change-Id: I47583777486486114675ba98cb58971adb8b1b10 Reviewed-on: https://code.wireshark.org/review/7305 Reviewed-by: Guy Harris <guy@alum.mit.edu>