aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-07 12:33:28 +0100
committerlaforge <laforge@osmocom.org>2021-02-08 10:40:46 +0000
commit1153675012135a975eeb9462e038bad580e9a6f8 (patch)
treefa970f194f6e90e111c9aefc8e69b6f96fa764c0 /include
parent2aebd133ac2bdb1a12635e146e8886b2440d4419 (diff)
xua_msg: Add xua_msg*_get_str() to obtain string IE
We copy the contents to a static thread-local buffer to ensure zero termination of the string received by a remote entity. Change-Id: I8cbb7aeaf0cb64db0ce01c21e5fca9ab3cd932b6
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/sigtran/xua_msg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index a2cdbf2..329ba96 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -91,6 +91,8 @@ int msgb_t16l16vp_put_u32(struct msgb *msg, uint16_t tag, uint32_t val);
int xua_msg_add_u32(struct xua_msg *xua, uint16_t iei, uint32_t val);
uint32_t xua_msg_part_get_u32(const struct xua_msg_part *part);
uint32_t xua_msg_get_u32(const struct xua_msg *xua, uint16_t iei);
+const char *xua_msg_part_get_str(const struct xua_msg_part *part);
+const char *xua_msg_get_str(const struct xua_msg *xua, uint16_t iei);
void xua_part_add_gt(struct msgb *msg, const struct osmo_sccp_gt *gt);
int xua_msg_add_sccp_addr(struct xua_msg *xua, uint16_t iei, const struct osmo_sccp_addr *addr);