blob: c0303b41e2014ca966b48e36814e6c04c4f65ca1 [file] [log] [blame]
Harald Weltefaea7542016-12-24 01:21:03 +01001#include <stdio.h>
2
3#include "diag_log.h"
4#include "diag_wcdma.h"
5#include "log_codes_wcdma.h"
6
7static void handle_rrc_sig_msg(struct log_hdr *lh, struct msgb *msg)
8{
9 struct diag_umts_rrc_msg *rrm = (struct diag_umts_rrc_msg *) msgb_data(msg);
10
11 printf("RRC: %u %u %u: %s\n", rrm->chan_type, rrm->rb_id, rrm->length,
12 osmo_hexdump(msgb_data(msg), rrm->length));
13}
14
15#define UMTS(x) (0x4000 + x)
16
17
18static const struct diag_log_dispatch_tbl log_tbl[] = {
19 { UMTS(LOG_WCDMA_SIGNALING_MSG_C), handle_rrc_sig_msg },
20};
21
22static __attribute__((constructor)) void on_dso_load_umts(void)
23{
24 diag_log_reg_dispatch(log_tbl, ARRAY_SIZE(log_tbl));
25}