From 717cdf540558b95f31e4c8ea58d0fc9e06429228 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 21 Jul 2017 21:56:23 +0200 Subject: Introduce GSMTAP categories When looking at GSMTAP output so far, one is easily overwhelmed by way too much information being presented. A lot of is consists of DUMMY frames, which are probably of lowest interest, ever. A concept similar to the "gsmtap-sapi" of OsmoBTS is introduced, by which the user can configure which particular categories (uplink or downlink control or data, gprs or egprs, ...) he actually wants to see in his logs. Change-Id: I297183690e98a7234dfc1608c18847d8981306e4 --- src/gprs_rlcmac_sched.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gprs_rlcmac_sched.cpp') diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index a21c0236..e5c8ec8c 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -356,22 +356,29 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts, /* Prio 1: select control message */ msg = sched_select_ctrl_msg(trx, ts, fn, block_nr, pdch, ul_ass_tbf, dl_ass_tbf, ul_ack_tbf); - if (msg) + if (msg) { bts->bts->rlc_sent_control(); + bts->bts->send_gsmtap(PCU_GSMTAP_C_DL_CTRL, false, trx, ts, GSMTAP_CHANNEL_PACCH, fn, msg->data, msg->len); + } /* Prio 2: select data message for downlink */ if (!msg) { msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch); - if (msg) + if (msg) { bts->bts->rlc_sent(); + /* FIXME: distinguish between GPRS and EGPRS */ + bts->bts->send_gsmtap(PCU_GSMTAP_C_DL_DATA_GPRS, false, trx, ts, GSMTAP_CHANNEL_PACCH, fn, msg->data, msg->len); + } } /* Prio 3: send dummy contol message */ if (!msg) { /* increase counter */ msg = sched_dummy(); - if (msg) + if (msg) { bts->bts->rlc_sent_dummy(); + bts->bts->send_gsmtap(PCU_GSMTAP_C_DL_DUMMY, false, trx, ts, GSMTAP_CHANNEL_PACCH, fn, msg->data, msg->len); + } } if (!msg) -- cgit v1.2.3