aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_osmux.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@soleta.eu>2015-07-17 21:56:23 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-08-19 00:17:31 +0200
commit57e95a22f02b5b2ec781d9bc977c785a6e6f1166 (patch)
tree44e1ae06ba9b880c98bcf240e494ac51ae31f145 /openbsc/src/libmgcp/mgcp_osmux.c
parentecff2424e56ce2a69dfe35190a5182cb90a3c09c (diff)
osmux: add option to pad the circuit with dummy messages
Iridium is a satellite network which operates a GPRS-like that allows you to get speeds up to 128kbit/s. However, it takes from 5 to 6 secs to get the bandwidth allocated, so the conversation is garbled during the time. This patch uses the new dummy padding support in libosmo-netif that is controlled through the osmux osmux_xfrm_input_open_circuit(). This includes a new VTY option for osmux.
Diffstat (limited to 'openbsc/src/libmgcp/mgcp_osmux.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index 7f61173a1..90b73680b 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -462,6 +462,12 @@ int osmux_enable_endpoint(struct mgcp_endpoint *endp, int role,
LOGP(DMGCP, LOGL_ERROR, "Cannot allocate input osmux handle\n");
return -1;
}
+ if (!osmux_xfrm_input_open_circuit(endp->osmux.in, endp->osmux.cid,
+ endp->cfg->osmux_dummy)) {
+ LOGP(DMGCP, LOGL_ERROR, "Cannot open osmux circuit %u\n",
+ endp->osmux.cid);
+ return -1;
+ }
switch (endp->cfg->role) {
case MGCP_BSC_NAT:
@@ -480,6 +486,7 @@ void osmux_disable_endpoint(struct mgcp_endpoint *endp)
{
LOGP(DMGCP, LOGL_INFO, "Releasing endpoint %u using Osmux CID %u\n",
ENDPOINT_NUMBER(endp), endp->osmux.cid);
+ osmux_xfrm_input_close_circuit(endp->osmux.in, endp->osmux.cid);
endp->osmux.state = OSMUX_STATE_DISABLED;
endp->osmux.cid = -1;
osmux_handle_put(endp->osmux.in);