aboutsummaryrefslogtreecommitdiffstats
path: root/src/diag_log_wcdma.c
blob: 0c3b2b2e53bcb72d375d84efd4a67d1d0675548c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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));
}