aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aeron.c
AgeCommit message (Collapse)AuthorFilesLines
2017-02-02GHashtable -> wmem_map conversionsMichael Mann1-6/+1
Many of the register_init_routine/register_cleanup_routine functions are for initializing and cleaning up a GHashtable. wmem_map_new_autoreset can do that automatically, so convert many of the simple cases. Change-Id: I93e1f435845fd5a5e5286487e9f0092fae052f3e Reviewed-on: https://code.wireshark.org/review/19912 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13Convert most UDP dissectors to use "auto" preferences.Michael Mann1-1/+1
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-04-07Expand before multiply (CID-1355683 and CID-1355684)Jaap Keuter1-2/+2
Cast the value before multiplication to prevent overflow. Change-Id: I673e9e3e869e326ba3d23c3a2100e274e9dc7566 Reviewed-on: https://code.wireshark.org/review/14823 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: Michal Labedzki <michal.labedzki@tieto.com>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-3/+1
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 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-1/+1
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-02-13Just #include wsutil/inet_aton.hJoão Valverde1-9/+2
No need for platform-specific system header boilerplate. Change-Id: I5387a0005ddb0d7aab3c5b9f28d6282053c1b0fd Reviewed-on: https://code.wireshark.org/review/13865 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>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-10/+10
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-12[aeron] don't THROW() an exception from a dissectorMartin Kaiser1-17/+30
in the functions that dissect specific messages, we can just return 0 add a return value to aeron_frame_stream_analysis_setup() and pass it on to the callers to allow for a clean exit Change-Id: Iab4dee38112e32ca36822abc49d27dfe9e4c9ef7 Reviewed-on: https://code.wireshark.org/review/13147 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-01-09[aeron] simplify aeron_frame_info_setup()Martin Kaiser1-43/+37
exit straight away if the packet was already processed or if we're missing some data avoid nested if clauses that make the code hard to read Change-Id: Ied6d575f9498ab98623cd862a9d4b9dd8ad7e0b4 Reviewed-on: https://code.wireshark.org/review/13146 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-12-31Don't throw away constness.Guy Harris1-3/+3
Change-Id: Ia0b014c3d9e4fcaa6f81cdb23dc76f9d384b782b Reviewed-on: https://code.wireshark.org/review/12963 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31Use wmem_memdup() instead of wmem_alloc() followed by memcpy().Guy Harris1-8/+4
Change-Id: Ia937fe15a371a3109178ba619dbdb3a6db3897ee Reviewed-on: https://code.wireshark.org/review/12962 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
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-11Change prototype of callbacks passed to wmem_tree_foreach so that theyMatthieu Coudron1-1/+1
accept the node key as a first parameter. wmem_tree accepts all sort of keys (strings, integers, soon ranges), thus it is of interest for various purposes (testing, greedy search) to know the key of the node. Change-Id: Ie748b917bef91f0b1ba8cce15bd1b471922641dc Reviewed-on: https://code.wireshark.org/review/11683 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-03Remaining ADDRESS macro to address function conversionsJoão Valverde1-11/+11
Change-Id: I8bc9af431e70243b05f4f0ce8c2b8ee451383788 Reviewed-on: https://code.wireshark.org/review/11463 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-24[aeron] a new-style dissector should return 0 (not -1) to reject a packetMartin Kaiser1-6/+9
we shouldn't throw an exception before we know that the packet contains our protocol Change-Id: Ic58cb985775766a18e9086fe52096e3290674515 Reviewed-on: https://code.wireshark.org/review/11248 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-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-1/+1
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-1/+1
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-27Quick and dirty overflow checking.Guy Harris1-4/+29
We really need a better way to handle packet offset overflows. Change-Id: I6e476f7bc6ddac2c5515c4e09192d88f528ea091 Reviewed-on: https://code.wireshark.org/review/9194 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-18[aeron] Remove unneeded initializersBill Meier1-93/+93
Change-Id: Ifa129c221b5df9120a0c475edc2109775f84ae35 Reviewed-on: https://code.wireshark.org/review/8974 Petri-Dish: Bill Meier <wmeier@newsguy.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-12Cleanup and hardening for the Aeron dissector.David Ameiss1-53/+111
Change-Id: Iee544315401784b097ab05e6de5e5c950b622c80 Reviewed-on: https://code.wireshark.org/review/8877 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>
2015-06-08aeron: fix infinite loopEvan Huus1-0/+3
`dissected_length` can come from the packet in some paths, meaning it can be 0 or negative and we need to check for underflows and other such problems Bug: 11255 Change-Id: Iba55ec1824a391ec1c717bfea5b65cc6610fc081 Reviewed-on: https://code.wireshark.org/review/8839 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> 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: Evan Huus <eapache@gmail.com>
2015-06-08Add editor-modelines; Don't use tabwidth=4; Adjust whitespace.Bill Meier1-3/+3
Change-Id: I7c287b176002c48dee6ae44334ee9fad221b4cd3 Reviewed-on: https://code.wireshark.org/review/8816 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-05Add dissector for the Aeron protocol.David Ameiss1-0/+3067
Bug: 11164 Change-Id: I7ed6a3fd18aaadfc9b7b9619b1035206e86f46d6 Reviewed-on: https://code.wireshark.org/review/8240 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>