Commit Graph

16 Commits

Author SHA1 Message Date
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Martin Kaiser 3f51380b3b bmp: remove _U_ for a parameter which is used
This fixes a -Wused-but-marked-unused compiler warning.

Change-Id: I44a04e60020b392d4d2c700e157617938a6164db
Reviewed-on: https://code.wireshark.org/review/36704
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-05 08:29:59 +00:00
Alexis La Goutte bb2bf1c577 BMP: Add support of draft-ietf-grow-bmp-local-rib-06
Support for Local RIB in BGP Monitoring Protocol (BMP)

Add new peer type (3/Loc-RIB Instance), Peer Flags (F), Peer UP (VRF/Table Name) and Peer Down (Local system Closed)

Change-Id: I8de0e782d6eadfaa6fe9eff4de66a4295f173c40
Reviewed-on: https://code.wireshark.org/review/35041
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-10 10:20:04 +00:00
Alexis La Goutte 54e4ead9b2 BMP: fix typo on bitmask PEER Flag AS_PATH
and also better string for some stat type

Change-Id: Ia20ef944077cc2854fc0a2cd3e3e0862465a7ec0
Reviewed-on: https://code.wireshark.org/review/35009
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-07 11:32:16 +00:00
Alexis La Goutte 4a2b2f8cc5 BMP: Add support of RFC8671
Support for Adj-RIB-Out in the BGP Monitoring Protocol (BMP)

Add new flag (A), 4 new stats type and 1 peer up (Admin Label)

Change-Id: I100ce182879e85d87c5b7286505e7e9a8658adcf
Reviewed-on: https://code.wireshark.org/review/35008
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-07 11:31:05 +00:00
Alexis La Goutte ce0b559534 BMP: Enhance dissection of Stats type
Add hf for each type
And also fix dissection of per AFI type (9 and 10), it is not only a uint32 or uint64, start with AFI/SAFI

Change-Id: Icb15db89365ee352a37f30650712a97bca99b4b3
Reviewed-on: https://code.wireshark.org/review/34971
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-05 10:20:55 +00:00
Alexis La Goutte de7760d490 BMP: Update to RFC (7854)
Change-Id: I9d1d689ad69bad525779b2bb0f659ba88e07abbb
Reviewed-on: https://code.wireshark.org/review/34912
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-03 22:57:30 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Michael Mann 268841f3e0 Combine Decode As and port preferences for tcp.port dissector table.
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-08 02:44:53 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
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-20 12:48:48 +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
Bill Meier 1223ba5250 [bmp] minor cleanup
- Simplify some code;
- Remove unneeded initializers;
- Remove some unused code;

Change-Id: I30b6a7751845670b732eae8ec143cd23e57fc54c
Reviewed-on: https://code.wireshark.org/review/9014
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-06-22 02:14:21 +00:00
Ebben Aries 23c6a0f97f [bmp] Support for decoding of BGP Peer Distinguisher
re-utilize decode_bgp_rd() logic from packet-bgp

Change-Id: I588a58e0b2f7da5d3c9b86b28abb9c5b29e0dc8f
Reviewed-on: https://code.wireshark.org/review/7537
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-05 15:39:48 +00:00
Alexis La Goutte 1c4053f8b3 BMP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I322be0953ce8c872f8464c3e095dfe9006d3b67b
Reviewed-on: https://code.wireshark.org/review/7261
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-22 20:25:21 +00:00
Ebben Aries a6c44c2402 [bmp] Adding dissector for BGP Monitoring Protocol
* Support per draft-ietf-grow-bmp-07

Change-Id: Iadb833157e7832077429c048e28e9814da29e2c6
Reviewed-on: https://code.wireshark.org/review/7192
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-19 18:36:53 +00:00