diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2013-12-03 14:43:34 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2013-12-10 11:11:42 +0100 |
commit | db2d431697609d473de433b7028f81ce499a02c0 (patch) | |
tree | 65830327458c4763f30589a60c462c2d68f89c6a /openbsc/tests/mgcp/mgcp_test.c | |
parent | 55ba140da126c78013fe1a6055d750ee10b60ecf (diff) |
mgcp/rtp: Add RTP header patch mode configuration
This adds datastructures and a VTY frontend to configure the
different type of RTP header patching: SSRC and timestamp.
Note that timestamp patching is not yet implemented.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/mgcp/mgcp_test.c')
-rw-r--r-- | openbsc/tests/mgcp/mgcp_test.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index 8e130bbd8..908773a69 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -558,6 +558,9 @@ static void test_packet_error_detection(int patch_ssrc, int patch_ts) trunk.number_endpoints = 1; trunk.endpoints = &endp; + trunk.force_constant_ssrc = patch_ssrc; + trunk.force_constant_timing = patch_ts; + endp.tcfg = &trunk; /* This doesn't free endp but resets/frees all fields of the structure @@ -568,7 +571,6 @@ static void test_packet_error_detection(int patch_ssrc, int patch_ts) mgcp_free_endp(&endp); rtp->payload_type = 98; - endp.allow_patch = patch_ssrc; for (i = 0; i < ARRAY_SIZE(test_rtp_packets1); ++i) { struct rtp_packet_info *info = test_rtp_packets1 + i; @@ -577,6 +579,8 @@ static void test_packet_error_detection(int patch_ssrc, int patch_ts) OSMO_ASSERT(info->len >= 0); memmove(buffer, info->data, info->len); + mgcp_rtp_end_config(&endp, 1, rtp); + mgcp_patch_and_count(&endp, &state, rtp, &addr, buffer, info->len); |