aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
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-04-01 08:21:33 +0200
commit9d519189aefc1a872e8388b8264f8cf9b70aca7b (patch)
treefc333ec6c8dc7553525743ae647fbd341491768b /openbsc/include
parentf0fc618782dbcb9cfb915184dbe5f218f5346273 (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/include')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 068ef68fb..e41849652 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -127,6 +127,16 @@ struct bsc_config {
};
/**
+ * BSCs point of view of endpoints
+ */
+struct bsc_endpoint {
+ /* the pending transaction id */
+ char *transaction_id;
+ /* the bsc we are talking to */
+ struct bsc_connection *bsc;
+};
+
+/**
* the structure of the "nat" network
*/
struct bsc_nat {
@@ -143,6 +153,9 @@ struct bsc_nat {
/* MGCP config */
struct mgcp_config *mgcp_cfg;
struct write_queue mgcp_queue;
+ struct msgb *mgcp_msg;
+
+ struct bsc_endpoint *bsc_endpoints;
};
/* create and init the structures */
@@ -177,9 +190,11 @@ struct sccp_connections *patch_sccp_src_ref_to_msc(struct msgb *, struct bsc_nat
/**
* MGCP/Audio handling
*/
+int bsc_write_mgcp_msg(struct bsc_connection *bsc, struct msgb *msg);
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_free_endpoints(struct bsc_nat *nat);
int bsc_mgcp_init(struct bsc_nat *nat);