summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-01-01 20:31:58 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-19 23:52:42 +0100
commit0bbf67dfd3d97c67a126e60de2c5648c88427981 (patch)
treeaf81182aba563c5eb304b7a9f901af798faa2e0f /include/osmocom/gsm
parentc6fd24576c482be35f9d0b7f247e69a3153b9cc6 (diff)
MNCC: Add MNCC to string dumper
As MNCC is rather hard to debug (wireshark cannot trace UNIX domain sockets), let's add our own decoder that we can use from related debug log statements in the respective programs. Change-Id: I216aaf70868ba5f3860a60c4b2442957531a3011
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r--include/osmocom/gsm/mncc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index f2450d9c..5ca29863 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -82,3 +82,12 @@ enum {
GSM_MNCC_BCAP_OTHER_ITC = 5,
GSM_MNCC_BCAP_RESERVED = 7,
};
+
+struct msgb;
+struct msgb *osmo_mncc_stringify(const uint8_t *msg, unsigned int len);
+
+void _osmo_mncc_log(int subsys, int level, const char *file, int line, const char *prefix,
+ const uint8_t *msg, unsigned int len);
+
+#define osmo_mncc_log(ss, level, prefix, msg, len) \
+ _osmo_mncc_log(ss, level, __BASE_FILE__, __LINE__, prefix, msg, len);