blob: 1d6964862726a5e51b51a55e2e0757e31a2c310a [file] [log] [blame]
Harald Weltefaea7542016-12-24 01:21:03 +01001#include <stdio.h>
2
3#include "diag_log.h"
Harald Welte84ec50f2016-12-24 10:16:00 +01004#include "protocol/diag_log_wcdma.h"
Harald Weltefaea7542016-12-24 01:21:03 +01005
6static void handle_rrc_sig_msg(struct log_hdr *lh, struct msgb *msg)
7{
8 struct diag_umts_rrc_msg *rrm = (struct diag_umts_rrc_msg *) msgb_data(msg);
9
10 printf("RRC: %u %u %u: %s\n", rrm->chan_type, rrm->rb_id, rrm->length,
11 osmo_hexdump(msgb_data(msg), rrm->length));
12}
13
Harald Weltefaea7542016-12-24 01:21:03 +010014static const struct diag_log_dispatch_tbl log_tbl[] = {
15 { UMTS(LOG_WCDMA_SIGNALING_MSG_C), handle_rrc_sig_msg },
16};
17
18static __attribute__((constructor)) void on_dso_load_umts(void)
19{
20 diag_log_reg_dispatch(log_tbl, ARRAY_SIZE(log_tbl));
21}