libosmocore/src/gsm
Pau Espin 74ee02420a gsup: Convert PDP-Type IE to PDP-Address IE
The previous PDP-Type IE should have been a PDP-Address from the
start, since having only PDP-Type with no address is only a specific
case (dynamic addressing).
This becomes clear by looking at other similar protocols like:
* MAP: APN-Configuration IE has servedPartyIP-IP{v4,v6}-Address IEs
* Diameter S6b, 3GPP TS 29.272 7.3.35 APN-Configuration contains
  Served-Party-IP-Address AVPs
* Diameter SWx, 3GPP TS 29.273 APN-Configuration.
* GTPv1C Ts 29.060 7.7.29 PDP Context containing PDP Address.

Since PDP-Type on its own really makes no sense, being it a special case
of PDP-Address, let's keep the IE by renaming it (keeping old name too
for API backward compat) and extend it to support lengths > 2 bytes.

Old implementation of libosmogsm gsup actually ignored lengths > 2
bytes, so we are safe acting against older implementations here, both
on the sending and receiving side on the wire.

The big drawback of this commit is that it breaks ABI compatibility due
to adding "struct osmo_sockaddr pdp_address[2];" to struct
osmo_gsup_pdp_info, which in turn affects shift of fields in struct
osmo_gsup_message. Unfortunately, there's not much that can be done to
improve the situation when adding the missing field, due to existing API
having the same struct for all messages. Ideally we'd have 1 union with
structs per message type inside, this way the ABI break would be far
less pronounced.

The GSUP test output change is becaue we now accept some of the len>2
cases for PDP-Type/Address IE which were being rejected since a couple
commits ago.

libosmogsm gsup code is now disabled in EMBEDDED mode, since it nows
depends on core/socket.h (struct osmo_sockaddr) which is not available
in EMBEDDED, and hence fails during build:
"""
In file included from /build/include/osmocom/gsm/gsup.h:45,
                 from /build/src/gsm/gsup_sms.c:28:
/build/include/osmocom/core/socket.h:15:10: fatal error: arpa/inet.h: No such file or directory
   15 | #include <arpa/inet.h>
      |          ^~~~~~~~~~~~~
"""

Related: OS#6091
Change-Id: I775ff9c3be165d9f30d6ab55d03f99b6104eadd6
2024-01-20 00:31:28 +01:00
..
kdf kdf: add key derivation functions 2021-06-08 02:38:15 +02:00
milenage libosmogsm: Factor out the C2 derivation function 2023-06-02 08:29:55 +00:00
tuak libosmogsm: Add support for TUAK authentication algorithm 2023-06-02 10:44:05 +02:00
Makefile.am gsup: Convert PDP-Type IE to PDP-Address IE 2024-01-20 00:31:28 +01:00
a5.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
abis_nm.c gsm_12_21.h: fix typo: NM_IPAC_F_CHANT_P{C->D}CHF 2023-09-12 05:16:32 +07:00
apn.c Use internal <osmocom/core/talloc.h> everywhere 2022-04-27 12:42:15 +00:00
auth_comp128v1.c libosmogsm: Add OSMO_ASSERT() to ensure correct algorithm 2023-06-02 08:29:55 +00:00
auth_comp128v23.c libosmogsm: Add OSMO_ASSERT() to ensure correct algorithm 2023-06-02 08:29:55 +00:00
auth_core.c libosmogsm: Add support for TUAK authentication algorithm 2023-06-02 10:44:05 +02:00
auth_milenage.c libosmogsm: Avoid executing MILENAGE crypto twice (for UMTS and GSM) 2023-06-02 08:29:55 +00:00
auth_tuak.c libosmogsm: Add support for TUAK authentication algorithm 2023-06-02 10:44:05 +02:00
auth_xor.c libosmogsm: Ensure MILENAGE + XOR-3G K length is 128 bit 2023-06-02 08:29:55 +00:00
auth_xor_2g.c libosmogsm: Add OSMO_ASSERT() to ensure correct algorithm 2023-06-02 08:29:55 +00:00
bsslap.c gsm/{bsslap,bssmap_le}: zero-initialize structs using memset() 2023-02-25 08:15:11 +00:00
bssmap_le.c gsm/{bsslap,bssmap_le}: zero-initialize structs using memset() 2023-02-25 08:15:11 +00:00
bts_features.c gsm: ensure completeness of osmo_bts_features_{descs,names}[] 2023-02-24 17:06:21 +07:00
cbsp.c fix _thread order 2023-03-07 14:27:59 +01:00
comp128.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
comp128v23.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gad.c gad.c: fix rc for osmo_gad_enc_ell_point_unc_circle() 2020-10-15 01:02:04 +00:00
gan.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
gea.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gprs_cipher_core.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gprs_gea.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gprs_rlc.c Move libosmogsm TS 44.060 declarations under include/osmocom/gsm/ 2023-02-20 12:21:30 +01:00
gsm48.c gsm: fix osmo_mobile_identity_decode(): init *mi on error 2024-01-08 21:38:47 +07:00
gsm48_arfcn_range_encode.c range_enc_determine_range(): Don't dereference array on size=0 2021-06-01 14:04:20 +02:00
gsm48_ie.c gsm48_ie: fix various issues in doxygen docs 2024-01-07 16:33:34 +07:00
gsm48_rest_octets.c gsm48_rest_octets: fix wrong value 2023-06-03 16:28:37 +02:00
gsm0341.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0411_smc.c gsm0411_{smc,smr}.c: Work around newlib bug 2020-07-30 21:35:10 +02:00
gsm0411_smr.c fix spelling in 'value_string' arrays: existAnt -> existEnt 2020-10-29 18:09:36 +07:00
gsm0411_utils.c doxygen: fix various typos in commands \param and \returns 2023-02-28 18:48:56 +00:00
gsm0414.c doxygen: unify use of \file across the board 2017-06-23 00:18:23 +00:00
gsm0480.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm0502.c gsm0502: cosmetic: use ARRAY_SIZE in gsm0502_fn2ccch_block() 2023-06-25 15:47:13 +07:00
gsm0808.c ASCI: Add missing check for return value of gsm0808_enc_speech_codec_list2() 2023-07-26 12:52:30 +00:00
gsm0808_utils.c gsm0808_utils: use osmo_strbuf API, drop APPEND_{THING,STR,CELL_ID_U} 2024-01-05 15:36:40 +00:00
gsm23003.c gsm: [ABI BREAK] Support CellId SAI, change CellId CGI-PS id number 2022-02-16 17:59:23 +01:00
gsm23236.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm29118.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm29205.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsm44021.c gsm: TS 44.021 modified V.110 frame encoding/decoding support 2023-03-08 20:43:15 +01:00
gsm44068.c ASCI: Add BCC call state definitions 2023-09-12 10:42:48 +00:00
gsm48049.c gsm/gsm48049.c: fix use of GNU 'missing =' extension in designator 2020-01-21 18:34:04 +07:00
gsm_04_08_gprs.c fix spelling in 'value_string' arrays: existAnt -> existEnt 2020-10-29 18:09:36 +07:00
gsm_utils.c gsm: Introduce functions to convert between FN and RFN (Reduced FN) 2023-08-11 20:46:04 +02:00
gsup.c gsup: Convert PDP-Type IE to PDP-Address IE 2024-01-20 00:31:28 +01:00
gsup_sms.c GSUP/SMS: introduce MO-/MT-FORWARD-SM messages 2018-12-18 21:52:01 +07:00
ipa.c ipa_ccm_tlv_to_unitdata(): free previous string if present before allocating new one 2023-12-14 15:14:35 +00:00
iuup.c gsm: use OSMO_ASSERT() in osmo_iuup_msgb_alloc_c() 2023-02-27 09:58:46 +00:00
kasumi.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
kdf.c Fix all references to config.h 2023-01-18 19:04:36 +01:00
lapdm.c Add flag to enable RTS based polling 2023-11-29 14:19:48 +01:00
libosmogsm.map Add a GSM RLP decoder and encoder 2023-11-29 14:35:36 +00:00
mncc.c Fix all references to config.h 2023-01-18 19:04:36 +01:00
oap.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
oap_client.c oap_client: Fix license: GPLv2+ instead of AGPLv3+ 2019-05-27 23:26:45 +02:00
rlp.c rlp: Add support for 576bit RLP frames 2023-12-17 10:48:58 +00:00
rsl.c Revert "rsl: Introduce new osmocom extension IE RSL_IE_OSMO_ABS_FRAME_NUMBER" 2023-08-23 17:13:34 +00:00
rxlev_stat.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sysinfo.c Add SI10 support 2023-02-04 10:07:28 +00:00
tlv_parser.c Fix 'Fix parsing of TLV_TYPE_SINGLE_TV' 2023-05-02 15:20:53 +02:00