Commit Graph

37 Commits

Author SHA1 Message Date
John Thacker c00b062cb0 RANAP: Don't attempt to re-register heuristic dissectors
Move the RANAP heuristic dissector registration under the initialization
guard that they're only registered once. Prevents console warnings about
the dissectors already being registered to the sccp and sua tables if
a RANAP preference is changed.
2021-05-25 04:19:28 +00:00
John Thacker caed4cce7d RANAP: Use RAI specific MNC/MCC fields
The RANAP ASN.1 defines a RAI as being composed of an LAI and a RAC.
(Cf. the RNSAP ASN.1, which defines a RAI as being composed of a
PLMN-Identity, a LAC, and an RAC.) Handle it so that the RAI fields
are used when dissecting a RAI, only using the LAI fields if the LAI
dissection was not called from the RAI.
2021-05-12 04:53:23 +00:00
John Thacker 7f4c33d634 RANAP: Use specific MNC/MCC fields when applicable
When the PLMNidentity information element is part of the CGI, LAI, RAI,
SAI, or TAI, use the specific MNC/MCC field types as appropriate.
Otherwise, use E212_NONE as before.
2021-05-08 17:26:04 -04:00
John Thacker 68ba60774f Prettify and standardize LAC, RAC, SAC, TAC in several ASN.1 dissectors
The LAC, RAC, SAC, and TAC tend to be defined in ASN.1 as OCTET STRINGS
of lengths 1, 2, or 3. It generally makes sense to dissect them as
FT_UINT[8,16,24], as appropriate, with BASE_DEC_HEX instead of as FT_BYTES,
so standardize on that.  See commit d6f91a7ca4
for similar work for S1AP.
2021-03-30 21:48:00 -04: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
Piotr Tulpan bc5b71c00b RANAP: Handle 7 byte NSAP address in transportLayerAddress
Handle NSAP 7 byte IPv4 address in transportLayerAddress field which aren't padded to 20 bytes.

Change-Id: Ied9a9549612fe8e9ec511419ee0d7e5ae06bcedf
Reviewed-on: https://code.wireshark.org/review/33278
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-27 08:34:21 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
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-04-04 04:03:38 +00:00
Anders Broman ea5c0d947e GTP:Dissect more IEs
Bug: 15626
Change-Id: I39f37c3ca7f5f56946a21b5cc1a4c2d3b39d381d
Reviewed-on: https://code.wireshark.org/review/32521
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-22 18:41:58 +00:00
Anders Broman 0bf337749e IMSI based filtering for SCCP/RANAP
Bug: 9074
Change-Id: Iae7e233d03367678a6925c732bf4b6d78c211cd8
Reviewed-on: https://code.wireshark.org/review/32286
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-01 14:15:17 +00:00
Guy Harris 7eb3e47fa4 Try to squeeze some bytes out of the frame_data structure.
Make the time stamp precision a 4-bit bitfield, so, when combined with
the other bitfields, we have 32 bits.  That means we put the flags at
the same structure level as the time stamp precision, so they can be
combined; that gets rid of an extra "flags." for references to the flags.

Put the two pointers next to each other, and after a multiple of 8 bytes
worth of other fields, so that there's no padding before or between them.

It's still not down to 64 bytes, which is the next lower power of 2, so
there's more work to do.

Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe
Reviewed-on: https://code.wireshark.org/review/31213
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-27 04:34:29 +00:00
Vasil Velichkov 50e6046881 RANAP: decrease the min length to 7 bytes
The min length was increased to 8 in d9c70acaf4 but there are valid 7
bytes long RANAP messages that are not recognized by the heuristic
function. Revert the value to 7 as in 482a3cd1f1

Change-Id: I5096cd905c24c87dccbc2aa4bbdccc7b0febead7
Reviewed-on: https://code.wireshark.org/review/28945
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-08-03 19:47:45 +00:00
Darien Spencer 8f3ff1d24d RANAP: Simplify private data creation
Change-Id: Id6dd45789b7418143dc1046dc465a0e60ee87c91
Reviewed-on: https://code.wireshark.org/review/28171
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-09 21:43:15 +00:00
Sam Cisneros d9c70acaf4 RANAP: optimize a bit the heuristic checks
And explain the new conditions

Change-Id: I7061ef783bebc260370c16622b8811e7b109c520
Reviewed-on: https://code.wireshark.org/review/27727
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-23 07:34:08 +00:00
Dario Lombardo 4a156da068 Remove autotools build system.
It has been replaced by cmake.

Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a
Reviewed-on: https://code.wireshark.org/review/26969
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:46:17 +00:00
Dario Lombardo 692cef88c7 dissectors: more SPDX license convertions.
Change-Id: I96e1f1cdbaaf49d65705ecacc903f73cf0e47d7c
Reviewed-on: https://code.wireshark.org/review/26334
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2018-03-07 17:18:47 +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
Darien Spencer f97befbaa5 RANAP: Associate RTP dissector with CS streams
Change-Id: If02b8cc5110c70e50ae04d245c45b1d133ee7fd3
Reviewed-on: https://code.wireshark.org/review/24010
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-26 07:10:03 +00:00
Ivan Nardi f4d14368e2 Ranap: improve heuristic algorithm
Strength the heuristic cheking PDU-Type and Criticality field values too

Change-Id: Id95603634a93033664bdbd169880e6b411cfbc11
Bug: 13791
Reviewed-on: https://code.wireshark.org/review/22076
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-11 19:17:14 +00:00
Pascal Quantin e82fa761d6 RANAP: prevent heuristic dissector from adding info to tree or triggering exception
Bug: 13770
Change-Id: I6ba5dfb5098ea1a4d4d1e2d740382326c7d58f8c
Reviewed-on: https://code.wireshark.org/review/22006
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Ivan Nardi <nardi.ivan@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-06-07 14:21:21 +00:00
Ivan Nardi 9cfdece0c1 [Ranap] Heuristic: update to the current highest ProcedureCode id
Change-Id: Ib17b5db42717d92dfd139d56b947166fddc29c5b
Reviewed-on: https://code.wireshark.org/review/21986
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-06 19:31:41 +00:00
AndersBroman 667782b388 [RANAP] Pretify info column.
Change-Id: I7f1832cd818d76843e00b689883e28ed46633585
Reviewed-on: https://code.wireshark.org/review/21739
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-23 13:11:39 +00:00
AndersBroman fc1c8e139b [RANAP] Update to 3GPP TS 25.413 V14.0.0 (2017-03)
Change-Id: I5d448a4daf438b05a30473e999574803e5d6ade9
Reviewed-on: https://code.wireshark.org/review/21730
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-22 15:29:14 +00:00
AndersBroman eda05b5cd2 [RANAP] Update to 3GPP TS 25.413 V13.2.0 (2016-06)
Change-Id: I1f6cc99761e13cd09811a4cebca145c47d5b4eca
Reviewed-on: https://code.wireshark.org/review/20657
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-21 16:45:09 +00:00
AndersBroman d9a71c496e [RANAP] Dissect RIMInformation.
Change-Id: I39281c36e55b09427b3022362964c934be433ef1
Reviewed-on: https://code.wireshark.org/review/20655
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-21 15:26:12 +00:00
Pascal Quantin 54c3df86f3 PER: add support for bit strings >= 16K
Bug: 13123
Change-Id: Ie20ef75393ea601d2702a024e0ade94b85adf9f2
Reviewed-on: https://code.wireshark.org/review/18748
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>
2016-11-12 10:21:22 +00:00
Pascal Quantin d6f91a7ca4 S1AP: prettify dissection
Change-Id: I2b4339e489d11ade2751cad8874ba220d12fe3db
Reviewed-on: https://code.wireshark.org/review/17615
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>
2016-09-10 07:47:48 +00:00
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Binh Trinh b9e70e9b4c RANAP: Add an heuristic to decode the HO-to-UTRAN Command embedded in the RRC Container within the TargetRNC-to-SourceRNC Transparent Container
Change-Id: Iea7c8d24f52cf8bd11e13a53853e11ec1ecdcd36
Reviewed-on: https://code.wireshark.org/review/17058
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
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>
2016-08-22 12:08:31 +00:00
Alexis La Goutte 767e1a26b8 RANAP: fix indent (use 2 spaces) and modelines
Change-Id: I84e3157a9303572dcd3d9ff5df6802c42553e62f
Reviewed-on: https://code.wireshark.org/review/17197
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-08-21 23:48:49 +00:00
Binh Trinh 2a73658c5c RANAP: fix TargetRNC-ToSourceRNC-TransparentContainer decode
Change-Id: Iadf712b6bad75faeade00ebd1f6bb2cb2013065b
Reviewed-on: https://code.wireshark.org/review/17044
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-14 05:45:13 +00:00
Michael Mann a062c80236 ASN.1 dissectors - don't try to find yourself.
If an ASN.1 dissector is calling register_dissector for itself in its proto_register_xxx
function and then calling find_dissector for itself in its proto_reg_handoff_xxx
function then just create a static handle for that dissector and use the return
value of register_dissector, so the find isn't necessary.

Change-Id: I911bdadc2fb4259601c141b955e741a2369cc447
Reviewed-on: https://code.wireshark.org/review/16233
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-01 14:26:20 +00:00
João Valverde a16d401b25 Remove Makefile.common files
Now that nmake build system has been removed they are not needed anymore.

Change-Id: I88075f955bb4349185859c1af4be22e53de5850f
Reviewed-on: https://code.wireshark.org/review/16050
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-06-30 11:04:17 +00:00
Pascal Quantin 6baa1b544c Remove Nmake build system
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61
Reviewed-on: https://code.wireshark.org/review/15777
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-06-15 19:21:57 +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 e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
João Valverde 64c70ea62c Clean asn1 make/cmake whitespace
Add missing newline or remove extra newlines at the end of the file.

Trim trailing whitespace.

Change-Id: I73b7a4e20969bc13f72bf97e981fd5de89d8bb17
Reviewed-on: https://code.wireshark.org/review/14400
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-03-13 21:58:09 +00:00
João Valverde 54a520d4a1 Move /asn1 to /epan/dissectors
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9
Reviewed-on: https://code.wireshark.org/review/14388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
2016-03-13 21:30:24 +00:00