aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-catapult-dct2000.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-20Fix some issues seen by tools/check_typed_item_calls.pyMartin Mathieson1-1/+1
2023-01-03Change some vals entries to equivalent common tfsMartin Mathieson1-14/+2
2022-10-14DCT2000: Replace tvb_get_const_stringz()João Valverde1-13/+13
Ping #18447.
2022-08-21DCT2000: Don't assign to tag unused valueMartin Mathieson1-1/+2
2022-06-20DCT2000: call dissectors for R16 RRCMartin Mathieson1-2/+3
2022-06-06DCT2000: Fix format of string with PDCP-NR keysMartin Mathieson1-4/+4
2022-05-22catapult-dct200: fix clang analyer warning (Dead.Store)Alexis La Goutte1-3/+3
packet-catapult-dct2000.c:1099:13: warning: Value stored to 'tag' is never read [deadcode.DeadStores] packet-catapult-dct2000.c:1100:13: warning: Value stored to 'len' is never read [deadcode.DeadStores] packet-catapult-dct2000.c:3076:21: warning: Value stored to 'sub_dissector_result' is never read [deadcode.DeadStores]
2022-05-03PDCP-LTE: Allow updated keys to be found by frame numberMartin Mathieson1-3/+3
2022-04-19PDCP-NR: changes to make security keys work betterMartin Mathieson1-6/+284
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-4/+4
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2021-12-19Replace g_snprintf() with snprintf() (dissectors)João Valverde1-3/+3
Use macros from inttypes.h with format strings.
2021-12-17DCT2000: For ipprim frames, show header even when no payload dissectorMartin Mathieson1-4/+3
2021-12-05Dissectors should not include stdio.h, unless neededJaap Keuter1-1/+1
2021-09-06catapult-dct2000: Fix Dead Store found by Clang AnalyzerAlexis La Goutte1-1/+1
packet-catapult-dct2000.c:2826:21: warning: Value stored to 'sub_dissector_result' is never read [deadcode.DeadStores]
2021-07-21First pass pinfo->pool conversion, part 2Evan Huus1-5/+5
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
2021-07-13DCT2000: Support a format for MAC-NR PDUs inside comment linesMartin Mathieson1-1/+83
2021-04-30Cast away the return value of g_strlcpy() and g_strlcat().Guy Harris1-2/+2
Most of the time, the return value tells us nothing useful, as we've already decided that we're perfectly willing to live with string truncation. Hopefully this keeps Coverity from whining that those routines could return an error code (NARRATOR: They don't) and thus that we're ignoring the possibility of failure (as indicated, we've already decided that we can live with string truncation, so truncation is *NOT* a failure).
2021-04-28DCT2000: Lookup xnap and ngap protocolsMartin Mathieson1-0/+8
2020-12-13DCT2000: Allow any PDU to be dissected.Jose Rubio1-1/+19
There are traffic dumps that only include the PDU payload without lower layer information. This commit allows any dissector to be embedded in the DCT2000 as a protocol name. tshark/wireshark will decode it despite having no lower layer information. The change allows a DCT2000 protocol field to look for a dissector. The change can be enabled or disabled with the preference dct2000.use_protocol_name_as_dissector_name and it defaults to FALSE. Example: Session Transcript (format 3.1) December 6, 2020 16:45:20.5185 LTE-RRC.1/lte_rrc.dl_dcch/1/// r tm 22.5695 l $2c02 S1AP.1/s1ap/1/// s tm 23.3926 l $001700130000020063000608023d7c00830002400202a0
2020-11-26DCT2000: misc changesMartin Mathieson1-8/+77
- For NR/LTE RRC messages, add cellGroup Id - NRUP messages appearing as hex in comments passed to dissector
2020-07-25ISDN, LAPD: clean up the way they connect to other dissectors.Guy Harris1-2/+8
Have the ISDN dissector take the ISDN pseudo-header through its data argument, rather than assuming it's in pinfo->pseudo_header, so it can be used if the link-layer type of the capture isn't ISDN. Have it add the direction to its protocol tree, so it's there for all ISDN packets. Have more versions of the LAPD dissector: one where the ISDN direction information is available through an ISDN pseudo-header passed as its data argument; one for use when the link-layer type *is* LAPD, where the ISDN direction information may be available through the direction part of the packet flags. Pass more flags to the routine that does LAPD dissection to indicate the direction (user->network or network->user) and whether the user or network side is on another machine; set those appropriately in the dissector routines that call it. To set those flags: in the routine that handles WTAP_ENCAP_LAPD, check the direction flags in pinfo->rec->rec_header.packet_header.pack_flags; in the routine that handles WTAP_ENCAP_LINUX_LAPD, check the SLL header; in the routine that's called from the ISDN dissector and other dissectors that can supply an ISDN pseudo-header, check the struct isdn_phdr passed to it via the data argument; for the routine that's to be called from L2TP pseudowire type and SCTP dissector tables, pass nothing, as there's currently no direction indication supplied - if that information is available from the encapsulating protocol in some fashion, we should make changes to supply that information. Have the AudioCodes Trunk trace protocol dissector call the LAPD-with-pseudoheader dissector, handing it an ISDN pseudo-header with a direction indication from the direction field (and a channel of 0 to indicate the D channel). Have the Ascend text dump reader in libwiretap use WTAP_ENCAP_ASCEND for all packets, even Ethernet and ISDN packets, and have the Ascend text dump dissector handle that, calling the "no FCS" version of the Ethernet dissector and calling the LAPD-with-pseudoheader dissector with a pseudo-header filled in with the direction (and a channel of 0). Have the Catapult DCT 2000 text dump dissector call the LAPD-with-pseudoheader dissector with the pseudo-header supplied by libwireshark. Have the V5 envelope function frame get its ISDN pseudo-header from its data argument, and call the LAPD-with-pseudoheader dissector with that pseudo-header. Have the ISDN dissector treat its data argument as pointing to the ISDN pseudo-header, rather than assuming it's the one in pinfo->pseudo_header->isdn - the latter is the one supplied by libwiretap, but there's no guarantee that an ISDN pseudo-header was supplied by libwiretap, as the lowest-level protocol layer might not have been ISDN. Change-Id: I9f702b879bbc3fb42bcb43c28f797bfc327562c6 Reviewed-on: https://code.wireshark.org/review/37953 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-03-21Some cppcheck fixes.Martin Mathieson1-1/+1
- UDPCP: fix test for Sync frame detection - Avoid a couple of redundant assignemnts Change-Id: Ib69a3ff4f0e802ddbbbd29eb2a803372c41a7ce4 Reviewed-on: https://code.wireshark.org/review/36526 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-02-15Some issues spotted by PVS-Studio in bug 16335. Many more remainMartin Mathieson1-1/+0
Change-Id: If856e25af8e33eeef5b9e595f1f6820459892b17 Reviewed-on: https://code.wireshark.org/review/36110 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
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-06-25DCT2000: skip/show carrierId for LTE/NR RRC headers.Martin Mathieson1-0/+16
Change-Id: I95023cb395a913408d47e559ff5aa2b6843749f5 Reviewed-on: https://code.wireshark.org/review/33729 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-06-04DCT2000: Fix up the way RRC dissectors are called.Martin Mathieson1-11/+26
Change-Id: I61d51cfdde1ec7b358a6e1ade7d58f82aa897f04 Reviewed-on: https://code.wireshark.org/review/33455 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-04-29NR: Configure LCID -> RLC Bearer config from RRCMartin Mathieson1-1/+16
Change-Id: Ida6af4ccd2157f967b9d2340e6f12319e4dbe688 Reviewed-on: https://code.wireshark.org/review/32998 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-9/+9
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-23DCT2000: Add other NR RRC entry points.Martin Mathieson1-0/+18
Some of the PDU types needed for SA were missing in earlier RRC versions. Change-Id: Ida3b091fe91961cf3cd8e7476692d2467211b5fd Reviewed-on: https://code.wireshark.org/review/31703 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-12-14DCT2000: Pass NR NAS payload to dissector with S1AP framingMartin Mathieson1-0/+49
Change-Id: I2aa7a7f347e897b1a455ff3eb8ae126982ecc681 Reviewed-on: https://code.wireshark.org/review/31045 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-12-13DCT2000: Call nas-5gs dissectorMartin Mathieson1-3/+9
Change-Id: Iddca3571097210a7a0e090b506538bbf8ec64c07 Reviewed-on: https://code.wireshark.org/review/31040 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-12-13DCT2000: skip optional carrier type in LTE RRC primitive headerMartin Mathieson1-2/+12
Change-Id: I495e5b2da1b7c9a066294564837df471e25fbb73 Reviewed-on: https://code.wireshark.org/review/31037 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-08-31Add support for protocol aliases. Switch BOOTP to DHCP.Gerald Combs1-1/+1
Add support for aliasing one protocol name to another and for filtering using aliased fields. Mark aliased fields as deprecated. Rename the BOOTP dissector to DHCP and alias "bootp" to "dhcp". This lets you use both "dhcp.type" and "bootp.type" as display filter fields without having to duplicate all 500+ DHCP/BOOTP fields. To do: - Add checks to proto.c:check_valid_filter_name_or_fail? - Transition SSL to TLS. - Rename packet-bootp.c to packet-dhcp.c? Change-Id: I29977859995e8347d80b8e83f1618db441b10279 Ping-Bug: 14922 Reviewed-on: https://code.wireshark.org/review/29327 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-23DCT2000: For LTE MAC, set flag to say whether sf/sfn present or notMartin Mathieson1-0/+2
Change-Id: Id11866fd90e69a0185a8095a82fab5fbc44c92ae Reviewed-on: https://code.wireshark.org/review/29260 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-06-25DT2000: Call RRC dissector from newer primitives.Martin Mathieson1-5/+21
Change-Id: I7293771e96b029e2710a98e955bc40a16df2627a Reviewed-on: https://code.wireshark.org/review/28429 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-11dct2000: call LTE NAS dissector for r13 releaseMartin Mathieson1-1/+2
Change-Id: I35208b9bea8613468da53ae1541d0c5083cd27c0 Reviewed-on: https://code.wireshark.org/review/28201 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-06-02DCT2000: call lte rrc dissector for later releasesMartin Mathieson1-1/+5
Change-Id: I3c21c5c0654856edd31191062018a988f9e50ed1 Reviewed-on: https://code.wireshark.org/review/27952 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-05-31DCT2000: call NR RRC dissector for protocol payloads.Martin Mathieson1-78/+104
N.B. as the primitive headers are (so far) identical to LTE, re-use that code and remote 'lte' from primitive header fields. Change-Id: I53ece508608fc9108f218ee2933e1b13cc9777bb Reviewed-on: https://code.wireshark.org/review/27921 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-29DCT2000: Only look up old protocol name mappings if preference enabledMartin Mathieson1-75/+68
Change-Id: I871f7669c9303452f3407b65f83f68dee1ffc3bf Reviewed-on: https://code.wireshark.org/review/27197 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-02-22Catapult DCT2000: Update sscanf patterns, and avoid calling if possibleMartin Mathieson1-51/+52
Change-Id: Iafb7d62ab4a0431a00eaa284d421ea38b568533f Reviewed-on: https://code.wireshark.org/review/25990 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-02-15DCT2000: read new LTE MAC outheader valuesMartin Mathieson1-39/+51
Also extend the carrier id enum to r10 levels. Change-Id: I1eac50c54801010f0ad7408debb80ad811e03fbe Reviewed-on: https://code.wireshark.org/review/25793 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
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-01-30dct2000 wiretap: expect all lines to have exactly 4 subsecond digits.Martin Mathieson1-1/+1
Should fix clang warning created by https://code.wireshark.org/review/#/c/25492. Change-Id: Iafa31e24cd786a510f3a953d615df4cbc3930fa6 Reviewed-on: https://code.wireshark.org/review/25508 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl> Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-27DCT2000: after profiling, speed up some partsMartin Mathieson1-12/+31
Change-Id: Ia335aaca3368608fe495c887d846fe3f057b74dd Reviewed-on: https://code.wireshark.org/review/25486 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-28 FP: Combining heuristic dissectorsDarien Spencer1-1/+1
Combining all seperate heuristic dissector into one 'fp over udp' dissector. Also refactored the 'unknown format' dissector (formarly heur_dissect_fp) so it could work 'chained' to the others. Change-Id: I396c362a400f51171ee091317b6735dfd8bd19df Reviewed-on: https://code.wireshark.org/review/22368 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-06-19RLC: Renamed U-RNTI to UE IDDarien Spencer1-1/+1
The 'U-RNTI' field in RLC Info struct is both used in the code and shown in the UI as a generic unique 'UE ID' (not specificly U-RNTI, although sometimes it is) This commit renames the field to fit it's usage. Change-Id: Ib42b8ed5192fe60c9a164d6d225634be53708c66 Reviewed-on: https://code.wireshark.org/review/22225 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-19[UMTS RLC] Rename proto variableDarien Spencer1-3/+3
To match the recently renamed file name. Change-Id: Id784b955ec96a52a5f380d415094dce81e1774d5 Reviewed-on: https://code.wireshark.org/review/22222 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-06-17[UMTS RLC] Renaming dissector files to fit FP/MACDarien Spencer1-1/+1
Currently the UMTS FP & MAC dissector's are named packet-umts_X. This commit renames the UMTS RLC's files to show their relation. Change-Id: I9e37be95f7c7d08278075a49b8abc2b480a13d64 Reviewed-on: https://code.wireshark.org/review/22188 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>
2017-04-03Use col_append_str() for fixed stringsStig Bjørlykke1-2/+2
Change from col_append_fstr() to col_append_str() when appending strings without formatting. Change-Id: I8975704c246f2b9a1301ed5f96273aa9d61c6f44 Reviewed-on: https://code.wireshark.org/review/20857 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-28Add bounds checks for references to outhdr_values.Guy Harris1-37/+81
Don't run past the end of the outhdr_values array. While we're at it, don't make it a global array - it doesn't need to be global, as its values don't persist from invocation to invocation, and this would allow use of this routine in multiple threads in parallel. (Yes, we have other global variables that don't maintain state, but we should get rid of that, too.) Change-Id: I7ceed3c9ba6356eddb7d52472e9d53dd08f90029 Reviewed-on: https://code.wireshark.org/review/20770 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>