aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nas_eps.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-25/+25
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-04-27Add string encoding values for various BCD encodings, and use them.Guy Harris1-2/+1
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-07NAS EPS: display remote UE context IPv6 prefix as IPv6 addressPascal Quantin1-3/+8
Change-Id: Ia116f2537e4ecec49013ffa4e3243b682fa9475f Reviewed-on: https://code.wireshark.org/review/36737 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-04-07nas-eps: Display interface identifier for the IPv6 lla as IPv6Anders Broman1-4/+7
Change-Id: Ia82085f94a1de7eeea4cecdbc8f060302ae18ed5 Reviewed-on: https://code.wireshark.org/review/36732 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-12GTPv2: Dissect Core Network Restrictions and UE Radio Capability ID.Anders Broman1-1/+29
Change-Id: I91714384688a554cbca82a0ae887e18f6304e0c1 Reviewed-on: https://code.wireshark.org/review/36379 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-11NAS 5GS: Dissect more IEsAnders Broman1-12/+14
Change-Id: I79016ef7791ee7d535861222168e3e2f244ef6f4 Reviewed-on: https://code.wireshark.org/review/36075 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-18NAS-EPS: add an option to dissect user data container as non IPPascal Quantin1-21/+52
A preference allows the user to decide whether the user data container payload should be dissected as IP, non IP or not dissected. For non IP, another preference allows to specify the name of the sub dissector to be called. Bug: 16332 Change-Id: I1bfd24eb734d57bff54d99362a90f563751270c6 Reviewed-on: https://code.wireshark.org/review/35857 Reviewed-by: Pascal Quantin <pascal@wireshark.org> Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-25 NAS EPS: unify spare bits filtersPascal Quantin1-11/+5
Change-Id: Iedcc6480e1cd0cf2dc0461affd41fffb29daac08 Reviewed-on: https://code.wireshark.org/review/34616 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-25NAS-EPS: Add dissection of 9.9.3.57 N1 UE network capability.Anders Broman1-2/+63
Change-Id: If5b7992c245db5e936ed1478640e11399b69fc04 Reviewed-on: https://code.wireshark.org/review/34610 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-23NAS EPS: fix compile error on older GCCJoakim Karlsson1-1/+1
error: variable ‘handle’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] Change-Id: I2c08b9f34171dfb9fc31b1651d1e66a268274b6d Reviewed-on: https://code.wireshark.org/review/33335 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-05-23NAS EPS: catch exception when using ESM data container heuristicPascal Quantin1-19/+23
This way if we try to decode non IP data as IP (due to preference setting), this does not prevent the end of the packet from being dissected. While we are at it, let's improve the heuristics. Change-Id: Ic5b76cd84554fcbd10c3cf59294783933196163a Reviewed-on: https://code.wireshark.org/review/33331 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-04-26GTPv2: Add decoding of more IEsAnders Broman1-2/+2
Bug: 15724 Change-Id: I5a2b017eff3b245189c92f9b4500d4e30750a035 Reviewed-on: https://code.wireshark.org/review/32983 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-23NAS-EPS: Use ...bitmask_list() for EPS network feature support IE.Anders Broman1-54/+56
Change-Id: I711506a214fad8b94ac84d5096fafb448157f9c5 Reviewed-on: https://code.wireshark.org/review/32886 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-1/+1
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-03-28NAS EPS: upgrade dissector to v15.6.0Pascal Quantin1-2/+1
It only clarified the encoding used for URN, so remove the corresponding comment. Change-Id: Idbe7e325242c495123df3d8f5babfae32b05a36d Reviewed-on: https://code.wireshark.org/review/32606 Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-02-06NAS EPS: get rid of a global variablePascal Quantin1-12/+7
Change-Id: Ib2d4c5d7b8e2c754c946829843174a83e11fdd6d Reviewed-on: https://code.wireshark.org/review/31917 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2018-12-28NAS EPS: upgrade dissector to v15.5.0Pascal Quantin1-4/+18
Change-Id: I3464365a821e92f02e601304552823d24cf11c35 Reviewed-on: https://code.wireshark.org/review/31227 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-12-18gtpv2: Update Security Capability in MM ContextJoakim Karlsson1-1/+1
According to TS 29.274, ch8.38. the UE NR security capability coding is specified in clause 9.9.3.53 of 3GPP TS 24.501 Change-Id: I4e5352bf7a5c75a3766b2d1162d8d85c3566da86 Reviewed-on: https://code.wireshark.org/review/31074 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-08NAS EPS: update ciphering heuristic check for 15 EPS bearers contextsPascal Quantin1-6/+5
Change-Id: I8c413420f231a65121cf13df7bd28fe066b606a6 Reviewed-on: https://code.wireshark.org/review/30539 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-10-25nas5gs: Improve dissection of Mapped EPS bearer contexts.AndersBroman1-3/+3
Change-Id: I7be662efbf2f634f8974cd080c3f38705a74d1a0 Reviewed-on: https://code.wireshark.org/review/30378 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-09NAS EPS: upgrade dissector to v15.4.0Pascal Quantin1-18/+14
Change-Id: I7c392269b4f6ec38d12b2f6d637276b4e6a3c8c0 Reviewed-on: https://code.wireshark.org/review/30093 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-28NAS EPS: add subtrees for extended emergency numbers and ciphered data setsPascal Quantin1-21/+37
Change-Id: I8c1fcf960ad058f25b24b796fecf1ff08eb78f7a Reviewed-on: https://code.wireshark.org/review/28499 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-22NAS EPS: fix wrong operator.Dario Lombardo1-1/+1
Change-Id: I50f9c1762338f081ff75b2981e8f49010948580c Reviewed-on: https://code.wireshark.org/review/28391 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-22NAS EPS: upgrade dissector to v15.3.0Pascal Quantin1-38/+482
Change-Id: I85c3defb81eb65622e0bd124fc4aef4bdbc89822 Reviewed-on: https://code.wireshark.org/review/28390 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-12NAS-5GS: Update towards spec 2.0.0AndersBroman1-1/+1
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-04-30NAS EPS: fix dissection of UE security capability IEPascal Quantin1-4/+0
Change-Id: Ie1a749eb2abb522aadec06a01baa10ba2211443b Reviewed-on: https://code.wireshark.org/review/27214 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-23NAS EPS: chack the protocol discriminator used in the security headerPascal Quantin1-12/+16
Change-Id: Idc82f182190adb6e87d2f796ca7acb9bf6b88443 Reviewed-on: https://code.wireshark.org/review/27092 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-29NAS EPS: upgrade dissector to v15.2.0Pascal Quantin1-10/+78
Change-Id: I448934f15a18b5f6086cdf3f415dcccf2a4534d6 Reviewed-on: https://code.wireshark.org/review/26683 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-02NAS-EPS: added heuristic udp dissectorMathias Kurth1-0/+35
Change-Id: I5df909ac55be5d00f73bd2403b2c7d4b3d1494ca Reviewed-on: https://code.wireshark.org/review/26050 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-03-02[NAS-EPS] Use proto_tree_add_bitmask_list() for some bitfields.AndersBroman1-82/+81
Change-Id: I0b241a1e553beaf7527948ef067cc1f9356754c8 Reviewed-on: https://code.wireshark.org/review/26210 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-27[NAS-5GS] Dissect more of the protocol.AndersBroman1-0/+3
Change-Id: Id398922f86902cc23053191e6f22b77511270077 Reviewed-on: https://code.wireshark.org/review/26134 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-20Define macros to calculate (2^N)^M, and use them in more places.Guy Harris1-9/+9
Change-Id: I4df1b35d8d2233c301f0ba9e119d012aebe9cd17 Reviewed-on: https://code.wireshark.org/review/25913 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-11NAS EPS: make some helpers functions staticPascal Quantin1-2/+4
Change-Id: I6a98c10687a6ffbbe6aa59d91fa52fed47dcae66 Reviewed-on: https://code.wireshark.org/review/25264 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-10NAS EPS: upgrade dissector to v15.1.1Pascal Quantin1-11/+11
Change-Id: I52a7124cf6f6c6e267525514e44e6c2903a11725 Reviewed-on: https://code.wireshark.org/review/25243 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-01-05NAS EPS: upgrade dissector to v15.1.0Pascal Quantin1-96/+653
Change-Id: I0ea263b693910c1d8036a18e612c1daf538482dd Reviewed-on: https://code.wireshark.org/review/25161 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-01-02[NAS-EPS] 5G NAS EPS network feature supported and capability info update.Anders1-130/+124
Change-Id: I243b52e8c448541636f3f94007ee3d850a5811ab Reviewed-on: https://code.wireshark.org/review/25111 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-25NAS EPS: upgrade dissector to v14.5.0Pascal Quantin1-29/+10
Change-Id: I0cf79dc37804db60b50cfb87355d0537361e214f Reviewed-on: https://code.wireshark.org/review/23736 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-09-07NAS EPS: update version infoPascal Quantin1-1/+1
Change-Id: Ic7f6353af47b494e3853d16c93cbcddff025888c Reviewed-on: https://code.wireshark.org/review/23429 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-09-07[NAS EPS] Update Request type value_string.AndersBroman1-1/+2
Change-Id: Ie92d2c0d91cd91974400327e0beba6aa9d995bff Reviewed-on: https://code.wireshark.org/review/23427 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: 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-13NAS EPS: upgrade dissector to v14.4.0Pascal Quantin1-9/+153
Change-Id: I8b0ae56889f6a52ba7d8c0c95a6b8e6a31557fa3 Reviewed-on: https://code.wireshark.org/review/22601 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-06-29NAS EPS: upgrade dissector to v13.10.0Pascal Quantin1-1/+43
Change-Id: I038ee9270a3118f3b2642c445cb2ab4b705fe57d Reviewed-on: https://code.wireshark.org/review/22463 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-06-15gsm-a, nas-eps: enhance handling of missing mandatory i.e.Ivan Nardi1-52/+54
When a mandatory information element is missing, try to report an expert info, instead of throwing a fatal malformed exception (or of reporting nothing at all). According to TS 24.007 11.2.3, a mandatory i.e. may be part of the imperative part of the message, so that expert info should be at PI_ERROR level Change-Id: Id399c236f2923db36540bbda0d29d666548f7cbd Reviewed-on: https://code.wireshark.org/review/22134 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-03-05dissectors: fix this statement may fall through ↵Alexis La Goutte1-0/+2
[-Werror=implicit-fallthrough=] found by gcc7 Change-Id: Iba6238988ded675cba328ab512232d1919d93b4a Reviewed-on: https://code.wireshark.org/review/20415 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-01GSM A / NAS-EPS: detect missing mandatory information elementsPascal Quantin1-40/+2
Current code is not able to detect missing mandatory information elements because the macro will return once the end of the payload is reached. Remove this check from all mandatory IE macros, and put it at the beginning of optional IE ones. It should allow to detect any missing mandatory IE while still stopping message dissection in case optional IEs are not present. Change-Id: Ie820740e25c1d03ee3462fa4a913c3a7870fcc2d Reviewed-on: https://code.wireshark.org/review/19816 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-01-10Rename tvb_new_subset() to tvb_new_subset_length_caplen().Guy Harris1-1/+1
This emphasizes that there is no such thing as *the* routine to construct a subset tvbuff; you need to choose one of tvb_new_subset_remaining() (if you want a new tvbuff that contains everything past a certain point in an existing tvbuff), tvb_new_subset_length() (if you want a subset that contains everything past a certain point, for some number of bytes, in an existing tvbuff), and tvb_new_subset_length_caplen() (for all other cases). Many of the calls to tvb_new_subset_length_caplen() should really be calling one of the other routines; that's the next step. (This also makes it easier to find the calls that need fixing.) Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b Reviewed-on: https://code.wireshark.org/review/19597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-05NAS EPS: NAS message container in Control Plane Service Request can be cipheredPascal Quantin1-2/+21
Change-Id: I026fc63e09c54807604c5d5a112c36dd41759c00 Reviewed-on: https://code.wireshark.org/review/19556 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-12-21NAS EPS: upgrade dissector to v13.8.0Pascal Quantin1-30/+14
Change-Id: Ifad1fbd22984ad777278c7cc90622b205405cf1f Reviewed-on: https://code.wireshark.org/review/19377 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-12-19Added decoding of RAN/NAS cause IE/AVPJan Spevak1-1/+1
Change-Id: I889820405528be5e17edf85e52291d642a98cce6 Reviewed-on: https://code.wireshark.org/review/19216 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-11-21NAS EPS: fill info column when receiving a ciphered messagePascal Quantin1-0/+1
Change-Id: I2aaad1e7682025f38d78198c7fef7c759629d762 Reviewed-on: https://code.wireshark.org/review/18912 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>