Commit Graph

33 Commits

Author SHA1 Message Date
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
Evan Huus eda26f9e5f wmem: convert more asn1 dissectors to pinfo->pool
We prefer pinfo->pool over the global wmem_packet_scope() now. Convert a
few more asn1 dissectors. After this commit, just three asn1 dissectors
remain.
2021-08-19 15:07:44 +00:00
João Valverde dcc02b1003 dissectors: Replace g_log() with ws_log() 2021-06-16 12:50:28 +00:00
Martin Mathieson 51cbb47e1f Fix some detected spelling errors in ASN1 dissectors.
Done by scanning the asan1 template files. If there are spelling
mistakes in the specifications, we should ignore.  Note that for z3950, I had
already found and accidentally fixed the same errors in the generated
file (before I taught my script to ignore gnerated dissector files).
2020-09-05 00:51:48 +00:00
Gerald Combs 8f08a4e74e Try to discourage the use of APIs via counting.
Add the ability to specify maximum function counts for each group to
checkAPIs. Add maximum counts for the "termoutput" and "abort" groups
where needed. Show summaries in various checkAPI targets.

Switch uses of ws_g_warning back to plain g_warning.

Change-Id: I5cbddc8c671729e424eed8551f69116d16491976
Reviewed-on: https://code.wireshark.org/review/29721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-19 16:07:03 +00:00
Darien Spencer 2bd79c8208 NBAP: Change E-DCH type choosing condition
Change-Id: If6f07db858c92cd82ff2049c631606a00aba13dc
Reviewed-on: https://code.wireshark.org/review/29742
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-19 13:48:41 +00:00
Darien Spencer 0001152616 NBAP: Support IB_SG_DATA Encoding Variant 2
The code was decoding IB_SG_DATA according to Encoding Variant 1.
Added parsing of the second variant and a preference to let the user choose
between the two.

Bug: 15054
Change-Id: I45efcb84c48d599b46037488792dbc5dad97ebd1
Reviewed-on: https://code.wireshark.org/review/29018
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-16 19:31:10 +00:00
Darien Spencer 4ffca502cc NBAP: Simplify private data creation
Change-Id: Ief23e5675f74564a3b303b5a13b4fcbd9e814c90
Reviewed-on: https://code.wireshark.org/review/28172
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:32 +00:00
Darien Spencer 79a024337d NBAP: Use PINFO_FD_VISITED macro
Change-Id: I1436a8840f5b771583876b988f94e43363f7984a
Reviewed-on: https://code.wireshark.org/review/27982
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-04 05:10:23 +00:00
Darien Spencer 5ccac2b65a NBAP: Simplify private data API
Explicit getters/setters seems excessive and become
unmaintainable when the private data struct gets big, like in NBAP

Change-Id: I54d6eea327f1b393d9f80aafcbdd75080e10d50d
Reviewed-on: https://code.wireshark.org/review/27749
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-23 17:50:56 +00:00
Pascal Quantin ab53ddbdce NBAP: remove an unused expert info field
Change-Id: I1d90a81792d76a39532323ed53a187aeda1f231b
Reviewed-on: https://code.wireshark.org/review/27740
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-23 07:33:10 +00:00
Pascal Quantin 54ab26ad93 NBAP: remove a useless mask
Change-Id: Ic433e7f01394fb5d8229d04a7ddbfb52547676e8
Reviewed-on: https://code.wireshark.org/review/27739
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-23 07:32:43 +00:00
Pascal Quantin 54e6d5551e NBAP: optimize a bit the heuristic checks
Change-Id: Idbc0d8e87e3e91890de61449fab8bc70cbbb21f0
Reviewed-on: https://code.wireshark.org/review/27724
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-23 04:17:45 +00:00
Nick James 2cf6517ec0 NBAP: Fix and enhance SIB parsing
1. Parsing of complete-sib-short was wrong - did not consider the 8 bits of length in the begining
2. Added re-assembly logic for SIBs segmented into first/subsequent/last payloads

Change-Id: I2c4aab2cace795c3e47a22921a34efc4ee26a25f
Reviewed-on: https://code.wireshark.org/review/25598
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-13 06:17:26 +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
Peter Hamilton 78ed5f34f5 NBAP: Always map NB-CC to CRNC-CC
Now maps for all channels and not only E-DCH

Change-Id: I51099e887830e5142b58fd624775d395e354b012
Reviewed-on: https://code.wireshark.org/review/24572
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-26 08:48:57 +00:00
Michael Mann abfb644117 Add conversation endpoint type
For the moment this mirrors the port_type enumeration (PT_XXX), but the
intent is to move away from using "port types", eliminating most (if not
all)

Added conversation_pt_to_endpoint_type() so that conversations deal with the
correct enumeration.  This is for dissector that use pinfo->ptype as input
to conversation APIs.  Explicit use of port types are converted to using
ENDPOINT_XXX type.

Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef
Reviewed-on: https://code.wireshark.org/review/24166
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 16:53:57 +00:00
Darien Spencer 1f9990b765 NBAP: Refactor information storing per-packet
Migrating from static variables to a single struct for
information 'carried' between different field in a NBAP packet.

Bug: 13879
Bug: 13712
Change-Id: Ie35619d64c4b9a3d5459d528788f74f952e75c11
Reviewed-on: https://code.wireshark.org/review/22902
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-08-29 03:51:16 +00:00
Darien Spencer a08e998ca2 NBAP: Replaced a comment
Edited a comment to explain the usage of the 'hs-dsch physical layer category' field

Change-Id: I400eabd764818bbc39ab1128500b8700647175e3
Reviewed-on: https://code.wireshark.org/review/23218
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-08-26 12:37:26 +00:00
Sam Cisneros ff5280906c NBAP over SCTP heuristic dissector
Bug: 13866
Change-Id: I895266a6aa7458aa3ab18742bcd981986c2fd17c
Reviewed-on: https://code.wireshark.org/review/23074
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-08-15 23:01:42 +00:00
Pascal Quantin 2483ef02c8 NBAP: fix Coverity CID 1414728
Change-Id: Ib64334f1fa8d7ff92dbfdf9bb805049f687836b7
Reviewed-on: https://code.wireshark.org/review/22579
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-07-10 20:14:52 +00:00
Darien Spencer 7b68744cfd NBAP: Moved all global variables together
Hopefully if they are in one place replacing them with a non-static alternative will be easier

Change-Id: I91dd47ea51a1435cea4e68d88d6afe240153fe69
Reviewed-on: https://code.wireshark.org/review/22539
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-07-10 09:00:24 +00:00
Pascal Quantin a70df2ce4c NBAP: please checkAPIs.pl script
Replace (legitimate) g_warning by ws_g_warning

Change-Id: Ib8a39070b06672342ea5ea42c147c56105252f89
Reviewed-on: https://code.wireshark.org/review/22534
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: Anders Broman <a.broman58@gmail.com>
2017-07-06 10:41:08 +00:00
Piotr Tulpan bb470c9067 NBAP: improve conversation management
Keeps the address of the newly opened channels in the CTCH-SetupRqst message
to match them with the addresses sent in the Respone message to get exatch
match of the conversation.

Change-Id: I445e08480ddd178f65979b9fbc91c6031e206a61
Reviewed-on: https://code.wireshark.org/review/22271
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-07-04 17:06:12 +00:00
Darien Spencer 8775b0b1b2 [UMTS RLC] Renaming dissector files to fit FP/MAC
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-06-17 18:48:59 +00:00
sswsdev 6abff3174b UMTS FP: Refactored FP Conversation Info struct
Moved some fields which are only relevant to HS-DSCH / E-DCH  channel into appropriate 'channel specific' structs.
Also renamed "dchs_in_flow_list" to  "dch_ids_in_flow_list"

Change-Id: I7bdeb74c7b1eda0872c0243f0e5f229df2691866
Reviewed-on: https://code.wireshark.org/review/21707
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-20 16:32:00 +00:00
S. Shapira 163d66099d UMTS Iub: Refactored U-RNTI resolving logic for dedicated channels
Instead of mapping Scrambling codes to U-RNTIs, now mapping CRNC communication context IDs to U-RNTIs.

Change-Id: Id81b7764d2941b742f21094dac391f8658061a80
Reviewed-on: https://code.wireshark.org/review/21495
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-05-07 21:01:05 +00:00
sswsdev 2e6cb9dbab UMTS Iub: Added U-RNTI resolving logic for UEs on DCH
The goal is to figure out the U-RNTI for UEs in DCH to
preserve a single continous RLC session when the UE moves to FACH
(Since the UE ID in FACH is derived from the identity found in the
MAC layer, which is sometimes the U-RNTI)
UMTS RRC dissector now defines a single 'umts rrc private data'
structure as the way to access the actx->private_data field

Change-Id: Id0ffcbcdf0a8babe533915855909e250852e46cf
Reviewed-on: https://code.wireshark.org/review/21087
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-04-20 20:19:46 +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
Michael Mann 9c9fd67d8b packet-nbap.c: Convert some g_ APIs to wmem.
Change-Id: I480dd5c533b53cc90e483f42e974c5f3e660e305
Reviewed-on: https://code.wireshark.org/review/16548
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-20 06:00:35 +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
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 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