aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat_utils.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-08 10:24:57 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-08 10:24:57 +0200
commit6cb97bdebe5503d9fd7487d7f57c4c9e3d87b4c5 (patch)
treee36fc93ebc04e9efb74b6781658ca62f083c4065 /openbsc/src/nat/bsc_nat_utils.c
parent8c3694a2824b674ce4653c013d1f79e019e3be8d (diff)
nat: Attempt to have a single BSC write method
This method currently prepends the IPA header and sends the data. In the future we might be able to use SCTP for it. We have to remove the IPA header from the static messages for that to work. This code is untested.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_utils.c')
-rw-r--r--openbsc/src/nat/bsc_nat_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index 24b4e1f00..85f72cfad 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -146,13 +146,13 @@ int bsc_write_mgcp(struct bsc_connection *bsc, const u_int8_t *data, unsigned in
msg->l3h = msgb_put(msg, length);
memcpy(msg->l3h, data, length);
- return bsc_write_mgcp_msg(bsc, msg);
+ return bsc_write(bsc, msg, NAT_IPAC_PROTO_MGCP);
}
-int bsc_write_mgcp_msg(struct bsc_connection *bsc, struct msgb *msg)
+int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int proto)
{
/* prepend the header */
- ipaccess_prepend_header(msg, NAT_IPAC_PROTO_MGCP);
+ ipaccess_prepend_header(msg, proto);
if (write_queue_enqueue(&bsc->write_queue, msg) != 0) {
LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");