Commit Graph

80 Commits

Author SHA1 Message Date
Guy Harris a6ee179427 conversation: speak of the "conversation key" as just address/port endpoints.
It's not a general key for looking up arbitrary conversations - that's
what an array of conversation elements is for - it's just a pair of
address/port endpoints.  (It's not even hijacked for conversations
identified by a circuit ID any more.)
2022-08-29 19:19:59 -07:00
Guy Harris deb95a275d Rename routines that talk about conversation keys to talk about elements.
And change them to say "set" rather than "create"; they do more than
just allocate an array of conversation elements, they stuff a pointer to
that array into pinfo, which may affect what other dissectors do.
2022-08-25 22:37:19 -07:00
Guy Harris 8195bdd340 Rename a bunch of things with "conversation".
A conversation in Wireshark might have two endpoints or might have no
endpoints; few if any have one endpoint.  Distinguish between
conversations and endpoints.
2022-08-25 20:02:20 -07:00
John Thacker 5c15ebb9a2 prefs: Convert most RTP dissectors to use "auto" PT preferences
Similar to commit 2eb7b05b8c,
replace the RTP payload type preferences with automatic
dissectors.

This reduces the number of preference module callbacks.
2022-07-31 07:37:11 +00:00
John Thacker 74082386de DVB-S2: Store whether low roll-off values are used in conversation data
It's possible to have a capture that has multiple DVB-S2[X] streams
on different UDP or RTP ports that use different roll-off values.
Store the information about whether we've transitioned into the
lower roll-off range in conversation data instead of in a global.
2022-07-22 17:56:25 +00:00
Gerald Combs 865feb2bf8 epan: Switch some _by_id conversation routines to elements.
Switch the non-endpoint *_by_id conversation routines to use element
lists. Change the ID type from guint32 to guint64. None of them used the
address+port option flag arguments, so remove them.
2022-05-24 17:18:21 +00:00
John Thacker c4f6914aa6 DVB-S2: Only add the rolloff value once
DVB-S2X has two possible meanings of the rolloff factor, with
different value strings. Only add the correct one as part of the bitmask,
instead of always adding it twice, once with the low value string and once
with the appropriate value string.
2022-05-10 22:11:06 -04:00
John Thacker 1799627b14 DVB-S2-BB: Get correct ACM byte for L.4
The L.4 adaptation header does not include a sync byte. Use the
current offset to get the ACM byte instead of hardcoding in the
value that is correct for L.2 and L.3.
2022-02-22 05:56:37 -05:00
John Thacker a98aca3838 DVB-S2-BB: Add pref to try all Adaptation layer headers (or only one)
There are four supported types of DVB Base Band Frame Adaptation Layer
headers, and they all can have false positives. Add a preference that
so that a user can either look for all four possible types, or can
only look for a packets that match the preferred type.

Fix #17950.
2022-02-22 10:28:55 +00:00
John Thacker f7d8dd4938 DVB-S2-BB: Fix detection of adaptation field type
Fix the check of which adaptation field type is found before a
Base Band Frame. Related to #17950.
2022-02-18 23:00:29 -05:00
Roman Volkov 869b84631d dvb: unify some 'Length' fields
Unify the last hex 'Length' fields displaying, make them decimal
as other ones.
2022-01-09 22:16:27 +02:00
Adrien Destugues d7ffd00504 DVB-S2: add to "decode as" for UDP
The heuristic dissector doesn't always work. It is convenient to have
DVB-S2 in the "decode as" menu as well.

The heuristic dissector does not dissect packets where the modeadapt
cannot be detected (CRC errors or other problems). The "decode as"
dissector, on the other hand, will attempt decoding anyway, using the
preferred mode adaptation set in preferences.
2021-10-25 04:43:40 +00:00
Alexis La Goutte 7644d6cc4a dvb-s2-bb: Fix Dead Store found by Clang Analyzer
packet-dvb-s2-bb.c:1902:17: warning: Value stored to 'next_tvb' is never read [deadcode.DeadStores]
2021-09-06 04:21:15 +00:00
Joakim Karlsson 8684ba27a2 DVB-S2: fix build issues [-Werror=maybe-uninitialized] 2021-09-02 18:04:56 +00:00
John Thacker b04165a57b DVB-S2: Only create composite if used
It violates the tvb_composite API to create composite TVBs if
they're not going to have at least one TVB put in them. Prevent
dissector bug failed assertions in the case of packets incorrectly
identified as DVB Baseband frames carrying TS by the heuristic
dissector.
2021-09-01 07:00:16 +00:00
Adrien Destugues 8223405abc DVB-S2: allow dissection of DVB-S2 over RTP 2021-08-31 09:48:56 +00:00
Evan Huus 8ee8808876 First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.
2021-07-21 09:54:57 -04:00
John Thacker 983306087c DVB-BB: Add the mode adaptation protocol even when L.1 (no bytes)
Add the mode adaptation protocol to the tree even when it is L.1
(no actual bytes), just with no subtree in that case. This is necessary
in order to access the preferences.
2021-07-01 08:06:44 +00:00
John Thacker 73256b3fb7 Remove lingering circuit API from stream.h
The circuit API was removed and replaced with the conversation
"_by_id" API that uses a single uint32 value by commit
800b26edbe

Remove the lingering references to circuits from the stream API,
since it's just used with conversations now.
2021-06-13 11:51:44 +00:00
John Thacker d8cc21397c DVB-S2-BB: Fix off by one error
Missed reducing the size of the subset to append by one octet
to account for already including the Sync byte from the header
in one location.
2021-06-10 04:20:12 +00:00
John Thacker c8301ce979 DVB-S2-BB: Make compute_crc8 offset parameter a guint
There's no reason to limit the tvb offset input parameter of this CRC8
function to a guint8, particularly now that the User Packet CRCs
later in the Base Band Frame are being checked.
2021-06-08 19:30:30 -04:00
John Thacker 73eca0905d DVB-S2-BB: Two coverity flagged issues from !3239
Address two issues found by coverity.
2021-06-07 20:10:41 -04:00
John Thacker c5c25a9268 DVB-S2-BB: Add support for TS over BBFrame
Add support for Transport Streams carried over DVB Base Band Frames,
passing them to the MP2T dissector. Add an endpoint type for the ISI.
Update comments. Use standard true false strings in a couple cases.
Create a header file for MP2T, since the BBFrame dissector needs to
know about the MPEG2 TS packet size and sync byte.
2021-06-05 08:12:47 +00:00
John Thacker 1513237d10 DVB-S2-BB: Add preference for default mode adaptation format
DVB Baseband Frames have four possible mode adaptation formats, and
the check to distinguish them depends on only a CRC-8, so it's possible
to have ambiguity, particularly in a large capture. Add a preference to
for preferred format, defaulting to the SatLabs L.3 mode, since that's
the most common format I've seen in captures or in datasheets for
BBFrames over UDP or RTP. Also make L.3 the second highest preference
when something else is set to the default.
2021-05-26 21:57:05 -04:00
John Thacker 99618b5b93 DVB-S2-BB: Verify EIP CRC
Verify the optional DVB-RCS2 Explicit Integrity Protection CRC32.
2021-05-26 20:31:28 +00:00
John Thacker 1b32a71f2b DVB-S2-BB: Fix GSE reassembly
Fix several issues with GSE reassembly:

Use the Input Stream Identifier (ISI) to distinguish packets on
different input streams, when present.

Take into account the label, if present, when reassembling. Also
don't send partially reassembled packets to subdissectors, but show
the bytes as undecoded PDU data in the fragment if reassembly did
not complete. (All this fixes #17403.)

Also include the Total Length field when reassembling, since it is
included in the CRC32 calculation. Check the CRC32 in completed
reassemblies.

Deal with reassembly issues arising from pinfo->src, dst, etc. changing
from subdissectors (since GSE oft carries IP.)

Require that reassemblies begin with Start packets, and don't add
Start packets to in progress reassemblies but rather start a new one.
2021-05-26 04:13:19 +00:00
John Thacker 0137c24d60 DVB-S2-BB: Prevent infinite loop
Commit 4bf4ee88f0 removed an else
statement that broke out of the BBFrame processing loop. Without
it, infinite loops might be possible if the GSE frames have bit errors
in the length field.
2021-05-25 13:32:34 +00:00
John Thacker 6b2dd3561e DVB-S2-BB: Make dissect_dvb_s2_gse() have the dissector_t signature
Change dissect_dvb_s2_bb to take a tvb_subset of the appropriate size
and offset instead of being passed in an offset and length. Rearrange the
parameters so that it has the dissector_t signature. This is a little
cleaner, and also allows in the future creating dissector handles that
call the GSE dissector directly for GSE frames not carried within a
BBFrame.
2021-05-23 18:34:36 +00:00
John Thacker 3b71af71e1 DVB-S2-BB: Make dissect_dvb_s2_bb() have the dissector_t signature
Change dissect_dvb_s2_bb to take a tvb_subset instead of being
passed in an offset. Rearrange the parameters so that it has the
dissector_t signature. This is a little cleaner, and also allows
in the future creating dissector handles that point directly to
baseband frames (if we know we have L.1/ out of band mode adaptation.)
2021-05-20 21:39:45 -04:00
Martin Mathieson 6894bccf03 check_tfs.py: Also match case insensitively
Fix up some issues where the words were the same except for
captitalisation.
2020-10-11 18:46:31 +00:00
Martin Mathieson 4b4bbe8067 DVB-S2-BB: Add the next-header protocol types from RFC4326, section 4.4.1
Change-Id: Ieb35ffb94a0e3c2f27768cefce91e0c93619ff94
Reviewed-on: https://code.wireshark.org/review/37733
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-06 17:24:28 +00:00
Martin Mathieson 77d4112bb1 DVB-S2-BB: For GSE Protocol Type, separate Next-Header and Ethertype subtypes.
For Ethertype, use etype_vals (don't know how likely types not named as
examples in specs are likely to be seen).

Fixes warnings from previous range_string that tried to cover both types, but
where "not implemented" catch-all ranges preceded and hid individual types.

** (process:24396): WARNING **: 21:24:48.760: value_range_string error:  Protocol (dvb-s2_gse.proto) hidden by earlier entry (prev="not implemented":  0 0x0 -> 255 0xff)  (this="NCR":  129 0x81 -> 129 0x81)

** (process:24396): WARNING **: 21:24:48.760: value_range_string error:  Protocol (dvb-s2_gse.proto) hidden by earlier entry (prev="not implemented":  0 0x0 -> 255 0xff)  (this="Signaling Table":  130 0x82 -> 130 0x82)

** (process:24396): WARNING **: 21:24:48.760: value_range_string error:  Protocol (dvb-s2_gse.proto) hidden by earlier entry (prev="not implemented":  2049 0x801 -> 34524 0x86dc)  (this="VLAN":  33024 0x8100 -> 33024 0x8100)

Tested with dvb-s2_bb_example.pcap (where the only Protocol Type value set is for IPv4).

Change-Id: I7c8d8669c3f3e76974db8472783284975e063c12
Reviewed-on: https://code.wireshark.org/review/37711
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-06 10:42:20 +00:00
Guy Harris c3802e5af1 DVB-S2-BB: update list of standards.
We refer to part 1 of ETSI TS 102 606, i.e. to ETSI TS 102 606-1.  Add
other parts if appropriate.

That ultimately ends up pointing to RFC 4326, which, in turn, mentions
two IANA registries.

Change-Id: Ief3ff36bd4c92ab6b94f07f0a6b6a3aeacb2fa12
Reviewed-on: https://code.wireshark.org/review/37716
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-05 20:37:36 +00:00
Guy Harris f63916425d DVB-S2-BB: update a URL.
The URL no longer works; use the Wayback Machine.

Change-Id: I80223dc675d0f578dd4f1d58848bc0eea17426c8
Reviewed-on: https://code.wireshark.org/review/37712
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-05 20:00:37 +00:00
Adrien Destugues f5d08e31c8 DVB-S2: show raw bbframe data when it is not dissected
Change-Id: Ibdd42d971a1ec7815fcf3467802ff2010d8c498b
Reviewed-on: https://code.wireshark.org/review/37672
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-03 10:08:52 +00:00
Adrien Destugues 73d1721db6 DVB-S2: Reassemble GSE frames.
Large data (for example big DVB-RCS2 tables) can be fragmented at the
GSE level. Reassembly is required to properly decode the data.

Change-Id: I555148e99d43e610208bd87fc64a4bc212fea4b2
Reviewed-on: https://code.wireshark.org/review/37592
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-03 09:11:46 +00:00
Didier Barvaux fb215255bb DVB-RCS2: dissect Ethernet/VLAN payload
Change-Id: Iaae5bef3650544c49a74277495ef7a930390556a
Reviewed-on: https://code.wireshark.org/review/37591
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-03 09:11:31 +00:00
Josselin VALLET 4bf4ee88f0 DVB-RCS2: Handle optional BBFrame EIP CRC 32 field
Change-Id: Ie30eddf80797beaf86a339c2e5743da4a92ec0f0
Reviewed-on: https://code.wireshark.org/review/37590
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-03 08:18:58 +00:00
Michaël Bouchaud af31bff2f9 DVB-RCS: dissect signalling tables in DVB-S2 dissector
- Dissect the RCS header
- Dissect BCT, FCT, FCT2, SPT, NIT, RMT, MMT2, SCT, TIM, TBTP2, CMT
- Dissect RCS descriptors inside these tables

Change-Id: Ib6f3ec3dc0e5dce36f7480e645bffcfff6155e5f
Reviewed-on: https://code.wireshark.org/review/37587
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-02 19:05:57 +00:00
Michael Bouchaud (yoz) 50a71ea0a7 DVB-S2: Add DVB-S2x support
- New modcods
- Extended rolloff factor encoding

Change-Id: I4b5667ef286b04e95dd343c5ec7793376f4e09ad
Reviewed-on: https://code.wireshark.org/review/37586
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-01 10:44:40 +00:00
Audric Schiltknecht 5ae50899bd DVB-S2: Add option to not dissect BBFrame contents
Since bbframes can contain ethernet packets, it is sometimes a bit
annoying to write filters handling multiple layers of ethernet/ip/...

This option allows disabling dissection of the inner packets to focus
only on the outside layers.

Change-Id: I9409d5b671b616477fe7cfcfaabe1f33f0d528c1
Reviewed-on: https://code.wireshark.org/review/37585
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-01 08:36:14 +00:00
Michaël Bouchaud 4b40c28a0e DVB-RCS: Dissect NCR in DVB-S2 dissector
DVB-RCS specifies an NCR (Network Clock Reference) which can be included
in the GSE stream and used to synchronize the return channel.

Change-Id: Ie9c99c8964e44245258a4a446755b2c59379088f
Reviewed-on: https://code.wireshark.org/review/37584
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-01 04:15:28 +00:00
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
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
Alexis La Goutte 8a5bce55df dvb (s2): fix 'dvb-s2_bb.reserved' exists multiple times with NOT compatible types: FT_NONE and FT_BYTES
Change-Id: If8fee9f8c27d32acecec975c7107b6e8203480ed
Reviewed-on: https://code.wireshark.org/review/20706
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-25 16:21:10 +00:00
MustBeArt 110ffacdb3 DVB-S2-BB: Support all four MA modes
Support all four mode adaptation input and output interfaces defined in
SatLabs reference document sl_561, "Mode Adaptation Input and Output
Interfaces for DVB-S2 equipment", instead of only the two modes that use
a sync byte.

There is nothing in the packet format that specifies which format is in
use, so we have to guess based on the possible occurrence of a sync byte
and the CRC-protected BBHEADER that follows the mode adaptation header,
which is a different length for each format. This is a heuristic dissector,
so if none of the four formats match, we just return.

Unfortunately, the BBHEADER CRC is only 8 bits, so there can be false
matches rather often. We detect when the packet matches more than one format,
and issue an expert info diagnostic. It is also possible for a UDP packet
that isn't DVB-S2 at all to match spuriously, with probability around 1%
(assuming random data). This is acceptable for a heuristic dissector,
especially one that is initially disabled.

Standardize spelling per sl_561: adaption -> adaptation

Change-Id: Iffc73ed01c72d1247e2378d648ffe0d7c1f21612
Reviewed-on: https://code.wireshark.org/review/19708
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-23 01:31:06 +00:00
MustBeArt 86c4808518 DVB-S2-BB: Obey frame format from BB Header fields
Interpret packet contents according to the descriptive fields contained
in the BB header. Instead of always assuming a Generic Stream frame format,
use the TS/GS field to detect Generic Stream, Generic Packetized, Transport
Stream, or (reserved) frame formats and decode accordingly.

In the case of Generic Stream frames, check the validity of header fields
ISSYI, NPD, and UPL, and issue expert info if they are invalid for Generic
Stream frames. Then dissect as GSE (as before).

For other frame formats, just dump them as bytes for now.

Change-Id: I6b040207f83369110eb704c543861c887f77baa7
Reviewed-on: https://code.wireshark.org/review/19634
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-01-19 21:38:56 +00:00
MustBeArt 990d2a9a4a DVB-S2-BB: Use proto_tree_add_bitmask()
Change-Id: I1a4b50873a183c0f6051dc0db3fecf5e62c92cbb
Reviewed-on: https://code.wireshark.org/review/19633
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-01-14 04:14:36 +00:00
MustBeArt 15deb60734 DVB-S2 BB: Handle GSE Padding in BB frames
GSE Padding is outside of any GSE Packet and continues to the end of the
Baseband Frame, per 4.2.1 of ETSI TS 102 606-1.

Added dvb-s2_gse.padding as an integer representing the length in bytes
of the padding field.

Change-Id: I9ed22c37a1969059a09ba44d9e3473cb9d0a1880
Reviewed-on: https://code.wireshark.org/review/19579
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-13 12:50:36 +00:00