From 0bbf67dfd3d97c67a126e60de2c5648c88427981 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 1 Jan 2018 20:31:58 +0100 Subject: 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 --- include/osmocom/gsm/mncc.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/osmocom') 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); -- cgit v1.2.3