aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-11-28 17:27:05 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-09 11:54:38 +0000
commita1fa955212e18ddca286a2c7d30333116406f56b (patch)
tree566d138f88cc84b7413669a5fac1ecf9a306c76b /src/common/l1sap.c
parent55a7b0741752409e253412b22d842e8367fd5477 (diff)
Save RTP metadata in Control Buffer
Having RTP metadata is useful for debugging - save Sequence Number and Timestamp next to Marker bit from RTP header. Change-Id: I359b3bcb74fbfc071547fe2f9d837829374fe997
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 82aa1ac9..cfa02bde 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -661,7 +661,8 @@ static int l1sap_tch_rts_ind(struct gsm_bts_trx *trx,
struct gsm_time g_time;
struct gsm_lchan *lchan;
uint8_t chan_nr, marker = 0;
- uint32_t fn;
+ uint16_t seq;
+ uint32_t fn, timestamp;
chan_nr = rts_ind->chan_nr;
fn = rts_ind->fn;
@@ -694,6 +695,10 @@ static int l1sap_tch_rts_ind(struct gsm_bts_trx *trx,
} else {
/* Obtain RTP header Marker bit from control buffer */
marker = rtpmsg_marker_bit(resp_msg);
+ /* Obtain RTP header Sequence Number from control buffer */
+ seq = rtpmsg_seq(resp_msg);
+ /* Obtain RTP header Timestamp from control buffer */
+ timestamp = rtpmsg_ts(resp_msg);
resp_msg->l2h = resp_msg->data;
msgb_push(resp_msg, sizeof(*resp_l1sap));
@@ -1074,8 +1079,12 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
/* Store RTP header Marker bit in control buffer */
rtpmsg_marker_bit(msg) = marker;
+ /* Store RTP header Sequence Number in control buffer */
+ rtpmsg_seq(msg) = seq_number;
+ /* Store RTP header Timestamp in control buffer */
+ rtpmsg_ts(msg) = timestamp;
- /* make sure the queue doesn't get too long */
+ /* make sure the queue doesn't get too long */
llist_for_each_entry(tmp, &lchan->dl_tch_queue, list)
count++;
while (count >= 2) {