aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dvb-s2-bb.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-25dvb (s2): fix 'dvb-s2_bb.reserved' exists multiple times with NOT compatible ↵Alexis La Goutte1-1/+1
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-01-23DVB-S2-BB: Support all four MA modesMustBeArt1-34/+92
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-19DVB-S2-BB: Obey frame format from BB Header fieldsMustBeArt1-20/+88
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-14DVB-S2-BB: Use proto_tree_add_bitmask()MustBeArt1-38/+36
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-13DVB-S2 BB: Handle GSE Padding in BB framesMustBeArt1-20/+34
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-07DVB-S2 BB: Fix BB header CRC checksMustBeArt1-9/+4
Fix problem with baseband header CRC check that caused almost all baseband frames to show a spurious CRC error, introduced with proto_tree_add_checksum. Change-Id: I6b2f9680507eeb79e59b825f3ac9e4cee1033976 Reviewed-on: https://code.wireshark.org/review/19567 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-12-30Revert "Support all MA modes, fix BB CRC and frag edge cases"Paul Williamson1-175/+85
Supporting all MA modes this way makes the dissector useless as a heuristic dissector; it always matches. I just didn't understand about heuristic dissectors, and will look for a better solution. The fragmentation edge cases were also misunderstood. On closer reading of the spec, these are not valid edge cases to be handled smoothly, but packet formatting errors to be diagnosed. The BB CRC fix is valid AFAIK, and will be resubmitted separately. This reverts commit 2563503301aa4321a9a7a1ed392c9cbbe147fd2f. Change-Id: I842f4eca59193b24f41a67ce7d081c681b70f449 Reviewed-on: https://code.wireshark.org/review/19449 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-25Support all MA modes, fix BB CRC and frag edge casesMustBeArt1-85/+175
Support all four mode adaptation interface formats. Add a user preference to specify which format is in use, or to request that the format be guessed. Guessing is improved, but can never be reliable. Fix problem with baseband header CRC check that caused almost all packets to show a spurious CRC error, introduced with proto_tree_add_checksum. Fix problem with GSE PDU fragmentation CRC beginning in one fragment and ending in another. Any GSE frames following the fragment containing the end of the CRC would be parsed at the wrong offset. Fix problem with IPv4 or IPv6 starting exactly on a fragmentation boundary, so that one baseband frame contains the complete GSE header but zero bytes of the IP payload. Trying to further dissect the zero-length payload led to a "malformed packet" display. Standardize spelling per governing document: adaption -> adaptation Change-Id: I69e64e74e4b4f02515411471e1d76b0eeb02fef1 Reviewed-on: https://code.wireshark.org/review/19421 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: Anders Broman <a.broman58@gmail.com>
2016-07-27Follow up for proto_tree_add_checksum.Michael Mann1-2/+20
Fill in the "gaps" so that all dissectors that verify checksums have both a status and expert info field. Also address comments from original proto_tree_add_checksum patch that didn't make it. Ping-Bug: 8859 Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f Reviewed-on: https://code.wireshark.org/review/16590 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-8/+4
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-2/+2
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-02-22Fix some hf_ field datatype conflicts.Michael Mann1-1/+1
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES 'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING 'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES 'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES 'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER 'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32 'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d Reviewed-on: https://code.wireshark.org/review/14070 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-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-6/+2
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-23Remove more deprecated tvb_lengthEvan Huus1-2/+2
Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2 Reviewed-on: https://code.wireshark.org/review/9042 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-2/+2
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Also: - FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...) - Change one case of incorrect '||' to '|' Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0 Reviewed-on: https://code.wireshark.org/review/4184 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-12(Trivial)Bill Meier1-1/+1
- Fix indentation to match editor modelines (tabs-->spaces); - Rework/add some whitespace; svn path=/trunk/; revision=53978
2013-10-02From Audric Schiltknecht via ↵Pascal Quantin1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9218 : Fix typo in MODCOD list of DVB-S2 dissector svn path=/trunk/; revision=52338
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-6/+6
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-06-27From Audric Schiltknecht, bug 8521 ↵Michael Mann1-1/+2
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8521) According to ETSI TS 102 771 (GSE implementation guidelines), "mandatory extension headers" - when GSE's protocol type field is (strictly) less than 256 (0x100) - are of 'pre-defined length (and format) that must be known by all GSE receivers'. svn path=/trunk/; revision=50180
2013-03-25From Audric Schiltknecht via ↵Evan Huus1-5/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8520 Fix typo in DVB-S2 dissector: s/lable/label/. svn path=/trunk/; revision=48547
2013-03-17[-Wmissing-prototypes]Anders Broman1-1/+1
Use explicit casts. svn path=/trunk/; revision=48347
2013-03-16[-Wmissing-prototypes]Anders Broman1-1/+3
Use explicit casts. svn path=/trunk/; revision=48341
2012-11-25Fix several [-Wshadow] warnings;Bill Meier1-56/+57
Also: Do some minor whitespace and formatting changes. svn path=/trunk/; revision=46192
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-13From Tobias Rutz; Minor updates.Bill Meier1-2/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7518 svn path=/trunk/; revision=44475
2012-08-10Bug fixes and general cleanup;Bill Meier1-460/+464
- untermintated range-string array can/will cause crash (e.g. 'tshark -G values'); - remove all 'if (tree)': calling col_...() and sub-dissectors under 'if (tree)' not OK; - simplify code for heuristic test; - find_dissector() calls need to be done only once (not on each prefs callback); - do some whitespace/indentation changes. svn path=/trunk/; revision=44436
2012-07-31Whitespace fixes:Jörg Mayer1-8/+8
- trailing whitespace - mixing TAB and space for indentation svn path=/trunk/; revision=44150
2012-07-29Fix usage of range string and use extended value strings in a few placesPascal Quantin1-3/+5
svn path=/trunk/; revision=44115
2012-07-29From Tobias Rutz via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7518Alexis La Goutte1-0/+1123
Add new dissector for DVB-S2 Baseband Frame and GSE dissection There is a standard for satellite receiving equipment to output all the received data over an ethernet interface. This dissector is able to show these packets according to the ETSI standards. By default the dissector is disabled, it can be enabled in the protocol settings dialogue With the dissector... svn path=/trunk/; revision=44110