Commit Graph

189 Commits

Author SHA1 Message Date
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +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
Stig Bjørlykke d3695f8b53 gsm_a: Fix dissect_description_of_velocity()
Several improvements to dissect_description_of_velocity()
- Velocity Type is first 4 bits, do not increase offset after this
- Direction of Vertical Speed is bit 7
- Only increase curr_offset in this function
2021-10-06 13:52:30 +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
Evan Huus 8ee8808876 First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.
2021-07-21 09:54:57 -04:00
Anders Broman a948542b56 geographical-description: Fixes to the high accuracy dissection. 2021-06-09 15:29:00 +02:00
Anders Broman e1e2aaf91a Geographical description, correct the bitmask. 2021-05-28 12:19:15 +00:00
Martin Mathieson 0cf834f909 Make some more variables and functions static. 2021-02-14 19:42:01 +00:00
Martin Kaiser 70a85e1fa5 gsm_a_common: free stat table items
The init functions of the gsm statistics tables call gsm_a_stat_init, which
allocates some strings. We have to register gsm_a_stat_free_table_item to
free these table items again.

This is already done correctly for gsm_a_bssmap_stat_table. Fix it for the
other tables.
2021-02-10 06:49:11 +00:00
Martin Kaiser cd4e55fa03 gsm_a_common: create and populate the stats table only once
Use the new stat_tap_find_table function during init to check if our
statistics table already exists.

If so, we can safely assume that its rows have already beend initialized.
All we have to do is clear the data that was collected by the tap.
2021-02-10 06:33:08 +00:00
Martin Kaiser d9abd5005d gsm_a_common: remove a variable that is always 0
All of the stat_tap_table_ui structs use a single table at offset 0.
2021-01-14 10:19:49 +00:00
Martin Mathieson df651aca91 Spelling improvements
Improve script by ignoring common contractions, dealing with
e.g. \n within strings, and finding multiple concatenated words even
when no camelCase is used.

Also includes some actual spelling fixes.
2020-11-22 11:30:24 +00:00
Anders Broman 1d7bc367e9 GSM A Common: Dissect polygon points 2020-11-18 15:02:54 +00:00
Martin Mathieson b925734fe2 GSM A: Uncertainty speed is only 1 byte. 2020-10-31 12:09:23 +00:00
Pascal Quantin 83af7b89fd 3GPP: add 5G-TMSI to 3gpp.tmsi common filter 2020-10-14 11:08:19 +02:00
Anders Broman e209253636 Create a cross protocol filter 3gpp.tmsi
It can be useful to track a "call" trough multiple protocols to make
that easier create a cross protocol filter, more may come.
2020-10-14 07:56:26 +00:00
Martin Mathieson 6894bccf03 check_tfs.py: Also match case insensitively
Fix up some issues where the words were the same except for
captitalisation.
2020-10-11 18:46:31 +00:00
Martin Mathieson 607831d870 Fix more filter field strings.
These appear to be copy/paste errors detected by running
./tools/check_typed_item_calls.py --consecutive

Quite a few issues still remain after this batch.
2020-10-03 22:11:32 +00:00
Martin Mathieson d461bf3025 Yet more spelling fixes.
Includes small updates to the script and wireshark dictionary.
Probably the last spelling fixes from me for a while.
2020-09-07 16:35:13 +01:00
Anders Broman 24b19be0dd GSM A Common: Advance offset after reading type_of_shape.
Change-Id: Ic72c679ccacd707129574d62d20719e35746a3bf
Reviewed-on: https://code.wireshark.org/review/37401
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-08 08:38:46 +00:00
Alexis La Goutte b1fb415dbf gsm_a_common: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ic4af292bf494355a78f75df7e00d3c06bfc6eb50
Reviewed-on: https://code.wireshark.org/review/37373
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-04 08:12:55 +00:00
Anders Broman c0d04d90ca gsm_common: Update geographical_description
Change-Id: I53b24f55427af53b17233897a71cf5fd70131404
Reviewed-on: https://code.wireshark.org/review/37248
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-19 16:34:22 +00:00
Anders Broman c24286a9ca 3GPP: Update Geographical Area Description (GAD).
Change-Id: I1ad8a4bd21ed590eae4d64b7a287256860e597ca
Reviewed-on: https://code.wireshark.org/review/36963
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-28 13:17:06 +00:00
Anders Broman 9084ca2695 geographical_description: Don't mask Orientation of major axis octet 12
Change-Id: I7034cb6304bc7bab5f344b7438ffee6c5ea8844c
Reviewed-on: https://code.wireshark.org/review/35897
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-22 08:55:15 +00:00
Anders Broman b0c5f2230d Diameter: Fix Location estimate.
- The AVP should be an OctetString
 - Orientation of major axis should not be multiplied by 2 according to
   the latest standard.

Change-Id: I68532108cc36f4699c10b35ffdbcfaef0c29d9fe
Reviewed-on: https://code.wireshark.org/review/35890
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-21 14:10:35 +00:00
Anders Broman a503b80080 GSM A DTAP: Try to ensure that global variable sccp_assoc is cleared.
Change-Id: I970e9314724c55c19d0b98578e54a5d1b598e307
Reviewed-on: https://code.wireshark.org/review/34336
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-21 14:53:14 +00: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
Anders Broman 57a9a500b9 NAS 5GS: Framwork for dissecting UPDP messages.
Change-Id: Id08fe25cdf118e6912fa3f201dfd07bde5ebdaf9
Reviewed-on: https://code.wireshark.org/review/33679
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-20 15:53:59 +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
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +00:00
Pascal Quantin 144d481c20 GSM A: detect buffer overrun when decoding MS Classmark 3 IE
Change-Id: I12d372afd8a50b9a04f92c53077e79116db6c255
Reviewed-on: https://code.wireshark.org/review/31024
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-12-12 21:47:44 +00:00
Anders Broman 03a6a85dce Revert "gsm-a-common: Use expert info on "to few bytes left""
This test does not work when looking for optional elements.
This reverts commit 0cc8feb4b6.

Change-Id: Ib6794c647f6e1541b7257a59c4717a6a497c3a8a
Reviewed-on: https://code.wireshark.org/review/30013
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-04 11:15:54 +00:00
AndersBroman 0cc8feb4b6 gsm-a-common: Use expert info on "to few bytes left"
Change-Id: Iaa84d52c28fcb65cd65963f04a389f5902536eeb
Reviewed-on: https://code.wireshark.org/review/29884
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-27 08:55:48 +00:00
AndersBroman 16b04f59ed NAS-5GS: Update towards spec 2.0.0
Change-Id: I31b1dda0f06bf1b719dc949dfd1a44c151f452b9
Reviewed-on: https://code.wireshark.org/review/28217
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-12 14:51:33 +00:00
Guy Harris afad14dcfe Get rid of some GTK+-only stuff.
Change-Id: I85806476246a567f747e3911e3d15716e9cfe06b
Reviewed-on: https://code.wireshark.org/review/27514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 20:21:14 +00:00
AndersBroman 4303883005 [NAS 5GS] Add dissector for NAS5GS 3GPP TS 24.501.
This is not a complete dissector but can be commited as is. To be worked
on.

Change-Id: I2e698b57c849013657a1eeacef4b984c8b8c39ee
Reviewed-on: https://code.wireshark.org/review/26051
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-26 11:27:05 +00:00
Guy Harris c61b543e97 Get rid of more new_ prefixes for statistics functions and types.
There are no "old" versions of them that we're keeping around.

Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d
Reviewed-on: https://code.wireshark.org/review/25892
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19 00:12:51 +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
Pau Espin a3a906d663 packet-rsl.c: Use value-string in RXLEV and RXQUAL fields
RXLEV and RXQUAL fields in RSL "Uplink Measurements" use same scale
format (0-63, 0-7) as RXLEV and RXQUAL in RR. RXQUAL value-string is
moved to packet-gsm_a_common.c in order to use it in both protocols.

Change-Id: Idadd9505225353fec76b9605e2045a5222669475
Reviewed-on: https://code.wireshark.org/review/24663
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-11-30 16:28:39 +00:00
Alexis La Goutte 91caa91adf gsm_a_common: fix 'pinfo/len' was marked unused but was used [-Wused-but-marked-unused]
Change-Id: I831565d624711ebbcaf84b05e3a34dae58e1e064
Reviewed-on: https://code.wireshark.org/review/23282
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-29 15:10:15 +00:00
Michael Mann 232cb9a2dd Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.
Many proto_item_append_text calls were just adding a unit string to a field.
There's a better way to do that now.

Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78
Reviewed-on: https://code.wireshark.org/review/19289
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-16 03:04:11 +00:00
Pascal Quantin 1ae0c1ebfa GSM A: allow a length of 3 bytes when using the 'no identity' type
As stated in 3GPP 24.008 §10.5.1.4, for GMM and EMM procedures the
length should be set to 3 when using the 'no identity' type.

Change-Id: Ib2d5930416b0d26853f4cc430df0ce2f29488877
Reviewed-on: https://code.wireshark.org/review/18707
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-11-08 10:55:20 +00:00
Uli Heilmeier 1ba3426f18 GSM MAP: Add OSM URI for locationEstimate
As requested by bug 10969 add a link to OSM for locationEstimate.

Bug: 10969
Change-Id: I715b3b5eae9728999d5c8f8c155bbcef3911ee93
Reviewed-on: https://code.wireshark.org/review/17375
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>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-09-02 05:59:54 +00:00
Michael Mann b20fa8610a packet-gsm_a_common.c: Create typedef declaration for elem_func signature.
This should keep VS Code Analysis happy.

Change-Id: I99ebdc644ba353d5986d6509da784eeaa37dcc8f
Reviewed-on: https://code.wireshark.org/review/16420
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-14 02:44:27 +00:00
Dario Lombardo 4962ea601f qt: move free_stat_tables from SimpleStatisticsDialog::fillTree to ~SimpleStatisticsDialog.
Add a reference count to stat_tap_table_ui to prevent bad deallocations.

Bug: 12437
Change-Id: Ib9b1f929d08a574c306dc755ec416ab94a3fd6d3
Reviewed-on: https://code.wireshark.org/review/15920
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-16 04:01:57 +00:00
Pascal Quantin 3ee37d7629 GSM: add a sanity check
Like the one added in gcfc47c1

Change-Id: Ieb6aaa406ad141502980d4447d5ee9f03044acbe
Reviewed-on: https://code.wireshark.org/review/14930
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-04-15 19:32:21 +00:00
Guy Harris 9067ee8f5a Rename new_stat_tap_ui to stat_tap_table_ui.
A "new" statistics tap UI is a statistics tap UI where the statistics
are maintained as tables and common code handles the tables; what
matters is the tables, not that it's "new".

Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba
Reviewed-on: https://code.wireshark.org/review/12897
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:31:37 +00:00
Guy Harris 0c156fec93 There's no "old" stat_tap_table, so remove "new_" from the name.
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72
Reviewed-on: https://code.wireshark.org/review/12896
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29 00:20:09 +00:00
Balint Reczey 9a9b1c9bba Spelling fixes for errors found by lintian
Change-Id: I889283902875193f4d3f3fd59788f59f8d9bcc20
Reviewed-on: https://code.wireshark.org/review/11945
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-07 07:11:54 +00:00
Pascal Quantin 15edc8d714 Fix bugs introduced in gcfc47c1
Bug: 11797
Change-Id: I2574e19aa2b86f7c72370d98dd6a2b72b471da25
Reviewed-on: https://code.wireshark.org/review/12280
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>
2015-11-29 13:38:09 +00:00