Commit Graph

20 Commits

Author SHA1 Message Date
João Valverde 19dcb725b6 epan: Remove STR_ASCII and STR_UNICODE
These display bases work to replace unprintable characters so the
name is a misnomer. In addition they are the same option and this
display behaviour is not something that is configurable.

This does not affect encodings because all our internal text strings
need to be valid UTF-8 and the source encoding is specified using
ENC_*.

Remove the assertion for valid UTF-8 in proto.c because
tvb_get_*_string() must return a valid UTF-8 string, always, and we
don't need to assert that, it is expensive.
2021-12-03 04:35:56 +00:00
Evan Huus e69446aa55 asn1: convert most dissectors to pinfo->pool
Part 1/2 as the commits were too big for CI.

Largely find/replace, with a few manual tweaks. Then regenerate the asn1
dissector sources and make sure everything still builds. There are a
handful of cases I skipped as too complex, but this covers most of the
asn1 dissectors.
2021-07-26 15:30:11 +00:00
Anders Broman 96ed53bb68 GSM MAP:Use ENC_APN_STR 2021-05-24 06:37:03 +00: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 524baee94f Add string encoding values for various BCD encodings, and use them.
Add some ENC_ values for various flavors of packed BCD, and use that
instead of explicitly calling tvb_bcd_dig_to_wmem_packet_str() and
adding the result.

Change-Id: I07511d9d09c9231b610c121cd6ffb3b16fb017a9
Reviewed-on: https://code.wireshark.org/review/36952
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-27 01:53:09 +00:00
Vasil Velichkov 13d5615db9 gsm_map: Dissect location number with the ISUP dissect function
There are at least two problems with the previous implemenation:

- The odd/even indicator was not used when dissecting the digits and
an additional 0 was displayed when location number has odd number of
digits.
- For International Numbers the correct NA is 4 and not 3 (national) and
for national numbers an incorrect country code is displayed.

Change-Id: If5bb143642205eab762fbccae28f131af28d89c0
Reviewed-on: https://code.wireshark.org/review/36720
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-06 05:55:45 +00:00
Peter Wu 0145bd0ce5 asn1: fix -Wmisleading-indentation warnings with Clang 10
A lot of auto-generated ASN.1 dissectors have broken identation and
Clang 10 started warning about them for the first time. Fix these by
using 2 spaces as indentation instead of 2, none, or tabs.

Change-Id: Ia91668596c2f5000954d2265c39cc5dba18e44a7
Reviewed-on: https://code.wireshark.org/review/36368
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-11 04:18:46 +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
Vasil Velichkov 122cc388a2 GSM MAP: Dissect several LocationInformationEPS's subparameters
Change DiameterIdentity's field type to FT_STRING and add dissection of
- E-UTRAN Cell Global Identity
- Tracking Area Identity
- GeographicalInformation
- GeodeticInformation

Change-Id: Ifff52b511f495b281318778f6007be896748e4ce
Reviewed-on: https://code.wireshark.org/review/32128
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-25 14:17:59 +00:00
Vasil Velichkov d0823e3920 GSM MAP: Dissect SM-RP-SMEA
According to 3GPP TS 29.002 this parameter contains an address field
which is encoded as defined in 3GPP TS 23.040.

Change-Id: If82a09e43729a90ede1619da34e50ed5d14e869a
Reviewed-on: https://code.wireshark.org/review/27569
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-16 18:07:59 +00:00
AndersBroman ed6239d17e [GSM MAP] Get rid of a global variable and use the new
dissector_try_uint_new() interface.

Change-Id: I714ca04f43c00017969e8655614566df4c53e5e9
Reviewed-on: https://code.wireshark.org/review/23288
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Tomáš Kukosa <tomas.kukosa@ixperta.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-29 16:18:02 +00:00
AndersBroman 6726d9e0cd [GSM MAP] Dissect Ext2-QoS-Subscribed, Ext3-QoS-Subscribed and
Ext4-QoS-Subscribed

Change-Id: Ic6a0f80d5f2339fd90284d1fddffe57b66c6771d
Reviewed-on: https://code.wireshark.org/review/23108
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-18 08:14:08 +00:00
Pascal Quantin f9997eebd9 GSM SMS: use TCAP OTID as last resort for reassembly when GSM MAP does not give info
Bug: 13592
Change-Id: Ie13e7466da906e72418c6f9d5ea6f816ff14e129
Reviewed-on: https://code.wireshark.org/review/21425
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-30 17:06:42 +00:00
Pascal Quantin fb1a6320ec GSM MAP: use TCAP OTID to retrieve SM-RP-OA and SM-RP-DA fields when required
Bug: 13592
Change-Id: Ib8a0ff6d897699c44e5c4b8834123169066cf904
Reviewed-on: https://code.wireshark.org/review/21397
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-04-29 06:04:18 +00:00
Pascal Quantin 4b2ee36743 GSM SMS: optionally use GSM-MAP info to perform reassembly (off by default)
Change-Id: I62c7a04e62167bd2d68d861f1d8d854f3159b159
Ping-Bug: 13592
Reviewed-on: https://code.wireshark.org/review/21306
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-04-24 18:59:36 +00:00
Guy Harris c303679d99 Decode TBCD strings in GSM MAP as per the GSM MAP spec.
Hex digits 0xa through 0xe are '*', '#', 'a', 'b', and 'c',
respectively.

Constify the dgt_set_t argument to tvb_bcd_dig_to_wmem_packet_str(),
while we're at it.

Bug: 13316
Change-Id: I7586f35d23fd262453779d99946e7ccad4b6ffab
Reviewed-on: https://code.wireshark.org/review/19620
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-13 07:16:30 +00:00
Michael Mann 2ab4155794 tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_string
Also some other tricks to remove unnecessary tvb_get_string_enc calls.

Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914
Reviewed-on: https://code.wireshark.org/review/16158
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>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-27 15:20:06 +00:00
AndersBroman 1394c2e543 [GSM MAP] Introduce dissector tables to be able to dirrectly call MSG
Arguments.

Change-Id: I7e51e2a2b9fa98cf8ca44fb528f49aeae46d9b7c
Reviewed-on: https://code.wireshark.org/review/14703
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>
2016-03-30 15:11:14 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.

There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.

Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 17:38:03 +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