diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-05 14:54:56 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-04-16 09:17:21 +0200 |
commit | c327187259d74cf260c977f165963778de4bedb1 (patch) | |
tree | 1072aaa6f04f075261636f964e1ecb314a402fee /openbsc/src/osmo-bsc_nat/bsc_nat.c | |
parent | 77956aa034a7ac5ddfdf91c7341d3bf82cb07367 (diff) |
nat: Make it possible to send MGCP messages through the IPA multiplex
Instead of handling MGCP through the UDP socket, read and write messages
through the ipa connection to the MSC.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat.c')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 792d33c23..e70f54952 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -333,6 +333,12 @@ static void send_mgcp_reset(struct bsc_connection *bsc) bsc_write_mgcp(bsc, mgcp_reset, sizeof mgcp_reset - 1); } +void bsc_nat_send_mgcp_to_msc(struct bsc_nat *nat, struct msgb *msg) +{ + ipaccess_prepend_header(msg, IPAC_PROTO_MGCP_OLD); + queue_for_msc(nat->msc_con, msg); +} + /* * Below is the handling of messages coming * from the MSC and need to be forwarded to @@ -820,8 +826,11 @@ static int ipaccess_msc_read_cb(struct osmo_fd *bfd) initialize_msc_if_needed(msc_con); else if (msg->l2h[0] == IPAC_MSGT_ID_GET) send_id_get_response(msc_con); - } else if (hh->proto == IPAC_PROTO_SCCP) + } else if (hh->proto == IPAC_PROTO_SCCP) { forward_sccp_to_bts(msc_con, msg); + } else if (hh->proto == IPAC_PROTO_MGCP_OLD) { + bsc_nat_handle_mgcp(nat, msg); + } msgb_free(msg); return 0; |