osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ggsn/+/36790?usp=email )
Change subject: gtp: remove unused conversion functions
......................................................................
gtp: remove unused conversion functions
Remove ipv42eua and eua2ipv4, which are in the "internal functions"
section of gtp.h, but are not used anywhere in the code anymore. This is
in preparation of moving the internal functions that are used in
multiple .c files into a separate header file, and to make the other
internal functions static. (Compiler complains about unused static
functions.)
Change-Id: I90e2750f6a6e3e6122e9c562103fda77d7326932
---
M TODO-RELEASE
M gtp/gtp.c
M include/osmocom/gtp/gtp.h
3 files changed, 17 insertions(+), 23 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 22cfd1d..73c4fbe 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,4 +8,5 @@
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
libgtp REMOVE remove GTP cause defines of reserved values
+libgtp REMOVE ABI change (removed API: ipv42eua, eua2ipv4)
libgtpnl > 1.2.5 gtp_tunnel_set_family()
diff --git a/gtp/gtp.c b/gtp/gtp.c
index 2d18fab..9442b33 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -3069,27 +3069,6 @@
* port number.
*************************************************************/
-int ipv42eua(struct ul66_t *eua, struct in_addr *src)
-{
- eua->v[0] = PDP_EUA_ORG_IETF;
- eua->v[1] = PDP_EUA_TYPE_v4;
- if (src) {
- eua->l = 6;
- memcpy(&eua->v[2], src, 4);
- } else {
- eua->l = 2;
- }
- return 0;
-}
-
-int eua2ipv4(struct in_addr *dst, struct ul66_t *eua)
-{
- if ((eua->l != 6) || (eua->v[0] != PDP_EUA_ORG_IETF) || (eua->v[1] !=
PDP_EUA_TYPE_v4))
- return -1; /* Not IPv4 address */
- memcpy(dst, &eua->v[2], 4);
- return 0;
-}
-
int gsna2in_addr(struct in_addr *dst, struct ul16_t *gsna)
{
memset(dst, 0, sizeof(struct in_addr));
diff --git a/include/osmocom/gtp/gtp.h b/include/osmocom/gtp/gtp.h
index 7465cf1..7e6bb55 100644
--- a/include/osmocom/gtp/gtp.h
+++ b/include/osmocom/gtp/gtp.h
@@ -315,8 +315,6 @@
struct sockaddr_in *peer,
void *pack, unsigned len);
-extern int ipv42eua(struct ul66_t *eua, struct in_addr *src);
-extern int eua2ipv4(struct in_addr *dst, struct ul66_t *eua);
extern int gsna2in_addr(struct in_addr *dst, struct ul16_t *gsna);
extern int in_addr2gsna(struct ul16_t *gsna, struct in_addr *src);
extern const char *imsi_gtp2str(const uint64_t *imsi);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ggsn/+/36790?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I90e2750f6a6e3e6122e9c562103fda77d7326932
Gerrit-Change-Number: 36790
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged