aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-diameter.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris1-1/+1
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-08-15Update RFC and I-D references.Guy Harris1-7/+12
Give draft-frascone-xml-dictionary for the dictionary syntax. Give RFC numbers and I-D names, rather than URLs to the plain text versions of them; that way, you can more easily go to the HTML versions, which give more information. The "more information" for I-Ds may include later drafts and the final RFCs, and for RFCs may give newer RFCs obsoleting the older ones; add the RFC numbers for the I-Ds and the RFC number for the current Diameter RFC. Change-Id: If01ea341af3ae892755a243bd1dd66acfdfd5062 Reviewed-on: https://code.wireshark.org/review/23086 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-26Parse enterprise-numbers at run timeJoão Valverde1-7/+6
"enterprise-numbers" is converted to tab-separated values and renamed "enterprises". Unused fields are stripped. PENs are stored in a hash table loaded at run-time. User "enterprises" file is loaded from the personal config dir. Misc make-sminmpec.pl improvements and fixes. Note: names of type "Entity (formerly ...)" have the formerly part commented out for a cleaner output. Change-Id: I60c533afbe3e399077fbf432088064471ad3e1e2 Reviewed-on: https://code.wireshark.org/review/22246 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
2017-05-29Fix up dissector tables' UI names.Jeff Morriss1-4/+4
This was inspired by using the Decode-As UI to decode Field "SSL TCP Dissector" Value (port) XXX as YYY. "SSL Port" makes more sense as the UI name. Change-Id: Id6398a5dc79e32bddc4f1bfcf0a468ae1364808f Reviewed-on: https://code.wireshark.org/review/19573 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-27[Diameter] Add a table for subdissectiong AVPs for VENDOR_VERIZONAndersBroman1-0/+5
Change-Id: I37397e590f294d209b89fe868b365cafb5343464 Reviewed-on: https://code.wireshark.org/review/21363 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-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-03-28Fix up time encodings.Guy Harris1-1/+1
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-01-07Convert range API to always use wmem memory.Michael Mann1-3/+3
This is mostly to address memory leaks in range preferences (the biggest user of range functionality) on shutdown. Now range preferences must use epan scoped memory when referencing internal preference structures to keep consistency. Change-Id: Idc644f59b5b42fa1d46891542b53ff13ea754157 Reviewed-on: https://code.wireshark.org/review/19387 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-2/+1
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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>
2016-12-01Check preference titles and descriptions.Gerald Combs1-1/+1
When registering preferences, make sure our titles and descriptions are valid UTF-8. Make sure our titles are short and only contain printable characters. Fix problematic titles and descriptions. Change-Id: I20d3f93438f2b3c30266f934297feb79897f2ee5 Reviewed-on: https://code.wireshark.org/review/18998 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-15/+4
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67, convert dissectors that use "udp.port". More cleanup done on dissectors that use both TCP and UDP dissector tables, so that less preference callbacks exist. Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3 Reviewed-on: https://code.wireshark.org/review/18120 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-13/+1
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-03[Diameter] Use ...array_sized_new() for hf:s and ett:sAndersBroman1-2/+3
Change-Id: I5d3d3779ccf1fcd8a61e6cb6342305db2bc6e2be Reviewed-on: https://code.wireshark.org/review/18036 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>
2016-08-31Revert "Revert "diameter: fix 400kb leaked memory on exit""Guy Harris1-2/+10
This reverts commit 5fea2b5f4198f1a36f313ef38532ddffd02ac5b1. I.e., it puts back the change; the reverted version passed the tests on which the versions with this change crashed. Change-Id: Idcc0eb11588cf14e2fe666de1905ee63917b0fcf Reviewed-on: https://code.wireshark.org/review/17413 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31Revert "diameter: fix 400kb leaked memory on exit"Guy Harris1-10/+2
This reverts commit a04b6fcb3db901734ed948134c973996786be8b7. Temporary revert to see if this prevents the "tshark -G" crashes being seen on the 64-bit Windows buildbot. Change-Id: I561439039ca2667b72d7e2319a6f3f5f97e18d15 Reviewed-on: https://code.wireshark.org/review/17412 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-4/+4
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-30[Diameter] Improve dissection of malformed packets by continnuingAndersBroman1-1/+11
dissection and display the problem more prominetly. Change-Id: Ia1a32667a18e1e5b60b5c167da9b6dd945ba3dfc Reviewed-on: https://code.wireshark.org/review/17385 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>
2016-08-29diameter: fix 400kb leaked memory on exitPeter Wu1-2/+10
Before: SUMMARY: AddressSanitizer: 399684 byte(s) leaked in 17208 allocation(s). After addressing to-do by calling ddict_free: SUMMARY: AddressSanitizer: 3024 byte(s) leaked in 256 allocation(s). After fixing all remaining leaks cases in the flex file for diameter: SUMMARY: AddressSanitizer: 735 byte(s) leaked in 58 allocation(s). Not bad huh :-) Ping-Bug: 12790 Change-Id: I0c730ad77ae15c69390bc6cf0a3a985395a64771 Reviewed-on: https://code.wireshark.org/review/17364 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-06-29Provide new interface for Export PDU.Michael Mann1-7/+1
Rather than have a bitmask for each desired field, have a dissector provide a list of structures that represent data that goes into the PDU. Change-Id: I125190cbaee489ebffb7d9f5d8bc6f3be2d06353 Reviewed-on: https://code.wireshark.org/review/16122 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-15Allow control of individual columns to be (un)writable.Michael Mann1-4/+5
Most protocols just want to limit COL_INFO or COL_PROTOCOL so give that level of granularity. Bug: 12144 Bug: 5117 Bug: 11144 Change-Id: I8de9b7d2c69e90d3fbfc0a52c2bd78c3de58e2f8 Reviewed-on: https://code.wireshark.org/review/15894 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> 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>
2016-06-15Change how dissectors do late-field-registration to avoid a double-registrationJeff Morriss1-3/+1
assertion. If a dissector forces registration of fields during dissection it needs to do so in a way that clears the prefix registration. Otherwise epan will call the registration routine a 2nd time (which will cause us to assert out) if a user types a display filter (with the dissector's prefix) that doesn't exist. Update the proto_register_prefix() comments to reflect this. Change-Id: I3ce29243395fb55192bb5dfd950baa88410ac136 Reviewed-on: https://code.wireshark.org/review/15881 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-06-13Diameter: free the diameter directory variable.Jeff Morriss1-1/+2
It's only needed for a few milliseconds--there's no need for it to stick around until the epan scope ends. As discussed on I51813815babb4c40722c38459139ab9e3e3ccb42. Change-Id: I81fef351ef2d700cc5ec5866340605704173fbdb Reviewed-on: https://code.wireshark.org/review/15861 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-03Export packets before dissecting themPascal Quantin1-4/+4
This way even malformed packets are properly exported Change-Id: I923825459eea725d0a103810f3883906b95b3b21 Reviewed-on: https://code.wireshark.org/review/15259 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>
2016-04-24Delay registration of Diameter fields until they're needed.Jeff Morriss1-20/+35
... Like the RADIUS and wimaxasncp dissectors do. Change-Id: Ifab019a0040d3938e52918a282a3beba9dfcfc70 Reviewed-on: https://code.wireshark.org/review/14900 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-18diameter: fix 'pinfo/vs' was marked unused but was used ↵Alexis La Goutte1-2/+2
[-Werror,-Wused-but-marked-unused] Change-Id: Ib7f1682a3cdeb8571a410db07261ff68bac03432 Reviewed-on: https://code.wireshark.org/review/14977 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-15diameter: change g_malloc to wmem_alloc.Dario Lombardo1-7/+5
Change-Id: I51813815babb4c40722c38459139ab9e3e3ccb42 Reviewed-on: https://code.wireshark.org/review/14918 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-07Use faster string functions at startup.Gerald Combs1-10/+11
Use wmem_strconcat and g_strconcat instead of wmem_strdup_printf and g_strdup_printf when we register various protocols. This shows a fairly significant speedup in the Visual Studio profiler. Change-Id: I98709329513daa66ad3665925dc69149c43df884 Reviewed-on: https://code.wireshark.org/review/14855 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-04-02Use faster wmem_str* functions in a few places.Gerald Combs1-2/+2
Use wmem_strdup and wmem_strconcat instead of wmem_strdup_printf. This shaves a small amount of time off of register_all_protocols on Windows according to the Visual Studio profiler. Change-Id: Ib6991e8de5b4fc30e960c513a3028c09dfe6a0a4 Reviewed-on: https://code.wireshark.org/review/14770 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-4/+4
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-11Rename a variable for clarity.Jeff Morriss1-4/+4
It's confusing to have 'pdus_tree' mean both the map of pdu_trees and the pdu trees themselves. Change-Id: Ie875798eb140b60a1309ddc0c0bf885b48c0407c Reviewed-on: https://code.wireshark.org/review/14413 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2016-02-25diameter: change GArray into wmem_array.Dario Lombardo1-14/+26
This change fixes a leak in packet-diameter that loads a dictionary but doesn't free all the data. Found by valgrind. ==30481== 36,656 (960 direct, 35,696 indirect) bytes in 24 blocks are definitely lost in loss record 3,417 of 3,421 ==30481== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==30481== by 0xA7FE610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==30481== by 0xA81422D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==30481== by 0xA7CDC44: g_array_sized_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==30481== by 0x6863743: dictionary_load (packet-diameter.c:1980) ==30481== by 0x6863743: proto_register_diameter (packet-diameter.c:2344) ==30481== by 0x71C4BA4: register_all_protocols (register.c:323) ==30481== by 0x65EEFA7: proto_init (proto.c:521) ==30481== by 0x65CD621: epan_init (epan.c:126) ==30481== by 0x115330: main (tshark.c:1220) Change-Id: I3c0d19e1accab415355aa0f50c598f0c83356985 Reviewed-on: https://code.wireshark.org/review/13821 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-5/+5
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23Add more fields to packet_info structure and use them.Guy Harris1-3/+3
Add fields for the absolute time stamp (and another field for a presence flag for the absolute time stamp) and the packet encapsulation for the packet. This lets us remove the field for the packet encapsulation in the frame_data structure; do so. Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39 Reviewed-on: https://code.wireshark.org/review/13499 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-5/+5
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 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: Michael Mann <mmann78@netscape.net>
2015-12-12Remove -Wwrite-strings compiler flagJoão Valverde1-2/+2
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-12/+12
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-28Diameter: check IPv6 prefix length before copying it in e_in6_addr structurePascal Quantin1-2/+8
Bug: 11792 Change-Id: I37a07044d40f10e9a1a90025d90753fdb3db2278 Reviewed-on: https://code.wireshark.org/review/12248 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-13Diameter: Expand an error message.Gerald Combs1-2/+2
If we encounter the wrong ftype, print its name. Change-Id: I7405ccdd3e099f533c6a8aaf81b60faf4093741a Reviewed-on: https://code.wireshark.org/review/11790 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-4/+4
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-27Show the Experimental-Result-Code if we don't know have a subdissector for thatJeff Morriss1-5/+26
vendor ID. Otherwise the value is simply not shown to the user. Adding support for a vendor ID's Experimental Result Codes isn't as easy as modifying the XML so don't add an expert info about it. Change-Id: I65f2cb13853cc7141fb242fa03c6e474a6c02cb9 Reviewed-on: https://code.wireshark.org/review/11294 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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-1/+1
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-14Change proto_tree_add_ipv6() to take a struct e_in6_addr pointerJoão Valverde1-1/+1
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-08-21Generate Diameter's expert info's even when there's no tree so that they showJeff Morriss1-88/+122
up in the Expert Infos dialog. Push the if(tree) check down into the basic type dissectors since we can't generate/fill the label (which won't be used anyway) when we're not building the tree (since the proto_item will be faked/NULL). Change-Id: Ie4f1f6856cfad0dabc7c58cdee2c16c8fc032c6d Reviewed-on: https://code.wireshark.org/review/10001 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-07Revert "diameter: convert some GArrays to epan wmem_arrays"Evan Huus1-28/+23
This reverts commit 59017a22be9a5a86f5c365cc22a2f1e23205597b. As indicated by Michael on the original change, this breaks diameter rather badly for some reason I haven't been able to determine. Reverting until I can track down the root cause. Change-Id: Iedfab546a726395c546a88138cd45b6667913a11 Reviewed-on: https://code.wireshark.org/review/9531 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-07-04diameter: convert some GArrays to epan wmem_arraysEvan Huus1-23/+28
Fixes ~30KB of memory leak on startup and a handful of "reachable" memory as well. Change-Id: Ia1c633b65fa282c7bbe9d3772dae58643ef15c0e Reviewed-on: https://code.wireshark.org/review/9495 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-25diameter: fix a memory leak on startupEvan Huus1-0/+2
If we can't read the dictionary containing all our definitions, free necessary memory before returning. Change-Id: I814962d920852b9a82acb3bb2e7bc41addd835f7 Reviewed-on: https://code.wireshark.org/review/9131 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-25Add ability to export PDUs for heuristic dissectors alsoPascal Quantin1-1/+1
Change-Id: I1bf1aa9794f9b4f106edffd4986fc0b1014522fa Reviewed-on: https://code.wireshark.org/review/9099 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-21Further refactor SRT stats.Michael Mann1-0/+64
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK. SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic. CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone. Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc Reviewed-on: https://code.wireshark.org/review/8894 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>