aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-22Add Zigbee encoding, ENC_ZIGBEEMichael Mann1-14/+21
Add the "special handling" of length = 0xFF for single byte or 0xFFFF for uint16 value means size of field to follow is 0. Ping-Bug: 14138 Change-Id: I0baa40f63152b9420a6569ca6cc5eba638fbc790 Reviewed-on: https://code.wireshark.org/review/24428 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Craig Jackson <cejackson51@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-08proto.c: fix field display test in hfinfo_number_value_format_display64()Pascal Quantin1-21/+21
While we are at it, let's use the FIELD_DISPLAY() macro everywhere. Bug: 14169 Change-Id: I685cb7eb4b9c52f836762c92baeb636570a6d12f Reviewed-on: https://code.wireshark.org/review/24285 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2017-11-06Fix white space.Guy Harris1-1/+1
Change-Id: I8a50391dcfb113c251f24f64486828d5d8a1d0c0 Reviewed-on: https://code.wireshark.org/review/24260 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-05Remove epan win32 x86 assemblyJoão Valverde1-30/+22
Not used. Remove also weird pre-hash hash optimization in proto.c. Change-Id: Ibebc12dbe90ac1d05fb1ba601d32fe98797fbd56 Reviewed-on: https://code.wireshark.org/review/24254 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-30Make FT_IPv4 a bit more like FT_IPv6.Guy Harris1-11/+7
FT_IPv6 doesn't expose the prefix, which is used only for values in filter expressions, not values in protocol fields; do the same for FT_IPv4, hiding the netmask, and using fvalue_get_integer() to get the value, having it return a network-byte-order value for the address. (This also makes it opaque whether the address and netmask are stored in host or network byte order.) Change-Id: I4285a87f6ccef2c0ccec040490ddcd15d787326e Reviewed-on: https://code.wireshark.org/review/24177 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-30Get rid of ipv4_get_net_order_addr() and ipv4_get_host_order_addr().Guy Harris1-2/+2
Just directly use the addr field, converting from host to network byte order if necessary. Change-Id: Ie1cd9ea5527b7824014dc315225ad2a6adb61c38 Reviewed-on: https://code.wireshark.org/review/24176 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-28MOAR PRE-ALLOCATED FIELDS.Guy Harris1-1/+1
Do what the errors in the master buildbots say to do. Change-Id: I2b926bd9a75a1490390c42b8080f29e48096a3b4 Reviewed-on: https://code.wireshark.org/review/24143 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26proto.c: do not set an item length longer that the remaining tvb lengthPascal Quantin1-3/+9
Ping-Bug: 14128 Change-Id: Iae5cb2f85d5d2fa3f2b6051aa57390a3f73d724a Reviewed-on: https://code.wireshark.org/review/24087 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-26proto.c: protect against buffer overflow in proto_find_undecoded_data()Pascal Quantin1-6/+12
Bug: 14128 Change-Id: I01aadf2dc9a3f714caaef273a7e012c6f1840726 Reviewed-on: https://code.wireshark.org/review/24088 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris1-6/+6
That allows a parallel typedef of ws_in4_addr for guint32. Change-Id: I03b230247065e0e3840eb87635315a8e523ef562 Reviewed-on: https://code.wireshark.org/review/24073 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-15Add support for BASE_OUIMichael Mann1-0/+46
Modeled after BASE_PT_XXX, this will format a FT_UINT24 to look a OUI, in the form of: XX:XX:XX (Manufacturer Name) for display. For display filtering, it will treat the value as hexadecimal. It requires that FT_UINT24 be the field type. Change-Id: I8716ae4dfcd4e854764a2425e2ff13c50f571d52 Reviewed-on: https://code.wireshark.org/review/23869 Reviewed-by: Richard Sharpe Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-13Add ptvcursor APIs that return the values it retrievesMichael Mann1-24/+253
ptvcursor_add_ret_uint ptvcursor_add_ret_int ptvcursor_add_ret_string ptvcursor_add_ret_boolean Change-Id: I41fa91b1ab805778d34a61215830b12a1331e864 Reviewed-on: https://code.wireshark.org/review/23895 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>
2017-10-09Add ENC_VARINT_PROTOBUFMichael Mann1-41/+333
Encoding of integer datatypes of Protocol buffers https://developers.google.cn/protocol-buffers/docs/encoding Change-Id: I9f6d65ddca099c15c0634984e9394131f98d35a9 Reviewed-on: https://code.wireshark.org/review/23813 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-26Move some DIAG_OFFs to make code less uglyJoão Valverde1-4/+2
Change-Id: I0f343ab69a6592a466e12e5d258f0878b9c32c25 Reviewed-on: https://code.wireshark.org/review/23752 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-09-24Replace DISSECTOR_ASSERT(hfinfo->type == FT_STRING) with ↵Guy Harris1-1/+1
DISSECTOR_ASSERT_FIELD_TYPE. That produces better error messages, giving the name of the offending field. Change-Id: I155ac29c68ecd7811cc9752980db9cdc37fea72e Reviewed-on: https://code.wireshark.org/review/23685 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-14Allow distinction between bitmasked 32bit and 64bit unsigned integers in ↵Michael Mann1-1/+1
proto_tree_set_representation_value. IS_FT_UINT includes both 32 and 64 bit unsigned integers, but fvalue_get_uinteger only allows 32-bit values, so add IS_FT_UINT32 macro for distinguishing between using fvalue_get_uinteger and fvalue_get_uinteger64. All other cases that use fvalue_get_uinteger vs fvalue_get_uinteger64 are done first with switch statements and don't rely on IS_FT_UINT to distinguish between 32 and 64 bit values Bug: 14063 Change-Id: I9d1400259e7c2661c2b5ebf96aaa0e9d773651fe Reviewed-on: https://code.wireshark.org/review/23528 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-04proto.c: fix use of proto_tree_add_text(_valist)_internal() with length = -1Pascal Quantin1-10/+6
When using a length of -1, use the tvb remaining length instead of 0. Change-Id: I569e9c9f57531914a3b613c3a6a9bff076fba362 Reviewed-on: https://code.wireshark.org/review/22931 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: Anders Broman <a.broman58@gmail.com>
2017-07-10Fix missing geninfo in PDML export.Christoph Wurm1-2/+5
Change-Id: I02b6ff7f57f81f0ac6b54806a9325ebb16b40476 Reviewed-on: https://code.wireshark.org/review/22553 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>
2017-06-18Revert "Temporary debugging hack, the sequel - fewer printouts, flush before ↵Guy Harris1-2/+0
crash." This reverts commit fa3aa6781797dc8d838d1a1311555a3d5c342ed1. Change-Id: I974606b2c7963d92832b74e05681431442542202 Reviewed-on: https://code.wireshark.org/review/22200 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-18Temporary debugging hack, the sequel - fewer printouts, flush before crash.Guy Harris1-0/+2
Change-Id: I867c1f78554fc6fabd2579107fe679a6f6033c0c Reviewed-on: https://code.wireshark.org/review/22199 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-17Revert "Temporary hack to try to debug tshark -G values crash on 32-bit ↵Guy Harris1-2/+0
Windows." This reverts commit 573a4c9cd59d7a14e4ab305284a287c705d6b945. Change-Id: Ia967e1e7ae617556cb2d0247fa45026f610bafa8 Reviewed-on: https://code.wireshark.org/review/22198 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-17Temporary hack to try to debug tshark -G values crash on 32-bit Windows.Guy Harris1-0/+2
Change-Id: I837a1e724f58f3e85ae4d7c77715e185a4b1ebeb Reviewed-on: https://code.wireshark.org/review/22197 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-17Clean up whitespace.Guy Harris1-3/+3
Change-Id: I67616d3ea6d325000c22c550c4d20c320b1c51db Reviewed-on: https://code.wireshark.org/review/22195 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-28Fixup support of BASE_UNIT_STRING for 64 bit based integer fieldsJim Young1-5/+11
proto.c’s proto_custom_set() was missing a test for BASE_UNIT_STRING under the 64 bit based integer case. Any custom columns sourced from a field stored in a 64 bit integer and having the BASE_UNIT_STRING attribute would only display the units but not the actual number. With this patch 64 bit based integer fields having the BASE_UNIT_STRING attribute will now properly display both their value and units when added to the packet list as a custom column. Change-Id: Icb9532771eb2f4098891dedd82886fd6223ce7a6 Reviewed-on: https://code.wireshark.org/review/21771 Petri-Dish: Jim Young <jim.young.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-28proto_tree_add_bytes_format[_value] can handle NULL treesMichael Mann1-1/+10
v2.3.0rc0-3618-gd962e7ae71 tried to simplify logic, but missed use of TRY_TO_FAKE_THIS_REPR. Create a "friendlier" version TRY_TO_FAKE_THIS_REPR_NESTED which allows for the "base" proto_tree_add_xxx to be called in proto_tree_add_xxx_format[_value] functions. Bug: 13736 Change-Id: I98883ad4581d2327edb8da5efd8ef8a89b55e3d0 Reviewed-on: https://code.wireshark.org/review/21764 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-28proto.c : fix indentAlexis La Goutte1-2/+1
Change-Id: Ib2f9b7bee59d6fa60972df7adf7caaaf9921d975 Reviewed-on: https://code.wireshark.org/review/21776 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-05-25Simplify proto_tree_add_bytes_format[_value]Michael Mann1-30/+6
Call proto_tree_add_bytes first so it can do all of the basic field checks that were being duplicated. Change-Id: Idc9a3cbf9498aa612a39cc80e3381eba52ce9fa4 Reviewed-on: https://code.wireshark.org/review/21750 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-14Add unit_name_string_get_double to handle float/double fieldsMichael Mann1-4/+4
Bug: 13705 Change-Id: I6bd006f216440d071e5c1eeb6b1f996b4a364c62 Reviewed-on: https://code.wireshark.org/review/21629 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: Guy Harris <guy@alum.mit.edu>
2017-05-12Fix header field info checks for FT_UINT_BYTES.Martin Kaiser1-0/+1
It should be allowed to have an FT_UINT_BYTES hf entry with BASE_NONE|BASE_ALLOW_ZERO. At the moment, this triggers an assert: Err Field 'Data block' (image-gif.data_block) is an FT_UINT_BYTES but is being displayed as (Bit count: 2048) instead of BASE_NONE For FT_UINT_BYTES entries, we should make the same checks as for FT_BYTES. Don't fall through to the default case. Change-Id: I986a9b779d130919d17595f08b3b63306b3956f2 Reviewed-on: https://code.wireshark.org/review/21606 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09More fields, more pre-allocated memory for fields.Graham Bloice1-1/+1
Change-Id: I36469fad59d28a1fbf15d3fd99544a3a6b0ef015 Reviewed-on: https://code.wireshark.org/review/21569 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-04-28Add proto_tree_add_item_ret_boolean().Guy Harris1-1/+51
It does what it says on the label. You get back TRUE or FALSE in a gboolean. While we're at it, remove a copied-and-pasted comment that doesn't apply, and update another comment. Change-Id: I117391d2ffe44124a614a7f64dad1b389c1ebc6a Reviewed-on: https://code.wireshark.org/review/21394 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-26Add proto_tree_add_item_ret_uint64Michael Mann1-0/+52
Just like proto_tree_add_item_ret_uint, but with 64-bit support Change-Id: Ie0cbfda9e63bf21e85df2d674e391a6c0abe92f7 Reviewed-on: https://code.wireshark.org/review/21355 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-18Rename BASE_VALS_NO_UNKNOWN to BASE_SPECIAL_VALS.Guy Harris1-3/+3
It makes it a bit clearer what its purpose is - to allow a value_string to be used for numeric rather than enumerated fields, giving certain values of the field a special meaning. Change the explanation in the documentation to match as well. Change-Id: Id07b22eee996b79ea5f3473928d29adcabe09bf3 Reviewed-on: https://code.wireshark.org/review/21209 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12Rename routines to clarify what they do.Guy Harris1-1/+1
XXX_prime_with_YYY makes it a bit clearer than does XXX_prime_YYY that we're not priming YYY, we're priming XXX *using* YYY. Change-Id: I1686b8b5469bc0f0bd6db8551fb6301776a1b133 Reviewed-on: https://code.wireshark.org/review/21031 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-10Add support for BASE_VALS_NO_UNKNOWNAlexis La Goutte1-5/+27
BASE_VALS_NO_UNKNOWN is a special value_string value for only a single (maybe 2) numerical value(s). If a field has the numerical value that doesn't match anything in the value_string, just the number is supplied for the field (no "Unknown") Dissectors that had this use case have been converted in the patch. Change-Id: Ie63a36cceec2fe4436938ec7e3d7f9e690d2b8d9 Reviewed-on: https://code.wireshark.org/review/20736 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris1-1/+1
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05Display numeric fields in their base display type for columns.Michael Mann1-2/+2
Don't force display of BASE_DEC Change-Id: Id6f115c074f0d4b1bd277dcbf6c523ffaa295edb Reviewed-on: https://code.wireshark.org/review/20918 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>
2017-04-01Provide better error messages for field type mismatches.Guy Harris1-6/+18
Don't just report an assertion failure with a line in proto.c; give the name of the field with the wrong type, and a list of the types that are valid for the routine in question. Change-Id: Id3ed7c376fdc72bf6cff69c647833946cfa99ee6 Reviewed-on: https://code.wireshark.org/review/20824 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-29Add ENC_TIME_MSEC_NTP and use it in packet-gtpv2.cAndersBroman1-4/+20
While at it fix expert info a typo and an calculation. Change-Id: I071a36edb7eed5f58708b98aebcb24bc6c34f2a8 Reviewed-on: https://code.wireshark.org/review/20766 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>
2017-03-29Print signed values with %d, not %u.Guy Harris1-1/+1
Change-Id: I1ad46df006976c052ff42baf6415e18b488b215f Reviewed-on: https://code.wireshark.org/review/20780 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28Fix up time encodings.Guy Harris1-77/+245
Add some new encodings for absolute time stamps, and use them as appropriate; this fixes some cases where the time stamps in question were being dissected incorrectly. For the encodings with seconds and 1/2^32s of a second, don't arbitrarily give only microsecond resolution; 2^32 is greater than 1 million, and, in fact, at least some NTP RFCs explicitly talk about time resolution greater than 1 microsecond. Update references in the RELOAD dissector to reflect the documents in question having been updated and published as RFCs. Change-Id: Icbe0b696d65eb622978eb71e99ddf699b84e4fca Reviewed-on: https://code.wireshark.org/review/20759 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-26Don't speak of RTPS time_t as an "NTP" time.Guy Harris1-10/+11
It's some weird hybrid of UN*X time and NTP time stamps, using UN*X's epoch and NTP's seconds/fractions split. I'm sure they had their reasons for not using something like struct timespec or regular NTP time, and instead inventing something that's halfway in between them. Change-Id: I1f39ec1368af52b82adfa2a22677dfa6e9341309 Reviewed-on: https://code.wireshark.org/review/20711 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-26Add ENC_TIME_TIMEVAL and use it for gsmtap.Guy Harris1-21/+40
From a look at the libosmocom code, time stamps in GSMTAP_TYPE_OSMOCORE_LOG messages appear to be UN*X struct timevals with a 4-byte tv_sec, not anything NTP-like with the fraction-of-a-second part in units of 1/2^32s of a second. Add ENC_TIME_TIMEVAL to handle time stamps like that, and use it rather than ENC_TIME_NTP_BASE_ZERO. Change-Id: Ia1511527ee292fb7725b2a64c0af16d23ff10a6d Reviewed-on: https://code.wireshark.org/review/20710 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-24proto: fix this condition has identical branches ↵Alexis La Goutte1-4/+1
[-Werror=duplicated-branches] found by gcc7 Change-Id: Ie8590d6c94b19697cff33874c5bc0b76024d337f Reviewed-on: https://code.wireshark.org/review/20693 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-20proto(.c): remove unused check and fix indent..Alexis La Goutte1-6/+1
Change-Id: I30b44cb0145f76c3929cac92337756a4164df1d2 Reviewed-on: https://code.wireshark.org/review/20609 Reviewed-by: Juan Jose Martin Carrascosa <juanjo@rti.com> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-09proto: Check for empty protocol->fieldsStig Bjørlykke1-1/+1
In proto_get_first_protocol_field() we must check for an empty protocol->fields because Lua scripts may have protocols without fields and g_ptr_array_index() does not perform bounds checking on the given index. Bug: 13223 Change-Id: Ib2f6286d0799541243450348dcf345a965b2825c Reviewed-on: https://code.wireshark.org/review/20455 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-02include <wsutil/glib-compat.h> to allow use of g_list_free_full() withAndersBroman1-0/+1
older glibs. Change-Id: I3eb7e178dcb844ddbac47f53f221a98e2d32f413 Reviewed-on: https://code.wireshark.org/review/20334 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-20Add some glib functions not available in older glibsAndersBroman1-5/+0
Change-Id: I6526d799447a3b6c0b9bb42f8d0f8c3415299ed0 Reviewed-on: https://code.wireshark.org/review/20158 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-02-18proto: ensure that length is set for proto_tree_add_item_new_ret_lengthPeter Wu1-1/+8
A user reported that the TNS dissector would show "Malformed Packet" in the Info column in Qt. The actual packet details and Expert Info dialog however had no trace of the issue. It turns out that proto_tree_add_item_new_ret_length did not correctly set the length. Test case (based on pcap from SampleCaptures wiki): tshark -r TNS_Oracle1.pcap -w 19.pcap -Y frame.number==19 tshark -r 19.pcap -Y tcp Change-Id: I82cb1ccbc7c3b33d2bcdb22f89a1754c1a4575e7 Fixes: v2.1.0rc0-1394-gc67c6e8f30 ("Add routines to add an item and return the item's real length.") Reviewed-on: https://code.wireshark.org/review/20098 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-16g_slist_free_full requires glib 2.28AndersBroman1-0/+5
Change-Id: I4f9ce7f65da0349b962f6be317635c5acb2daf73 Reviewed-on: https://code.wireshark.org/review/20148 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>