aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/core/prim.h3
-rw-r--r--src/Makefile.am2
-rw-r--r--src/prim.c10
3 files changed, 14 insertions, 1 deletions
diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h
index 935ce51a..e920eb8c 100644
--- a/include/osmocom/core/prim.h
+++ b/include/osmocom/core/prim.h
@@ -20,10 +20,13 @@ enum osmo_prim_operation {
PRIM_OP_CONFIRM, /*!< \brief cofirm */
};
+const struct value_string osmo_prim_op_names[5];
+
#define _SAP_GSM_SHIFT 24
#define _SAP_GSM_BASE (0x01 << _SAP_GSM_SHIFT)
#define _SAP_TETRA_BASE (0x02 << _SAP_GSM_SHIFT)
+#define _SAP_SS7_BASE (0x03 << _SAP_GSM_SHIFT)
/*! \brief primitive header */
struct osmo_prim_hdr {
diff --git a/src/Makefile.am b/src/Makefile.am
index 32cefc8b..c46cddf9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,7 @@ libosmocore_la_SOURCES = timer.c select.c signal.c msgb.c bits.c \
gsmtap_util.c crc16.c panic.c backtrace.c \
conv.c application.c rbtree.c strrb.c \
loggingrb.c crc8gen.c crc16gen.c crc32gen.c crc64gen.c \
- macaddr.c stat_item.c stats.c stats_statsd.c
+ macaddr.c stat_item.c stats.c stats_statsd.c prim.c
BUILT_SOURCES = crc8gen.c crc16gen.c crc32gen.c crc64gen.c
diff --git a/src/prim.c b/src/prim.c
new file mode 100644
index 00000000..c2e71986
--- /dev/null
+++ b/src/prim.c
@@ -0,0 +1,10 @@
+#include <osmocom/core/utils.h>
+#include <osmocom/core/prim.h>
+
+const struct value_string osmo_prim_op_names[5] = {
+ { PRIM_OP_REQUEST, "request" },
+ { PRIM_OP_RESPONSE, "response" },
+ { PRIM_OP_INDICATION, "indication" },
+ { PRIM_OP_CONFIRM, "confirm" },
+ { 0, NULL }
+};