Harald Welte | faea754 | 2016-12-24 01:21:03 +0100 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | |
| 3 | #include "diag_log.h" |
Harald Welte | 84ec50f | 2016-12-24 10:16:00 +0100 | [diff] [blame] | 4 | #include "protocol/diag_log_wcdma.h" |
Harald Welte | faea754 | 2016-12-24 01:21:03 +0100 | [diff] [blame] | 5 | |
| 6 | static 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 Welte | faea754 | 2016-12-24 01:21:03 +0100 | [diff] [blame] | 14 | static const struct diag_log_dispatch_tbl log_tbl[] = { |
| 15 | { UMTS(LOG_WCDMA_SIGNALING_MSG_C), handle_rrc_sig_msg }, |
| 16 | }; |
| 17 | |
| 18 | static __attribute__((constructor)) void on_dso_load_umts(void) |
| 19 | { |
| 20 | diag_log_reg_dispatch(log_tbl, ARRAY_SIZE(log_tbl)); |
| 21 | } |