Commit Graph

193 Commits

Author SHA1 Message Date
João Valverde dec5590b5b Fix errors found by fix-encoding-args.pl 2021-12-19 22:55:37 +00:00
João Valverde 22ee2764a7 Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
2021-12-19 20:25:11 +00:00
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 cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.

A few others were returning memory, and needed conversion to accept a
wmem scope argument.
2021-09-01 03:54:52 +00:00
Pascal Quantin a728da1f28 NAS-5GS: fix dissection of port management information container IE
Closes #17562
2021-08-31 17:25:14 +02:00
Joakim Karlsson 9f54ae73f1 NAS 5GS: D.6.3 UE policy section management result 2021-08-04 20:05:43 +00:00
Evan Huus d6d7dd1e56 First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.

I also tweaked a few of the docs which got caught up.
2021-07-21 05:38:29 +00:00
Joakim Karlsson d2c91439df NAS-5GS: handle of n1SmInfo(From/To)Ue 2021-06-29 04:11:36 +00:00
John Thacker 784b9f44a4 NAS 5GS: Use 5GSTAI MCC/MNC fields
Use 5GS TAI (and not just TAI) where appropriate in the 5GS TAI, 5GS TAI List,
and 5GS Service Area List.
2021-06-22 21:17:14 -04:00
Joakim Karlsson 9be67f167f NAS 5GS: add support for more binary IEs
TS 29.502 ch6.1.6.4.4 n1SmInfoFromUe, n1SmInfoToUe, unknownN1SmInfo
2021-06-15 16:33:56 +00:00
Pascal Quantin 38bba32097 NAS 5GS: fix Non-3GPP NW policies IE dissection 2021-05-21 19:03:36 +02:00
Anders Broman 31ca47eafc Use ENC_APN_STR in one more place. 2021-05-20 12:21:06 +00:00
John Thacker 157222a031 NGAP, XNaP, NAS_5GS: Add E212_GUAMI to MCC/MNC field choices 2021-05-16 19:39:15 -04:00
Pascal Quantin ebafa3a4b9 NAS 5GS: add NAS 5GS protocol to TCP port decode as table
This is useful to decode NAS messages received in a N3IWF
2021-04-28 09:39:04 +00:00
Pascal Quantin e2c7dc6627 NAS 5GS: add dissection of operator-defined access category definitions IE
Closes #17340
2021-04-16 12:03:57 +02:00
Martin Mathieson 059887e089 Clean up some cppcheck warnings. 2021-04-05 07:54:49 +00:00
Pascal Quantin ff5430b100 NAS 5GS: upgrade dissector to v16.8.0 2021-04-02 18:59:43 +02:00
Cristian Sava b06a3c5eb8 NAS 5GS: Fix dissection of EAP Message in PDU Session Authentication Result. 2021-03-30 18:39:03 +03:00
Anders Broman 32d4af0ed9 NAS-5GS: Dissect Extended rejected NSSAI IE 2021-02-18 12:02:11 +01:00
Stig Bjørlykke 37bef583da NAS: Put decoded user data in the top tree
Decoded user data as IP or Ethernet belongs in the top tree.
2021-02-08 09:45:49 +00:00
Martin Mathieson d68c19565d Make more functions and vars static.
No contentious cases in this batch.
2021-02-03 13:52:55 +00:00
Pascal Quantin f64eddfd01 NAS 5GS: fix display of IPv6 interface identifier
Do not use FT_IPV6 as an interface identifier could be wrongly identified
as an IPv4-Compatible IPv6 Address format by inet_ntop() and displayed
as such.
2021-01-20 14:41:12 +01:00
Martin Mathieson 765ce11b3f Fix value_string consecutive repeated strings
Detected by adding another check under
ENABLE_CHECK_FILTER to look for consecutive labels likely
to have been left as copy/paste errors.  Change to proto.c probably too messy
to merge.
2021-01-14 09:21:15 +00:00
Pascal Quantin 3e84673c5f NAS 5GS: add a value string for standardised SST values 2021-01-13 14:46:40 +01:00
Pascal Quantin a9ce232c37 NAS 5GS: upgrade dissector to v16.7.0 2020-12-23 19:12:14 +00:00
Pascal Quantin f194adb200 NAS 5GS: fix a typo in request type filter name 2020-12-12 16:17:51 +00:00
Martin Mathieson b908dd3d78 NAS 5GS: Fix a conflicting value_string
WARNING **: Field 'Request type' (nas_5gs.mm.req_typ) has a conflicting entry
in its value_string: 5 is at indices 4 (Modification request) and 5
(MA PDU request)
2020-12-12 09:43:13 +00:00
Anders Broman 9a46fabf52 Introduce ENC_BCD_ODD_NUM_DIG in order to handle odd number of digits 2020-12-10 16:02:10 +01:00
Guy Harris bb494c11de Fix various spelling errors.
Found by lintian and by looking for the misspelled words that lintian
found.

(Does not fix spelling errors in .asn1 files.)
2020-12-09 05:52:50 +00:00
Pascal Quantin 98c21601f8 NAS 5GS: add a fence to info column before calling EAP dissector 2020-11-26 19:42:27 +01:00
Pascal Quantin 063af96df7 NAS 5GS: add dissection of R16 UPDP messages 2020-11-23 23:55:04 +01:00
Pascal Quantin 9fdc3fb3ce NAS 5GS: request type field is 3 bits long 2020-11-23 22:11:13 +00:00
Pascal Quantin d75fef88fb NAS 5GS: upgrade remaining 5GSM IEs to v16.6.0
- IP header compression configuration
- DS-TT Ethernet port MAC address
- UE-DS-TT residence time
- Port management information container
- Ethernet header compression configuration
2020-11-23 19:22:58 +01:00
Pascal Quantin 533f21edfd NAS 5GS: upgrade some 5GSM IEs dissection to v16.6.0
- 5GSM capability
- 5GSM cause
- Integrity protection maximum data rate
- Mapped EPS bearer contexts
- PDU address
- Re-attempt indicator
- 5GSM network feature support
- Serving PLMN rate control
- 5GSM congestion re-attempt indicator
- ATSSS container
- Control plane only indication
2020-11-23 18:38:45 +01:00
Pascal Quantin f22ed956f6 NAS 5GS: upgrade dissection of remaining 5GMM IEs to v16.6.0
- Ciphering key data
- Control plane service type
- MICO indication
- MA PDU session information
- Mapped NSSAI
- Mobile station classmark 2
- Supported codecs
- Payload container
- Payload container type
- Rejected NSSAI
- Release assistance indication
- Request type
- UE radio capability ID deletion indication
- Truncated 5G-S-TMSI configuration
- WUS assistance information
- NB-N1 mode DRX parameters
- Additional configuration indication
2020-11-22 19:19:14 +00:00
Pascal Quantin 4212bea8f3 NAS 5GS: add dissection of 2 more r16 IEs
- CAG information list
- CIoT small data container
2020-11-22 13:42:58 +00:00
Pascal Quantin 7d16b7b251 NAS 5GS: upgrade dissection of more 5GMM IEs to v16.6.0 2020-11-21 23:29:52 +01:00
Pascal Quantin 561c5607a8 NAS 5GS: upgrade dissection of a few 5GMM IEs to v16.6.0 2020-11-21 19:02:32 +01:00
Pascal Quantin 1f40b822e6 NAS 5GS: upgrade 5GMM and 5GSM messages description to v16.6.0 2020-11-21 17:18:20 +01:00
Pascal Quantin 76c8e4c921 NAS 5GS: fix dissection of common information elements 2020-11-17 13:32:17 +01:00
Anders Broman e7898384b3 NAS 5GS: Add more IEs to messages. 2020-11-16 17:22:18 +00:00
Anders Broman 62730dc4fe NAS-5GS: Start upgrading to release 17.0 2020-11-14 16:38:58 +00:00
Pascal Quantin 83af7b89fd 3GPP: add 5G-TMSI to 3gpp.tmsi common filter 2020-10-14 11:08:19 +02:00
Martin Mathieson 8b4e0148a2 Fix some more wrong filter names.
These are duplicates detected seen by running
check_typed_item_calls.py  --consecutive.

There are still quite a few more to go.
2020-09-28 18:20:09 +01:00
Martin Mathieson 4c9f59ee56 Fix more spelling errors in dissector strings.
A second batch of spelling errors, detected using a script
that uses pyspellcheck and a Wireshark-specific dictionary file.

I will take at least one more pass through the dissectors, as
further improvements are made to the script.
2020-08-29 21:32:39 +00:00
Pascal Quantin 62c4e2525f Check that at least one token exists to consider the JSON as valid
Bug: 16780
Change-Id: I07ca12675fc79a7c524719d18b85e5d3dada6652
Reviewed-on: https://code.wireshark.org/review/38160
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-08-14 13:53:16 +00:00
Pascal Quantin c41c47505c NAS 5GS: fix dissection of extended emergency number list IE
Bug: 16668
Change-Id: If936bf25d8a062b72f1b682f9cf7d47d51aa5d1e
Reviewed-on: https://code.wireshark.org/review/37644
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-07-01 18:37:06 +00:00
Pascal Quantin 38bda830d3 NAS 5GS: fix dissection of S1 mode to N1 mode NAS transparent container
Change-Id: Iaf5100fb2f25c0c745a0609de1a639a6bda00ffd
Reviewed-on: https://code.wireshark.org/review/37563
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-06-26 22:01:05 +00:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Pavel Strnad 43c16b14fb NAS-5GS: fix decoding of 5GSM cause
5GSM cause (9.11.4.2) is using TV format
    in PDU session modification request messgae
    based on 24.501/chapter 8.3.7.1

Change-Id: I7e072e2b4c3422ec75e8bcebebb534905028eb2a
Reviewed-on: https://code.wireshark.org/review/37433
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-10 09:06:28 +00:00