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
diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index 49d1264..a17a729 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -37,11 +37,13 @@
  *
  */
 #pragma once
+#if (!EMBEDDED)
 
 #include <stdint.h>
 #include <osmocom/core/msgb.h>
 #include <osmocom/core/defs.h>
 #include <osmocom/core/endian.h>
+#include <osmocom/core/socket.h>
 #include <osmocom/gsm/gsup_sms.h>
 #include <osmocom/gsm/protocol/gsm_23_003.h>
 #include <osmocom/gsm/protocol/gsm_03_40.h>
@@ -60,8 +62,6 @@
 #define OSMO_GSUP_MAX_MSISDN_LEN		9
 #define OSMO_GSUP_MAX_CALLED_PARTY_BCD_LEN	43 /* TS 24.008 10.5.4.7 */
 
-#define OSMO_GSUP_PDP_TYPE_SIZE			2
-
 /*! Information Element Identifiers for GSUP IEs */
 enum osmo_gsup_iei {
 	OSMO_GSUP_IMSI_IE			= 0x01,
@@ -75,7 +75,8 @@
 	OSMO_GSUP_HLR_NUMBER_IE			= 0x09,
 	OSMO_GSUP_MESSAGE_CLASS_IE		= 0x0a,
 	OSMO_GSUP_PDP_CONTEXT_ID_IE		= 0x10,
-	OSMO_GSUP_PDP_TYPE_IE			= 0x11,
+	OSMO_GSUP_PDP_ADDRESS_IE		= 0x11,
+#define OSMO_GSUP_PDP_TYPE_IE			OSMO_GSUP_PDP_ADDRESS_IE /* Backward compat */
 	OSMO_GSUP_ACCESS_POINT_NAME_IE		= 0x12,
 	OSMO_GSUP_PDP_QOS_IE			= 0x13,
 	OSMO_GSUP_CHARG_CHAR_IE			= 0x14,
@@ -275,6 +276,7 @@
 #endif
 		};
 	};
+	struct osmo_sockaddr		pdp_address[2];
 	/*! APN information, still in encoded form. Can be NULL if no
 	 * APN information included */
 	const uint8_t			*apn_enc;
@@ -412,4 +414,5 @@
 int osmo_gsup_get_err_msg_type(enum osmo_gsup_message_type type_in)
 	OSMO_DEPRECATED("Use OSMO_GSUP_TO_MSGT_ERROR() instead");
 
+#endif /* (!EMBEDDED) */
 /*! @} */