aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-08-17 13:16:10 +0200
committerHarald Welte <laforge@gnumonks.org>2012-08-17 13:16:10 +0200
commit570ce24debddbba8efca8567b70a805f80d18ecc (patch)
tree8d5bc6573fbdbf00fc0c883743ccbfde9d805e7d /openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
parente555c2b5453a9aea6fa03db4033eac1cee8d8ce4 (diff)
VTY: improve VTY prompt and make sure exit/end works everywhere
Some nodes below 'config' didn't have ournode_exit / ournode_end, and thus were not able to properly perform this function. exit should always only go back one level, while end drops us back to ENABLE_NODE. The prompt now represents the nesting level, and there's one consistent space after the final prompt character (typically #).
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index 1646b592e..220e9606c 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -47,19 +47,19 @@ static struct bsc_nat *_nat;
static struct cmd_node nat_node = {
NAT_NODE,
- "%s(nat)#",
+ "%s(config-nat)# ",
1,
};
static struct cmd_node bsc_node = {
NAT_BSC_NODE,
- "%s(bsc)#",
+ "%s(config-nat-bsc)# ",
1,
};
static struct cmd_node pgroup_node = {
PGROUP_NODE,
- "%s(paging-group)#",
+ "%s(config-nat-paging-group)# ",
1,
};
@@ -1042,6 +1042,8 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_element(NAT_NODE, &cfg_nat_no_pgroup_cmd);
install_node(&pgroup_node, config_write_pgroup);
install_default(PGROUP_NODE);
+ install_element(PGROUP_NODE, &ournode_exit_cmd);
+ install_element(PGROUP_NODE, &ournode_end_cmd);
install_element(PGROUP_NODE, &cfg_pgroup_lac_cmd);
install_element(PGROUP_NODE, &cfg_pgroup_no_lac_cmd);