aboutsummaryrefslogtreecommitdiffstats
path: root/src/diag_log_wcdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diag_log_wcdma.c')
-rw-r--r--src/diag_log_wcdma.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/diag_log_wcdma.c b/src/diag_log_wcdma.c
new file mode 100644
index 0000000..0c3b2b2
--- /dev/null
+++ b/src/diag_log_wcdma.c
@@ -0,0 +1,22 @@
+#include <stdio.h>
+
+#include "diag_log.h"
+#include "protocol/diag_log_gsm.h"
+#include "protocol/diag_log_wcdma.h"
+
+static void handle_rrc_sig_msg(struct log_hdr *lh, struct msgb *msg)
+{
+ struct diag_umts_rrc_msg *rrm = (struct diag_umts_rrc_msg *) msgb_data(msg);
+
+ printf("RRC: %u %u %u: %s\n", rrm->chan_type, rrm->rb_id, rrm->length,
+ osmo_hexdump(msgb_data(msg), rrm->length));
+}
+
+static const struct diag_log_dispatch_tbl log_tbl[] = {
+ { WCDMA(LOG_WCDMA_SIGNALING_MSG_C), handle_rrc_sig_msg },
+};
+
+static __attribute__((constructor)) void on_dso_load_umts(void)
+{
+ diag_log_reg_dispatch(log_tbl, ARRAY_SIZE(log_tbl));
+}