path: root/include/osmocom/sigtran
diff options
authorHarald Welte <laforge@gnumonks.org>2017-02-08 23:36:02 +0100
committerHarald Welte <laforge@gnumonks.org>2017-02-13 15:09:12 +0100
commit1c43cc291892825361a65cceaf732406e04f8e5d (patch)
tree88246b1990cfc15b4b4b62f17900ff6b5e24a3a9 /include/osmocom/sigtran
parente734655afb811ec5a7844beff5c6e9a7ba163683 (diff)
migrate some generic XUA helpers from sua.c to xua_msg.c
Diffstat (limited to 'include/osmocom/sigtran')
1 files changed, 7 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index 9cc8632..bb9486a 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -21,6 +21,8 @@
#include <osmocom/core/linuxlist.h>
+#define XUA_HDR(class, type) ((struct xua_common_hdr) { .spare = 0, .msg_class = (class), .msg_type = (type) })
struct msgb;
struct xua_msg {
@@ -51,3 +53,8 @@ struct xua_msg *xua_from_msg(const int version, uint16_t len, uint8_t *data);
struct msgb *xua_to_msg(const int version, struct xua_msg *msg);
void xua_set_log_area(int log_area);
+int msgb_t16l16vp_put(struct msgb *msg, uint16_t tag, uint16_t len, const uint8_t *data);
+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_get_u32(struct xua_msg *xua, uint16_t iei);