diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2012-08-06 18:56:36 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-06 21:04:25 +0200 |
commit | b9cf903bbe0cd9b84a1226c345e68f0e826034e9 (patch) | |
tree | 2db9655c88dbbf63bbe513fb03b0c3582623f086 /tests/osmo-pcap-test | |
parent | da0c9ab92211ff09b4fee402f3ed88c2f718ba37 (diff) |
osmux: add infrastructure to map RTP SSRC and osmux CCID
Diffstat (limited to 'tests/osmo-pcap-test')
-rw-r--r-- | tests/osmo-pcap-test/osmux_test.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c index 157947a..8dab1bf 100644 --- a/tests/osmo-pcap-test/osmux_test.c +++ b/tests/osmo-pcap-test/osmux_test.c @@ -26,6 +26,7 @@ #include <osmocom/core/application.h> #include <osmocom/core/talloc.h> +#include <osmocom/netif/rtp.h> #include <osmocom/netif/osmux.h> #include "osmo_pcap.h" @@ -77,6 +78,14 @@ struct osmux_in_handle h_input = { static int pcap_test_run(struct msgb *msg) { int ret; + struct rtp_hdr *rtph; + + rtph = osmo_rtp_get_hdr(msg); + if (rtph == NULL) + return 0; + + if (osmux_xfrm_input_get_ccid(&h_input, rtph->ssrc) < 0) + osmux_xfrm_input_register_ccid(&h_input, rtph->ssrc); while ((ret = osmux_xfrm_input(&h_input, msg)) > 1) { /* batch full, deliver it */ |