aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/pfcp/pfcp_ies_custom.h
diff options
context:
space:
mode:
authorNeels Janosch Hofmeyr <nhofmeyr@sysmocom.de>2024-03-16 05:50:14 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2024-03-19 04:42:26 +0100
commitf1f869e623578a6bf694d58b5e266969ef13b18e (patch)
tree4b9efdd8447d77ff550c7bac86b6cb71acfed14f /include/osmocom/pfcp/pfcp_ies_custom.h
parent5d2ee7e72c62db67ee3f70805e7d40f3c154209f (diff)
add osmo_pfcp_ip_addrs_get
This pattern shows up a lot when working with PFCP. Let's make it easier to handle IPv4 and v6 at the same time. Change-Id: I4338a83f26ef2443f90cf835621e73aed5eac521
Diffstat (limited to 'include/osmocom/pfcp/pfcp_ies_custom.h')
-rw-r--r--include/osmocom/pfcp/pfcp_ies_custom.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/pfcp/pfcp_ies_custom.h b/include/osmocom/pfcp/pfcp_ies_custom.h
index 0540bfe..84f862a 100644
--- a/include/osmocom/pfcp/pfcp_ies_custom.h
+++ b/include/osmocom/pfcp/pfcp_ies_custom.h
@@ -25,6 +25,7 @@
#pragma once
#include <osmocom/core/socket.h>
+#include <osmocom/core/sockaddr_str.h>
#include <osmocom/pfcp/pfcp_proto.h>
@@ -40,6 +41,11 @@ int osmo_pfcp_ip_addrs_set(struct osmo_pfcp_ip_addrs *dst, const struct osmo_soc
int osmo_pfcp_ip_addrs_to_str_buf(char *buf, size_t buflen, const struct osmo_pfcp_ip_addrs *addrs);
char *osmo_pfcp_ip_addrs_to_str_c(void *ctx, const struct osmo_pfcp_ip_addrs *addrs);
+int osmo_pfcp_ip_addrs_get(struct osmo_sockaddr *v4, struct osmo_sockaddr *v6,
+ struct osmo_pfcp_ip_addrs *src);
+int osmo_pfcp_ip_addrs_get_str(struct osmo_sockaddr_str *v4, struct osmo_sockaddr_str *v6,
+ struct osmo_pfcp_ip_addrs *src);
+
/* 3GPP TS 29.244 8.2.38, IETF RFC 1035 3.1 */
struct osmo_pfcp_ie_node_id {
enum osmo_pfcp_node_id_type type;