aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-09-02 15:42:08 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-09-03 15:33:29 +0200
commit5c5e942765d186e4a7979bc29d5b0eaf3f305e2a (patch)
treef7e495e94313ec68c2b3f6a4590c0c90dc82ebeb /openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c
parente581cd18c1d89efdeb3015286b6c1d13c67cc75c (diff)
nat/vty: Allow to configure an optional local-call ip address
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c b/openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c
new file mode 100644
index 000000000..163261e1b
--- /dev/null
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_call_control.c
@@ -0,0 +1,37 @@
+/* Local Call-Control Filter Code */
+/*
+ * (C) 2013 by Holger Hans Peter Freyther <zecke@selfish.org>
+ * (C) 2013 by On-Waves
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <openbsc/bsc_nat.h>
+#include <openbsc/bsc_msc.h>
+#include <openbsc/vty.h>
+
+#include <osmocom/core/talloc.h>
+
+void bsc_cc_update_msc_ip(struct bsc_nat *nat, const char *ip)
+{
+ if (ip) {
+ bsc_replace_string(nat, &nat->local_dest->ip, ip);
+ } else {
+ talloc_free(nat->local_dest->ip);
+ nat->local_dest->ip = NULL;
+ }
+}
+