diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:11:16 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:21 +0800 |
commit | ab52c84889d576fb065f2d9d2eec490040de3cc3 (patch) | |
tree | 26b0411fcf824166e6b79e38618352938270388a /openbsc/src/common_vty.c | |
parent | 3d73e0d235f2d6ccb401f7d21baa42a90230111c (diff) |
nat: Add NAT_NODE and BSC_NODE for the nat
Implement the go to parent and exit functions for the nat.
Diffstat (limited to 'openbsc/src/common_vty.c')
-rw-r--r-- | openbsc/src/common_vty.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/src/common_vty.c b/openbsc/src/common_vty.c index 16d6815cd..ffa676d77 100644 --- a/openbsc/src/common_vty.c +++ b/openbsc/src/common_vty.c @@ -28,6 +28,7 @@ #include <openbsc/gsm_data.h> #include <openbsc/debug.h> #include <openbsc/gsm_subscriber.h> +#include <openbsc/bsc_nat.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/command.h> @@ -71,6 +72,17 @@ enum node_type bsc_vty_go_parent(struct vty *vty) talloc_free(vty->index); vty->index = NULL; break; + case NAT_NODE: + vty->node = CONFIG_NODE; + vty->index = NULL; + break; + case BSC_NODE: + vty->node = NAT_NODE; + { + struct bsc_config *bsc_config = vty->index; + vty->index = bsc_config->nat; + } + break; default: vty->node = CONFIG_NODE; } @@ -114,11 +126,19 @@ gDEFUN(ournode_exit, vty->index_sub = &ts->trx->description; } break; + case BSC_NODE: + vty->node = NAT_NODE; + { + struct bsc_config *bsc_config = vty->index; + vty->index = bsc_config->nat; + } + break; case MGCP_NODE: case GBPROXY_NODE: case SGSN_NODE: case NS_NODE: case BSSGP_NODE: + case NAT_NODE: vty->node = CONFIG_NODE; vty->index = NULL; break; |