From ace6adb548a4f89a3ae1c59dd8c34b0b5b2a337d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 29 Apr 2022 20:17:49 +0200 Subject: api: add osmo_pfcp_ie_node_id_to_str_c() So far we had only osmo_pfcp_enc_to_str_node_id(), used for PFCP message to string conversion. It behaves like a common _to_str_buf() function, but has an inconvenient void* arg (for use with libosmo-tlv). Implement the string conversion as common _to_str_buf() and _to_str_c() functions, and call that from osmo_pfcp_enc_to_str_node_id(). That's useful for log messages coming up in a subsequent patch. Related: SYS#5599 Change-Id: I5c580bc510afce58a03dea0861db9630b063b2ae --- include/osmocom/pfcp/pfcp_ies_custom.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/osmocom/pfcp') diff --git a/include/osmocom/pfcp/pfcp_ies_custom.h b/include/osmocom/pfcp/pfcp_ies_custom.h index c28fdb2..08e62d1 100644 --- a/include/osmocom/pfcp/pfcp_ies_custom.h +++ b/include/osmocom/pfcp/pfcp_ies_custom.h @@ -48,6 +48,9 @@ struct osmo_pfcp_ie_node_id { }; }; +int osmo_pfcp_ie_node_id_to_str_buf(char *buf, size_t buflen, const struct osmo_pfcp_ie_node_id *node_id); +char *osmo_pfcp_ie_node_id_to_str_c(void *ctx, const struct osmo_pfcp_ie_node_id *node_id); + bool osmo_pfcp_bits_get(const uint8_t *bits, unsigned int bitpos); void osmo_pfcp_bits_set(uint8_t *bits, unsigned int bitpos, bool val); int osmo_pfcp_bits_to_str_buf(char *buf, size_t buflen, const uint8_t *bits, const struct value_string *bit_strs); -- cgit v1.2.3