aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty/command.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-02-07 14:57:06 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-02-08 13:44:48 +0100
commitbe807e4250dfcde9ad65508ce10647487694f6b3 (patch)
tree89683855830c7a7836a9877e5f2ab44b086ea866 /openbsc/src/vty/command.c
parent71ddbf5c4f75b361c04d37e0de5514fe7f390496 (diff)
[nat] Add VTY support to the BSC nat application
* Create struct bsc_nat and move the various lists into this structure * Create the VTY code * Call the VTY init and parsing code * Create functions to create the types.. * Add some stuff into the bsc_connection to be used for the NAT with proper config files. E.g. to close the connection if the BSC does not respond to a given command.
Diffstat (limited to 'openbsc/src/vty/command.c')
-rw-r--r--openbsc/src/vty/command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/vty/command.c b/openbsc/src/vty/command.c
index 6372fb13b..a0d36a913 100644
--- a/openbsc/src/vty/command.c
+++ b/openbsc/src/vty/command.c
@@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#include <openbsc/gsm_data.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/talloc.h>
+#include <openbsc/bsc_nat.h>
/* Command vector which includes some level of command lists. Normally
each daemon maintains each own cmdvec. */
@@ -1947,6 +1948,13 @@ enum node_type vty_go_parent(struct vty *vty)
subscr_put(vty->index);
vty->index = NULL;
break;
+ case BSC_NODE:
+ vty->node = NAT_NODE;
+ {
+ struct bsc_config *bsc = vty->index;
+ vty->index = bsc->nat;
+ }
+ break;
default:
vty->node = CONFIG_NODE;
}