path: root/openbsc/include
diff options
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-22 12:08:17 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-22 12:13:44 +0800
commitbbc2c6e76548047c7eaa7f5fbb22fd9fe1edde5f (patch)
treed71facf1a759a1ce4656b1ae49501bca38c9b3b3 /openbsc/include
parent7e3724ad18119967cd0fbaaee601d3e0d06e5ad4 (diff)
nat: Change MGCP DLCX handling and send dummy MDCX to the BTS.
When setting a new MSC timeslot to a SCCP connection check if any of the existing connections have this timeslot, if so we will send a DLCX down the stream to make sure it is closed there, when we will CRCX this new timeslot we will happily reallocate it. When the SCCP connection goes away, or we get a DLCX from the network, or the BSC is gone we will send a DLCX message down the stream as well. When we receive a CRCX from the network we will forward the CRCX as usual and send a dummy MDCX after it. For the DLCX and the dummy MDCX we send a custom MGCP message that will not provoke an answer. Even if the downstream MGCP GW will answer we will ignore it due the dummy transaction id that is not used anywhere else. This change should make sure that we close the dowstream endpoint all the time, even when the DLCX arrives after the SCCP connection is torndown.
Diffstat (limited to 'openbsc/include')
1 files changed, 3 insertions, 5 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 353cf0809..6ef1f5971 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -162,8 +162,6 @@ struct bsc_endpoint {
char *transaction_id;
/* the bsc we are talking to */
struct bsc_connection *bsc;
- /* pending delete */
- int pending_delete;
@@ -257,10 +255,10 @@ struct sccp_connections *patch_sccp_src_ref_to_msc(struct msgb *, struct bsc_nat
int bsc_write_mgcp(struct bsc_connection *bsc, const u_int8_t *data, unsigned int length);
int bsc_mgcp_assign(struct sccp_connections *, struct msgb *msg);
-void bsc_mgcp_clear(struct sccp_connections *);
-void bsc_mgcp_free_endpoint(struct bsc_nat *nat, int);
+void bsc_mgcp_init(struct sccp_connections *);
+void bsc_mgcp_dlcx(struct sccp_connections *);
void bsc_mgcp_free_endpoints(struct bsc_nat *nat);
-int bsc_mgcp_init(struct bsc_nat *nat);
+int bsc_mgcp_nat_init(struct bsc_nat *nat);
struct sccp_connections *bsc_mgcp_find_con(struct bsc_nat *, int endpoint_number);
struct msgb *bsc_mgcp_rewrite(char *input, int length, const char *ip, int port);