aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-01 08:21:33 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 20:24:10 +0800
commita0df82d48d5d79d5851a0910e237fcfb892e148f (patch)
tree4e8d420fb405c5db7003cb37a08a73bff575a686 /openbsc/src/nat/bsc_nat.c
parent76c83548635fd0c30c16d5c1b38e5ed946720684 (diff)
nat: Handle CRCX/MDCX/DLCX at the nat
* Forward a rewritten msg to the BSS. We change the IP and port to point to the NAT instead of the core network. We also keep track of the BSC and the transacition id. * Handle the case where we have not found a SCCP connection and need to send a response ourselves.
Diffstat (limited to 'openbsc/src/nat/bsc_nat.c')
-rw-r--r--openbsc/src/nat/bsc_nat.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index d75c01dab..0f9f08cd3 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -175,37 +175,6 @@ static void bsc_write(struct bsc_connection *bsc, const u_int8_t *data, unsigned
}
}
-int bsc_write_mgcp(struct bsc_connection *bsc, const u_int8_t *data, unsigned int length)
-{
- struct msgb *msg;
-
- if (length > 4096 - 128) {
- LOGP(DINP, LOGL_ERROR, "Can not send message of that size.\n");
- return -1;
- }
-
- msg = msgb_alloc_headroom(4096, 128, "to-bsc");
- if (!msg) {
- LOGP(DINP, LOGL_ERROR, "Failed to allocate memory for BSC msg.\n");
- return -1;
- }
-
- /* copy the data */
- msg->l3h = msgb_put(msg, length);
- memcpy(msg->l3h, data, length);
-
- /* prepend the header */
- ipaccess_prepend_header(msg, NAT_IPAC_PROTO_MGCP);
-
- if (write_queue_enqueue(&bsc->write_queue, msg) != 0) {
- LOGP(DINP, LOGL_ERROR, "Failed to enqueue the write.\n");
- msgb_free(msg);
- return -1;
- }
-
- return 0;
-}
-
static int forward_sccp_to_bts(struct msgb *msg)
{
struct sccp_connections *con;