neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-pfcp/+/30403 )
Change subject: add osmo_pfcp_ie_outer_header_creation_to_str_*()
......................................................................
add osmo_pfcp_ie_outer_header_creation_to_str_*()
Make osmo_pfcp_enc_to_str_outer_header_creation() as
osmo_pfcp_ie_outer_header_creation_to_str_*() functions.
Used by I0d4d9edcfc94b61bdc74cfd4ff837f151d1c28ae (osmo-upf)
Change-Id: I4ad1570485c8081b82284e4e6b4de4d7eed414b0
---
M include/osmocom/pfcp/pfcp_ies_custom.h
M src/libosmo-pfcp/pfcp_ies_custom.c
2 files changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/03/30403/1
diff --git a/include/osmocom/pfcp/pfcp_ies_custom.h
b/include/osmocom/pfcp/pfcp_ies_custom.h
index 565fee2..0540bfe 100644
--- a/include/osmocom/pfcp/pfcp_ies_custom.h
+++ b/include/osmocom/pfcp/pfcp_ies_custom.h
@@ -161,6 +161,10 @@
uint32_t s_tag;
};
+int osmo_pfcp_ie_outer_header_creation_to_str_buf(char *buf, size_t buflen,
+ const struct osmo_pfcp_ie_outer_header_creation *ohc);
+char *osmo_pfcp_ie_outer_header_creation_to_str_c(void *ctx, const struct
osmo_pfcp_ie_outer_header_creation *ohc);
+
/* 3GPP TS 29.244 8.2.64. */
struct osmo_pfcp_ie_outer_header_removal {
enum osmo_pfcp_outer_header_removal_desc desc;
diff --git a/src/libosmo-pfcp/pfcp_ies_custom.c b/src/libosmo-pfcp/pfcp_ies_custom.c
index 422b6a9..06b7494 100644
--- a/src/libosmo-pfcp/pfcp_ies_custom.c
+++ b/src/libosmo-pfcp/pfcp_ies_custom.c
@@ -857,9 +857,9 @@
return 0;
}
-int osmo_pfcp_enc_to_str_outer_header_creation(char *buf, size_t buflen, const void
*encode_from)
+int osmo_pfcp_ie_outer_header_creation_to_str_buf(char *buf, size_t buflen,
+ const struct osmo_pfcp_ie_outer_header_creation *ohc)
{
- const struct osmo_pfcp_ie_outer_header_creation *ohc = encode_from;
struct osmo_strbuf sb = { .buf = buf, .len = buflen };
OSMO_STRBUF_APPEND(sb, osmo_pfcp_bits_to_str_buf, ohc->desc_bits,
osmo_pfcp_outer_header_creation_strs);
if (ohc->teid_present)
@@ -877,6 +877,16 @@
return sb.chars_needed;
}
+char *osmo_pfcp_ie_outer_header_creation_to_str_c(void *ctx, const struct
osmo_pfcp_ie_outer_header_creation *ohc)
+{
+ OSMO_NAME_C_IMPL(ctx, 128, "ERROR",
osmo_pfcp_ie_outer_header_creation_to_str_buf, ohc)
+}
+
+int osmo_pfcp_enc_to_str_outer_header_creation(char *buf, size_t buflen, const void
*encode_from)
+{
+ return osmo_pfcp_ie_outer_header_creation_to_str_buf(buf, buflen, encode_from);
+}
+
int osmo_pfcp_dec_activate_predefined_rules(void *decoded_struct, void *decode_to, const
struct osmo_gtlv_load *tlv)
{
struct osmo_pfcp_ie_activate_predefined_rules *activate_predefined_rules = decode_to;
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-pfcp/+/30403
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I4ad1570485c8081b82284e4e6b4de4d7eed414b0
Gerrit-Change-Number: 30403
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange