Change in osmo-ttcn3-hacks[master]: library/RTP_Emulation: add optional port for RTP sniffing

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Jul 4 02:18:17 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24841 )


Change subject: library/RTP_Emulation: add optional port for RTP sniffing
......................................................................

library/RTP_Emulation: add optional port for RTP sniffing

Change-Id: I224d25aa298b5b512ab9e2a36c144e19c23d8462
---
M library/RTP_Emulation.ttcn
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/24841/1

diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 728d352..b2360dc 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -81,6 +81,8 @@
 
 	/* user-facing port for controlling the binding */
 	port RTPEM_CTRL_PT CTRL;
+	/* user-facing port for sniffing RTP frames */
+	port RTPEM_DATA_PT DATA;
 
 	/* configurable by user, should be fixed */
 	var RtpemConfig g_cfg := c_RtpemDefaultCfg;
@@ -186,6 +188,10 @@
 	      RTPEM_conn_refuse_received;
 } with { extension "internal" };
 
+type port RTPEM_DATA_PT message {
+	inout PDU_RTP, PDU_RTCP;
+} with { extension "internal" };
+
 function f_rtpem_bind(RTPEM_CTRL_PT pt, in HostName local_host, inout PortNumber local_port) {
 	pt.call(RTPEM_bind:{local_host, local_port}) {
 		[] pt.getreply(RTPEM_bind:{local_host, ?}) -> param (local_port) {};
@@ -515,10 +521,16 @@
 			if (g_cfg.iuup_mode) {
 				rx_rtp.msg.rtp.data := f_IuUP_Em_rx_decaps(g_iuup_ent, rx_rtp.msg.rtp.data);
 			}
+			if (DATA.checkstate("Connected")) {
+				DATA.send(rx_rtp.msg.rtp);
+			}
 		}
 		[g_rx_enabled] RTCP.receive(tr_rtcp) -> value rx_rtp {
 			//log("RX RTCP: ", rx_rtp);
 			g_stats_rtcp.num_pkts_rx := g_stats_rtcp.num_pkts_rx+1;
+			if (DATA.checkstate("Connected")) {
+				DATA.send(rx_rtp.msg.rtcp);
+			}
 		}
 
 		/* transmit if timer has expired */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24841
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I224d25aa298b5b512ab9e2a36c144e19c23d8462
Gerrit-Change-Number: 24841
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210704/51667a0d/attachment.htm>


More information about the gerrit-log mailing list