vty: Document more VTY parameters of a command

The below is used to identify commands that need proper documentation

diff --git a/src/vty/command.c b/src/vty/command.c
index ab1eaca..bcf72d0 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -426,6 +426,20 @@ void install_element(enum node_type ntype, struct cmd_element *cmd)

        cmd->strvec = cmd_make_descvec(cmd->string, cmd->doc);
        cmd->cmdsize = cmd_cmdsize(cmd->strvec);
+
+       printf("NODE: %d\n", ntype);
+
+       int j;
+       for (j = 0; j < vector_count(cmd->strvec); ++j) {
+               vector descvec = vector_slot(cmd->strvec, j);
+               int i;
+               for (i = 0; i < vector_active(descvec); i++) {
+                       struct desc *desc = vector_slot(descvec, i);
+                       if (desc == NULL)
+                               continue;
+                       printf(" %s %s\n", desc->cmd, desc->str);
+               }
+       }
 }
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index a98779d..e2ff439 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -52,6 +52,14 @@
 
 #include "../../bscconfig.h"
 
+
+#define NETWORK_STR "Configure the GSM network\n"
+#define CODE_CMD_STR "Code commands\n"
+#define NAME_CMD_STR "Name Commands\n"
+#define NAME_STR "Name to use\n"
+#define LCHAN_NR_STR "Logical Channel Number\n"
+
+
 /* FIXME: this should go to some common file */
 static const struct value_string gprs_ns_timer_strs[] = {
 	{ 0, "tns-block" },
@@ -962,7 +970,7 @@
       "show lchan [bts_nr] [trx_nr] [ts_nr] [lchan_nr]",
 	SHOW_STR "Display information about a logical channel\n"
 	"BTS Number\n" "TRX Number\n" "Timeslot Number\n"
-	"Logical Channel Number\n")
+	LCHAN_NR_STR)
 
 {
 	return lchan_summary(vty, argc, argv, lchan_dump_full_vty);
@@ -972,8 +980,9 @@
       show_lchan_summary_cmd,
       "show lchan summary [bts_nr] [trx_nr] [ts_nr] [lchan_nr]",
 	SHOW_STR "Display information about a logical channel\n"
+        "Short summary\n"
 	"BTS Number\n" "TRX Number\n" "Timeslot Number\n"
-	"Logical Channel Number\n")
+        LCHAN_NR_STR)
 {
 	return lchan_summary(vty, argc, argv, lchan_dump_short_vty);
 }
@@ -1023,8 +1032,6 @@
 	return CMD_SUCCESS;
 }
 
-#define NETWORK_STR "Configure the GSM network\n"
-
 DEFUN(cfg_net,
       cfg_net_cmd,
       "network", NETWORK_STR)
@@ -1035,11 +1042,13 @@
 	return CMD_SUCCESS;
 }
 
-
 DEFUN(cfg_net_ncc,
       cfg_net_ncc_cmd,
       "network country code <1-999>",
-      "Set the GSM network country code")
+      "Set the GSM network country code\n"
+      "Country commands\n"
+      CODE_CMD_STR
+      "Network Country Code to use\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 
@@ -1051,7 +1060,10 @@
 DEFUN(cfg_net_mnc,
       cfg_net_mnc_cmd,
       "mobile network code <0-999>",
-      "Set the GSM mobile network code")
+      "Set the GSM mobile network code\n"
+      "Network Commands\n"
+      CODE_CMD_STR
+      "Mobile Network Code to use\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 
@@ -1063,7 +1075,7 @@
 DEFUN(cfg_net_name_short,
       cfg_net_name_short_cmd,
       "short name NAME",
-      "Set the short GSM network name")
+      "Set the short GSM network name\n" NAME_CMD_STR NAME_STR)
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 
@@ -1074,7 +1086,7 @@
 DEFUN(cfg_net_name_long,
       cfg_net_name_long_cmd,
       "long name NAME",
-      "Set the long GSM network name")
+      "Set the long GSM network name\n" NAME_CMD_STR NAME_STR)
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 
@@ -1191,11 +1203,13 @@
 #define HO_WIN_RXLEV_STR HO_WIN_STR "Received Level Averaging\n"
 #define HO_WIN_RXQUAL_STR HO_WIN_STR "Received Quality Averaging\n"
 #define HO_PBUDGET_STR HANDOVER_STR "Power Budget\n"
+#define HO_AVG_COUNT_STR "Amount to use for Averaging\n"
 
 DEFUN(cfg_net_ho_win_rxlev_avg, cfg_net_ho_win_rxlev_avg_cmd,
       "handover window rxlev averaging <1-10>",
 	HO_WIN_RXLEV_STR
-	"How many RxLev measurements are used for averaging")
+	"How many RxLev measurements are used for averaging\n"
+	HO_AVG_COUNT_STR)
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->handover.win_rxlev_avg = atoi(argv[0]);
@@ -1205,7 +1219,8 @@
 DEFUN(cfg_net_ho_win_rxqual_avg, cfg_net_ho_win_rxqual_avg_cmd,
       "handover window rxqual averaging <1-10>",
 	HO_WIN_RXQUAL_STR
-	"How many RxQual measurements are used for averaging")
+	"How many RxQual measurements are used for averaging\n"
+	HO_AVG_COUNT_STR)
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->handover.win_rxqual_avg = atoi(argv[0]);
@@ -1214,8 +1229,9 @@
 
 DEFUN(cfg_net_ho_win_rxlev_neigh_avg, cfg_net_ho_win_rxlev_avg_neigh_cmd,
       "handover window rxlev neighbor averaging <1-10>",
-	HO_WIN_RXLEV_STR
-	"How many RxQual measurements are used for averaging")
+	HO_WIN_RXLEV_STR "Neighbor\n"
+	"How many RxQual measurements are used for averaging\n"
+	HO_AVG_COUNT_STR)
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->handover.win_rxlev_avg_neigh = atoi(argv[0]);
@@ -1225,7 +1241,8 @@
 DEFUN(cfg_net_ho_pwr_interval, cfg_net_ho_pwr_interval_cmd,
       "handover power budget interval <1-99>",
 	HO_PBUDGET_STR
-	"How often to check if we have a better cell (SACCH frames)")
+	"How often to check if we have a better cell (SACCH frames)\n"
+	"Interval\n" "Number\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->handover.pwr_interval = atoi(argv[0]);
@@ -1235,7 +1252,8 @@
 DEFUN(cfg_net_ho_pwr_hysteresis, cfg_net_ho_pwr_hysteresis_cmd,
       "handover power budget hysteresis <0-999>",
 	HO_PBUDGET_STR
-	"How many dB does a neighbor to be stronger to become a HO candidate")
+	"How many dB does a neighbor to be stronger to become a HO candidate\n"
+	"Hysteresis\n" "Number\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->handover.pwr_hysteresis = atoi(argv[0]);
@@ -1245,7 +1263,8 @@
 DEFUN(cfg_net_ho_max_distance, cfg_net_ho_max_distance_cmd,
       "handover maximum distance <0-9999>",
 	HANDOVER_STR
-	"How big is the maximum timing advance before HO is forced")
+	"How big is the maximum timing advance before HO is forced\n"
+	"Distance\n" "Number\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->handover.max_distance = atoi(argv[0]);
@@ -1255,7 +1274,10 @@
 DEFUN(cfg_net_pag_any_tch,
       cfg_net_pag_any_tch_cmd,
       "paging any use tch (0|1)",
-      "Assign a TCH when receiving a Paging Any request")
+      "Assign a TCH when receiving a Paging Any request\n"
+      "Any Channel\n" "Use\n" "TCH\n"
+      "Do not use TCH for Paging Request Any\n"
+      "Do use TCH for Paging Request Any\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->pag_any_tch = atoi(argv[0]);
@@ -1268,7 +1290,7 @@
       cfg_net_T##number##_cmd,					\
       "timer t" #number  " <0-65535>",				\
       "Configure GSM Timers\n"					\
-      doc)							\
+      doc "Timer Value\n")					\
 {								\
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);	\
 	int value = atoi(argv[0]);				\
@@ -1283,24 +1305,24 @@
 	return CMD_SUCCESS;					\
 }
 
-DECLARE_TIMER(3101, "Set the timeout value for IMMEDIATE ASSIGNMENT.")
-DECLARE_TIMER(3103, "Set the timeout value for HANDOVER.")
-DECLARE_TIMER(3105, "Currently not used.")
-DECLARE_TIMER(3107, "Currently not used.")
-DECLARE_TIMER(3109, "Currently not used.")
-DECLARE_TIMER(3111, "Set the RSL timeout to wait before releasing the RF Channel.")
-DECLARE_TIMER(3113, "Set the time to try paging a subscriber.")
-DECLARE_TIMER(3115, "Currently not used.")
-DECLARE_TIMER(3117, "Currently not used.")
-DECLARE_TIMER(3119, "Currently not used.")
-DECLARE_TIMER(3122, "Waiting time (seconds) after IMM ASS REJECT")
-DECLARE_TIMER(3141, "Currently not used.")
+DECLARE_TIMER(3101, "Set the timeout value for IMMEDIATE ASSIGNMENT.\n")
+DECLARE_TIMER(3103, "Set the timeout value for HANDOVER.\n")
+DECLARE_TIMER(3105, "Currently not used.\n")
+DECLARE_TIMER(3107, "Currently not used.\n")
+DECLARE_TIMER(3109, "Currently not used.\n")
+DECLARE_TIMER(3111, "Set the RSL timeout to wait before releasing the RF Channel.\n")
+DECLARE_TIMER(3113, "Set the time to try paging a subscriber.\n")
+DECLARE_TIMER(3115, "Currently not used.\n")
+DECLARE_TIMER(3117, "Currently not used.\n")
+DECLARE_TIMER(3119, "Currently not used.\n")
+DECLARE_TIMER(3122, "Waiting time (seconds) after IMM ASS REJECT\n")
+DECLARE_TIMER(3141, "Currently not used.\n")
 
 DEFUN(cfg_net_dtx,
       cfg_net_dtx_cmd,
       "dtx-used (0|1)",
       "Enable the usage of DTX.\n"
-      "DTX is enabled/disabled")
+      "DTX is disabled\n" "DTX is enabled\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 	gsmnet->dtx_enabled = atoi(argv[0]);
@@ -1356,7 +1378,7 @@
 DEFUN(cfg_bts_type,
       cfg_bts_type_cmd,
       "type TYPE",
-      "Set the BTS type\n")
+      "Set the BTS type\n" "Type\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int rc;
@@ -1371,7 +1393,7 @@
 DEFUN(cfg_bts_band,
       cfg_bts_band_cmd,
       "band BAND",
-      "Set the frequency band of this BTS\n")
+      "Set the frequency band of this BTS\n" "Frequency band\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int band = gsm_band_parse(argv[0]);