Commit Graph

5 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
Alexis La Goutte e4692c5226 amp: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I199d9ebf9ff48f4268a4647bfdeafb784eb8e9a5
Reviewed-on: https://code.wireshark.org/review/34908
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-02 15:12:12 +00:00
Alexis La Goutte 3d7cd2ed6b amp: remove duplicate copyright
Only need SPDX-License-Identifier

Change-Id: Ib7bae961acb5810d99a3e44d4f5a7fe437bb6133
Reviewed-on: https://code.wireshark.org/review/34748
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-10-08 22:08:41 +00:00
Gerald Combs efb6fa1e03 AMP: Remove a self-assignment.
Fix

../epan/dissectors/packet-amp.c:411:11: error: explicitly assigning value of variable of type 'packet_info *' (aka 'struct _packet_info *') to itself [-Werror,-Wself-assign]
    pinfo = pinfo;
    ~~~~~ ^ ~~~~~

Change-Id: I8c8b03672d5aaae65b23449c35c150ee8ee0dae6
Reviewed-on: https://code.wireshark.org/review/34711
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-10-04 17:16:37 +00:00
Keith Scott 13a9a98f95 dtn: Updates to TCPCL and AMP parsers and dtn payload ids.
This patch updates the TCP Convergence Layer (TCPCL) parser, updates the
Compressed Bundle Header Encoding (CBHE) BP Endpoints that identify
CCSDS File Delivery Protocol (CFDP) and Asynchronous Management Protocol
(AMP) payloads, and adds an AMP dissector that parses the new Compressed
Bundle Header Encoding (CBOR) wire format.

1. Correctly parses the TCP Convergence Layer Length field
2. Adds support for the TCP Convergence Layer Refuse-Bundle Reason-Code
   Flags per RFC-7242: Section-5.4
3. Parses BP traffic between Compressed Bundle Header Encoding (CBHE)
   endpoints 64 and 65 as CCSDS File Delivery Protocol (CFDP)
   payloads.
4. Parses BP traffic beetween Compressed Bundle Header Encoding (CBHE)
   endpoints 5 and 6 as Asynchronous Network Management (AMP)
   payloads
5. Updates the AMP parser to use the new Compressed Binary Object
   Representation (CBOR)

The AMP dissector was originally written by Krishnamurthy Mayya
(krishnamurthymayya@gmail.com) against an older version of the AMP
specification and updated to parse the new Compressed Binary Object
Representation (CBOR) format by Keith Scott (keithlscott@gmail.com)

Change-Id: I8d1eff9fb09f1a9dbdb9f4cf077448316f6a9e05
Reviewed-on: https://code.wireshark.org/review/34216
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-04 13:10:46 +00:00