aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-17 07:48:45 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 20:24:14 +0800
commit8139553962bfd60a0027b46ae3001b9996b536d5 (patch)
tree71cf8ef37ce5f29300a61916a1b10c2c4658f8ee /openbsc/src/nat/bsc_nat_vty.c
parenta88742cf5ec7d398d39c7d0623a531d30e2f7189 (diff)
nat: Make the MSC configurable.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/nat/bsc_nat_vty.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c
index a91da7c4e..e0a59992f 100644
--- a/openbsc/src/nat/bsc_nat_vty.c
+++ b/openbsc/src/nat/bsc_nat_vty.c
@@ -56,6 +56,7 @@ static int config_write_nat(struct vty *vty)
if (_nat->imsi_deny)
vty_out(vty, " insi deny %s%s", _nat->imsi_deny, VTY_NEWLINE);
vty_out(vty, " msc ip %s%s", _nat->msc_ip, VTY_NEWLINE);
+ vty_out(vty, " msc port %d%s", _nat->msc_port, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -213,6 +214,15 @@ DEFUN(cfg_nat_msc_ip,
return CMD_SUCCESS;
}
+DEFUN(cfg_nat_msc_port,
+ cfg_nat_msc_port_cmd,
+ "msc port <1-65500>",
+ "Set the port of the MSC.")
+{
+ _nat->msc_port = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
/* per BSC configuration */
DEFUN(cfg_bsc, cfg_bsc_cmd, "bsc BSC_NR", "Select a BSC to configure\n")
{
@@ -327,6 +337,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_element(NAT_NODE, &cfg_nat_imsi_allow_cmd);
install_element(NAT_NODE, &cfg_nat_imsi_deny_cmd);
install_element(NAT_NODE, &cfg_nat_msc_ip_cmd);
+ install_element(NAT_NODE, &cfg_nat_msc_port_cmd);
/* BSC subgroups */
install_element(NAT_NODE, &cfg_bsc_cmd);