From 078d532930abb402e949f455ec143ba4ebef2ab4 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 16 Dec 2013 10:41:15 +0100 Subject: tests: osmux: test multi-batch support Extend this to test multi-batch in one packet support, eg. OSMUX message (len=158) OSMUX seq=016 ccid=000 ft=1 ctr=6 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ]OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ] --- tests/osmux/osmux_test.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index 3003974..53c33c4 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -156,7 +156,10 @@ int main(void) continue; k++; - osmux_xfrm_input(&h_input, msg, 0); + /* Fan out RTP packets between two circuit IDs to test + * multi-batch support. + */ + osmux_xfrm_input(&h_input, msg, i % 2); if (i % 4 == 0) { gettimeofday(&last, NULL); @@ -166,11 +169,12 @@ int main(void) */ osmux_xfrm_input_deliver(&h_input); - /* The first RTP message that is delivered immediately, - * wait until the three RTP messages that are extracted - * from OSMUX has been delivered. + /* The first two RTP message (one per circuit ID batch) + * are delivered immediately, wait until the three RTP + * messages that are extracted from OSMUX has been + * delivered. */ - for (j=0; j