Commit Graph

20 Commits

Author SHA1 Message Date
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
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-17 00:05:17 +00:00
João Valverde 2e85975fee Just #include wsutil/inet_aton.h
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-02-13 23:51:53 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
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-24 03:41:28 +00:00
Martin Kaiser 8cabf5be59 [aeron] don't THROW() an exception from a dissector
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-12 11:59:23 +00:00
Martin Kaiser 2a801b4829 [aeron] simplify aeron_frame_info_setup()
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>
2016-01-09 15:01:55 +00:00
Guy Harris 31956f98d0 Don't throw away constness.
Change-Id: Ia0b014c3d9e4fcaa6f81cdb23dc76f9d384b782b
Reviewed-on: https://code.wireshark.org/review/12963
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 20:55:39 +00:00
Guy Harris 1ea011b891 Use wmem_memdup() instead of wmem_alloc() followed by memcpy().
Change-Id: Ia937fe15a371a3109178ba619dbdb3a6db3897ee
Reviewed-on: https://code.wireshark.org/review/12962
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-31 20:52:24 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
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-12-09 12:37:36 +00:00
Matthieu Coudron c2afc9edec Change prototype of callbacks passed to wmem_tree_foreach so that they
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-11 00:22:37 +00:00
João Valverde 3df2333155 Remaining ADDRESS macro to address function conversions
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-11-03 12:20:34 +00:00
Martin Kaiser 3ea14493e7 [aeron] a new-style dissector should return 0 (not -1) to reject a packet
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-24 23:59:33 +00:00
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
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-22 11:45:56 +00:00
Michael Mann 21e5a950ad Remove all preferences related to enabling/disabling heuristic dissectors.
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-17 17:12:22 +00:00
Michael Mann be7d295fbf Add "user presentable" and "unique string ids" to heuristic table entries.
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-07-12 03:14:38 +00:00
Guy Harris 80efc53b05 Quick and dirty overflow checking.
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-27 22:30:12 +00:00
Bill Meier 2391fe5731 [aeron] Remove unneeded initializers
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-18 13:32:06 +00:00
David Ameiss 905506fd98 Cleanup and hardening for the Aeron dissector.
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-12 20:36:07 +00:00
Evan Huus 0f36b1c394 aeron: fix infinite loop
`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-08 18:32:30 +00:00
Bill Meier f95db69aa1 Add editor-modelines; Don't use tabwidth=4; Adjust whitespace.
Change-Id: I7c287b176002c48dee6ae44334ee9fad221b4cd3
Reviewed-on: https://code.wireshark.org/review/8816
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-08 04:47:48 +00:00
David Ameiss 509eb46981 Add dissector for the Aeron protocol.
Bug: 11164

Change-Id: I7ed6a3fd18aaadfc9b7b9619b1035206e86f46d6
Reviewed-on: https://code.wireshark.org/review/8240
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-05 05:28:27 +00:00