Change in osmo-bsc[master]: vty: add attributes to VTY commands indicating when they apply

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Aug 16 10:12:17 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/19670 )


Change subject: vty: add attributes to VTY commands indicating when they apply
......................................................................

vty: add attributes to VTY commands indicating when they apply

Change-Id: I3bf9223295fc4a2fcb4046a1f29f792ff6a41d51
Depends: I2c6c7b317b2b28ce70784c0cabd1b913e721be02
Related: SYS#4937
---
M include/osmocom/bsc/vty.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/osmo_bsc_main.c
3 files changed, 700 insertions(+), 533 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/70/19670/1

diff --git a/include/osmocom/bsc/vty.h b/include/osmocom/bsc/vty.h
index 10ce16b..62a1785 100644
--- a/include/osmocom/bsc/vty.h
+++ b/include/osmocom/bsc/vty.h
@@ -33,4 +33,12 @@
 
 struct gsm_network *gsmnet_from_vty(struct vty *vty);
 
+enum bsc_vty_cmd_attr {
+	BSC_VTY_ATTR_RESTART_FULL = 0,
+	BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+};
+
+extern const struct value_string bsc_vty_cmd_attr_desc[];
+
 #endif
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index fc7dd16..66adf84 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -161,6 +161,25 @@
 	1,
 };
 
+const struct value_string bsc_vty_cmd_attr_desc[] = {
+	{
+		BSC_VTY_ATTR_RESTART_FULL,
+		"This command applies on full program restart"
+	},
+	{
+		BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+		"This command applies on A-bis OML link (re)establishment"
+	},
+	{
+		BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+		"This command applies on A-bis RSL link (re)establishment"
+	},
+	{
+		/* Value-string terminator */
+		0, NULL
+	}
+};
+
 static struct gsm_network *vty_global_gsm_network = NULL;
 
 struct gsm_network *gsmnet_from_vty(struct vty *v)
@@ -2042,11 +2061,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_neci,
-      cfg_net_neci_cmd,
-      "neci (0|1)",
-	"New Establish Cause Indication\n"
-	"Don't set the NECI bit\n" "Set the NECI bit\n")
+DEFUN_USRATTR(cfg_net_neci,
+	      cfg_net_neci_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "neci (0|1)",
+	      "New Establish Cause Indication\n"
+	      "Don't set the NECI bit\n" "Set the NECI bit\n")
 {
 	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
 
@@ -2055,13 +2075,14 @@
 	return CMD_SUCCESS;
 }
 
-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\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")
+DEFUN_USRATTR(cfg_net_pag_any_tch,
+	      cfg_net_pag_any_tch_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "paging any use tch (0|1)",
+	      "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]);
@@ -2173,10 +2194,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_type,
-      cfg_bts_type_cmd,
-      "type TYPE", /* dynamically created */
-      "Set the BTS type\n" "Type\n")
+DEFUN_USRATTR(cfg_bts_type,
+	      cfg_bts_type_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "type TYPE", /* dynamically created */
+	      "Set the BTS type\n" "Type\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int rc;
@@ -2188,10 +2210,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_band,
-      cfg_bts_band_cmd,
-      "band BAND",
-      "Set the frequency band of this BTS\n" "Frequency band\n")
+DEFUN_USRATTR(cfg_bts_band,
+	      cfg_bts_band_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "band BAND",
+	      "Set the frequency band of this BTS\n" "Frequency band\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int band = gsm_band_parse(argv[0]);
@@ -2207,11 +2230,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_dtxu, cfg_bts_dtxu_cmd, "dtx uplink [force]",
-      "Configure discontinuous transmission\n"
-      "Enable Uplink DTX for this BTS\n"
-      "MS 'shall' use DTXu instead of 'may' use (might not be supported by "
-      "older phones).\n")
+DEFUN_USRATTR(cfg_bts_dtxu,
+	      cfg_bts_dtxu_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "dtx uplink [force]",
+	      "Configure discontinuous transmission\n"
+	      "Enable Uplink DTX for this BTS\n"
+	      "MS 'shall' use DTXu instead of 'may' use (might not be supported by "
+	      "older phones).\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2222,10 +2248,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_no_dtxu, cfg_bts_no_dtxu_cmd, "no dtx uplink",
-      NO_STR
-      "Configure discontinuous transmission\n"
-      "Disable Uplink DTX for this BTS\n")
+DEFUN_USRATTR(cfg_bts_no_dtxu,
+	      cfg_bts_no_dtxu_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "no dtx uplink",
+	      NO_STR "Configure discontinuous transmission\n"
+	      "Disable Uplink DTX for this BTS\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2234,9 +2262,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_dtxd, cfg_bts_dtxd_cmd, "dtx downlink",
-      "Configure discontinuous transmission\n"
-      "Enable Downlink DTX for this BTS\n")
+DEFUN_USRATTR(cfg_bts_dtxd,
+	      cfg_bts_dtxd_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "dtx downlink",
+	      "Configure discontinuous transmission\n"
+	      "Enable Downlink DTX for this BTS\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2247,10 +2278,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_no_dtxd, cfg_bts_no_dtxd_cmd, "no dtx downlink",
-      NO_STR
-      "Configure discontinuous transmission\n"
-      "Disable Downlink DTX for this BTS\n")
+DEFUN_USRATTR(cfg_bts_no_dtxd,
+	      cfg_bts_no_dtxd_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "no dtx downlink",
+	      NO_STR, "Configure discontinuous transmission\n"
+	      "Disable Downlink DTX for this BTS\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2259,10 +2292,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_ci,
-      cfg_bts_ci_cmd,
-      "cell_identity <0-65535>",
-      "Set the Cell identity of this BTS\n" "Cell Identity\n")
+DEFUN_USRATTR(cfg_bts_ci,
+	      cfg_bts_ci_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "cell_identity <0-65535>",
+	      "Set the Cell identity of this BTS\n" "Cell Identity\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int ci = atoi(argv[0]);
@@ -2277,10 +2311,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_lac,
-      cfg_bts_lac_cmd,
-      "location_area_code <0-65535>",
-      "Set the Location Area Code (LAC) of this BTS\n" "LAC\n")
+DEFUN_USRATTR(cfg_bts_lac,
+	      cfg_bts_lac_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "location_area_code <0-65535>",
+	      "Set the Location Area Code (LAC) of this BTS\n" "LAC\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int lac = atoi(argv[0]);
@@ -2312,11 +2347,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_bsic,
-      cfg_bts_bsic_cmd,
-      "base_station_id_code <0-63>",
-      "Set the Base Station Identity Code (BSIC) of this BTS\n"
-      "BSIC of this BTS\n")
+DEFUN_USRATTR(cfg_bts_bsic,
+	      cfg_bts_bsic_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "base_station_id_code <0-63>",
+	      "Set the Base Station Identity Code (BSIC) of this BTS\n"
+	      "BSIC of this BTS\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int bsic = atoi(argv[0]);
@@ -2331,13 +2367,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_unit_id,
-      cfg_bts_unit_id_cmd,
-      "ipa unit-id <0-65534> <0-255>",
-      "Abis/IP specific options\n"
-      "Set the IPA BTS Unit ID\n"
-      "Unit ID (Site)\n"
-      "Unit ID (BTS)\n")
+DEFUN_USRATTR(cfg_bts_unit_id,
+	      cfg_bts_unit_id_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "ipa unit-id <0-65534> <0-255>",
+	      "Abis/IP specific options\n"
+	      "Set the IPA BTS Unit ID\n"
+	      "Unit ID (Site)\n"
+	      "Unit ID (BTS)\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int site_id = atoi(argv[0]);
@@ -2362,12 +2399,13 @@
       "Unit ID (Site)\n"
       "Unit ID (BTS)\n");
 
-DEFUN(cfg_bts_rsl_ip,
-      cfg_bts_rsl_ip_cmd,
-      "ipa rsl-ip A.B.C.D",
-      "Abis/IP specific options\n"
-      "Set the IPA RSL IP Address of the BSC\n"
-      "Destination IP address for RSL connection\n")
+DEFUN_USRATTR(cfg_bts_rsl_ip,
+	      cfg_bts_rsl_ip_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "ipa rsl-ip A.B.C.D",
+	      "Abis/IP specific options\n"
+	      "Set the IPA RSL IP Address of the BSC\n"
+	      "Destination IP address for RSL connection\n")
 {
 	struct gsm_bts *bts = vty->index;
 	struct in_addr ia;
@@ -2453,12 +2491,13 @@
 #define OML_STR	"Organization & Maintenance Link\n"
 #define IPA_STR "A-bis/IP Specific Options\n"
 
-DEFUN(cfg_bts_stream_id,
-      cfg_bts_stream_id_cmd,
-      "oml ipa stream-id <0-255> line E1_LINE",
-	OML_STR IPA_STR
-      "Set the ipa Stream ID of the OML link of this BTS\n"
-      "Stream Identifier\n" "Virtual E1 Line Number\n" "Virtual E1 Line Number\n")
+DEFUN_USRATTR(cfg_bts_stream_id,
+	      cfg_bts_stream_id_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "oml ipa stream-id <0-255> line E1_LINE",
+	      OML_STR IPA_STR
+	      "Set the ipa Stream ID of the OML link of this BTS\n" "Stream Identifier\n"
+	      "Virtual E1 Line Number\n" "Virtual E1 Line Number\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int stream_id = atoi(argv[0]), linenr = atoi(argv[1]);
@@ -2484,21 +2523,20 @@
 
 #define OML_E1_STR OML_STR "OML E1/T1 Configuration\n"
 
-DEFUN(cfg_bts_oml_e1,
-      cfg_bts_oml_e1_cmd,
-      "oml e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
-	OML_E1_STR
-      "E1/T1 line number to be used for OML\n"
-      "E1/T1 line number to be used for OML\n"
-      "E1/T1 timeslot to be used for OML\n"
-      "E1/T1 timeslot to be used for OML\n"
-      "E1/T1 sub-slot to be used for OML\n"
-      "Use E1/T1 sub-slot 0\n"
-      "Use E1/T1 sub-slot 1\n"
-      "Use E1/T1 sub-slot 2\n"
-      "Use E1/T1 sub-slot 3\n"
-      "Use full E1 slot 3\n"
-      )
+DEFUN_DEPRECATED(cfg_bts_oml_e1, cfg_bts_oml_e1_cmd,
+		 BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+		 "oml e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
+		 OML_E1_STR
+		 "E1/T1 line number to be used for OML\n"
+		 "E1/T1 line number to be used for OML\n"
+		 "E1/T1 timeslot to be used for OML\n"
+		 "E1/T1 timeslot to be used for OML\n"
+		 "E1/T1 sub-slot to be used for OML\n"
+		 "Use E1/T1 sub-slot 0\n"
+		 "Use E1/T1 sub-slot 1\n"
+		 "Use E1/T1 sub-slot 2\n"
+		 "Use E1/T1 sub-slot 3\n"
+		 "Use full E1 slot 3\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2508,12 +2546,13 @@
 }
 
 
-DEFUN(cfg_bts_oml_e1_tei,
-      cfg_bts_oml_e1_tei_cmd,
-      "oml e1 tei <0-63>",
-	OML_E1_STR
-      "Set the TEI to be used for OML\n"
-      "TEI Number\n")
+DEFUN_USRATTR(cfg_bts_oml_e1_tei,
+	      cfg_bts_oml_e1_tei_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "oml e1 tei <0-63>",
+	      OML_E1_STR
+	      "Set the TEI to be used for OML\n"
+	      "TEI Number\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2540,29 +2579,31 @@
 
 #define RACH_STR "Random Access Control Channel\n"
 
-DEFUN(cfg_bts_rach_tx_integer,
-      cfg_bts_rach_tx_integer_cmd,
-      "rach tx integer <0-15>",
-	RACH_STR
-      "Set the raw tx integer value in RACH Control parameters IE\n"
-      "Set the raw tx integer value in RACH Control parameters IE\n"
-      "Raw tx integer value in RACH Control parameters IE\n")
+DEFUN_USRATTR(cfg_bts_rach_tx_integer,
+	      cfg_bts_rach_tx_integer_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "rach tx integer <0-15>",
+	      RACH_STR
+	      "Set the raw tx integer value in RACH Control parameters IE\n"
+	      "Set the raw tx integer value in RACH Control parameters IE\n"
+	      "Raw tx integer value in RACH Control parameters IE\n")
 {
 	struct gsm_bts *bts = vty->index;
 	bts->si_common.rach_control.tx_integer = atoi(argv[0]) & 0xf;
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_rach_max_trans,
-      cfg_bts_rach_max_trans_cmd,
-      "rach max transmission (1|2|4|7)",
-	RACH_STR
-      "Set the maximum number of RACH burst transmissions\n"
-      "Set the maximum number of RACH burst transmissions\n"
-      "Maximum number of 1 RACH burst transmissions\n"
-      "Maximum number of 2 RACH burst transmissions\n"
-      "Maximum number of 4 RACH burst transmissions\n"
-      "Maximum number of 7 RACH burst transmissions\n")
+DEFUN_USRATTR(cfg_bts_rach_max_trans,
+	      cfg_bts_rach_max_trans_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "rach max transmission (1|2|4|7)",
+	      RACH_STR
+	      "Set the maximum number of RACH burst transmissions\n"
+	      "Set the maximum number of RACH burst transmissions\n"
+	      "Maximum number of 1 RACH burst transmissions\n"
+	      "Maximum number of 2 RACH burst transmissions\n"
+	      "Maximum number of 4 RACH burst transmissions\n"
+	      "Maximum number of 7 RACH burst transmissions\n")
 {
 	struct gsm_bts *bts = vty->index;
 	bts->si_common.rach_control.max_trans = rach_max_trans_val2raw(atoi(argv[0]));
@@ -2571,13 +2612,14 @@
 
 #define CD_STR "Channel Description\n"
 
-DEFUN(cfg_bts_chan_desc_att,
-      cfg_bts_chan_desc_att_cmd,
-      "channel-description attach (0|1)",
-	CD_STR
-      "Set if attachment is required\n"
-      "Attachment is NOT required\n"
-      "Attachment is required (standard)\n")
+DEFUN_USRATTR(cfg_bts_chan_desc_att,
+	      cfg_bts_chan_desc_att_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "channel-description attach (0|1)",
+	      CD_STR
+	      "Set if attachment is required\n"
+	      "Attachment is NOT required\n"
+	      "Attachment is required (standard)\n")
 {
 	struct gsm_bts *bts = vty->index;
 	bts->si_common.chan_desc.att = atoi(argv[0]);
@@ -2591,12 +2633,13 @@
 		 "Attachment is NOT required\n"
 		 "Attachment is required (standard)\n");
 
-DEFUN(cfg_bts_chan_desc_bs_pa_mfrms,
-      cfg_bts_chan_desc_bs_pa_mfrms_cmd,
-      "channel-description bs-pa-mfrms <2-9>",
-	CD_STR
-      "Set number of multiframe periods for paging groups\n"
-      "Number of multiframe periods for paging groups\n")
+DEFUN_USRATTR(cfg_bts_chan_desc_bs_pa_mfrms,
+	      cfg_bts_chan_desc_bs_pa_mfrms_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "channel-description bs-pa-mfrms <2-9>",
+	      CD_STR
+	      "Set number of multiframe periods for paging groups\n"
+	      "Number of multiframe periods for paging groups\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int bs_pa_mfrms = atoi(argv[0]);
@@ -2611,12 +2654,13 @@
 		 "Set number of multiframe periods for paging groups\n"
 		 "Number of multiframe periods for paging groups\n");
 
-DEFUN(cfg_bts_chan_desc_bs_ag_blks_res,
-      cfg_bts_chan_desc_bs_ag_blks_res_cmd,
-      "channel-description bs-ag-blks-res <0-7>",
-	CD_STR
-      "Set number of blocks reserved for access grant\n"
-      "Number of blocks reserved for access grant\n")
+DEFUN_USRATTR(cfg_bts_chan_desc_bs_ag_blks_res,
+	      cfg_bts_chan_desc_bs_ag_blks_res_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "channel-description bs-ag-blks-res <0-7>",
+	      CD_STR
+	      "Set number of blocks reserved for access grant\n"
+	      "Number of blocks reserved for access grant\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int bs_ag_blks_res = atoi(argv[0]);
@@ -2633,12 +2677,13 @@
 
 #define CCCH_STR "Common Control Channel\n"
 
-DEFUN(cfg_bts_ccch_load_ind_thresh,
-      cfg_bts_ccch_load_ind_thresh_cmd,
-      "ccch load-indication-threshold <0-100>",
-	CCCH_STR
-      "Percentage of CCCH load at which BTS sends RSL CCCH LOAD IND\n"
-      "CCCH Load Threshold in percent (Default: 10)\n")
+DEFUN_USRATTR(cfg_bts_ccch_load_ind_thresh,
+	      cfg_bts_ccch_load_ind_thresh_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "ccch load-indication-threshold <0-100>",
+	      CCCH_STR
+	      "Percentage of CCCH load at which BTS sends RSL CCCH LOAD IND\n"
+	      "CCCH Load Threshold in percent (Default: 10)\n")
 {
 	struct gsm_bts *bts = vty->index;
 	bts->ccch_load_ind_thresh = atoi(argv[0]);
@@ -2647,38 +2692,42 @@
 
 #define NM_STR "Network Management\n"
 
-DEFUN(cfg_bts_rach_nm_b_thresh,
-      cfg_bts_rach_nm_b_thresh_cmd,
-      "rach nm busy threshold <0-255>",
-	RACH_STR NM_STR
-      "Set the NM Busy Threshold\n"
-      "Set the NM Busy Threshold\n"
-      "NM Busy Threshold in dB\n")
+DEFUN_USRATTR(cfg_bts_rach_nm_b_thresh,
+	      cfg_bts_rach_nm_b_thresh_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "rach nm busy threshold <0-255>",
+	      RACH_STR NM_STR
+	      "Set the NM Busy Threshold\n"
+	      "Set the NM Busy Threshold\n"
+	      "NM Busy Threshold in dB\n")
 {
 	struct gsm_bts *bts = vty->index;
 	bts->rach_b_thresh = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_rach_nm_ldavg,
-      cfg_bts_rach_nm_ldavg_cmd,
-      "rach nm load average <0-65535>",
-	RACH_STR NM_STR
-      "Set the NM Loadaverage Slots value\n"
-      "Set the NM Loadaverage Slots value\n"
-      "NM Loadaverage Slots value\n")
+DEFUN_USRATTR(cfg_bts_rach_nm_ldavg,
+	      cfg_bts_rach_nm_ldavg_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "rach nm load average <0-65535>",
+	      RACH_STR NM_STR
+	      "Set the NM Loadaverage Slots value\n"
+	      "Set the NM Loadaverage Slots value\n"
+	      "NM Loadaverage Slots value\n")
 {
 	struct gsm_bts *bts = vty->index;
 	bts->rach_ldavg_slots = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_cell_barred, cfg_bts_cell_barred_cmd,
-      "cell barred (0|1)",
-      "Should this cell be barred from access?\n"
-      "Should this cell be barred from access?\n"
-      "Cell should NOT be barred\n"
-      "Cell should be barred\n")
+DEFUN_USRATTR(cfg_bts_cell_barred,
+	      cfg_bts_cell_barred_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "cell barred (0|1)",
+	      "Should this cell be barred from access?\n"
+	      "Should this cell be barred from access?\n"
+	      "Cell should NOT be barred\n"
+	      "Cell should be barred\n")
 
 {
 	struct gsm_bts *bts = vty->index;
@@ -2688,14 +2737,16 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_rach_ec_allowed, cfg_bts_rach_ec_allowed_cmd,
-      "rach emergency call allowed (0|1)",
-      RACH_STR
-      "Should this cell allow emergency calls?\n"
-      "Should this cell allow emergency calls?\n"
-      "Should this cell allow emergency calls?\n"
-      "Do NOT allow emergency calls\n"
-      "Allow emergency calls\n")
+DEFUN_USRATTR(cfg_bts_rach_ec_allowed,
+	      cfg_bts_rach_ec_allowed_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "rach emergency call allowed (0|1)",
+	      RACH_STR
+	      "Should this cell allow emergency calls?\n"
+	      "Should this cell allow emergency calls?\n"
+	      "Should this cell allow emergency calls?\n"
+	      "Do NOT allow emergency calls\n"
+	      "Allow emergency calls\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2707,27 +2758,29 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_rach_ac_class, cfg_bts_rach_ac_class_cmd,
-      "rach access-control-class (0|1|2|3|4|5|6|7|8|9|11|12|13|14|15) (barred|allowed)",
-      RACH_STR
-      "Set access control class\n"
-      "Access control class 0\n"
-      "Access control class 1\n"
-      "Access control class 2\n"
-      "Access control class 3\n"
-      "Access control class 4\n"
-      "Access control class 5\n"
-      "Access control class 6\n"
-      "Access control class 7\n"
-      "Access control class 8\n"
-      "Access control class 9\n"
-      "Access control class 11 for PLMN use\n"
-      "Access control class 12 for security services\n"
-      "Access control class 13 for public utilities (e.g. water/gas suppliers)\n"
-      "Access control class 14 for emergency services\n"
-      "Access control class 15 for PLMN staff\n"
-      "barred to use access control class\n"
-      "allowed to use access control class\n")
+DEFUN_USRATTR(cfg_bts_rach_ac_class,
+	      cfg_bts_rach_ac_class_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "rach access-control-class (0|1|2|3|4|5|6|7|8|9|11|12|13|14|15) (barred|allowed)",
+	      RACH_STR
+	      "Set access control class\n"
+	      "Access control class 0\n"
+	      "Access control class 1\n"
+	      "Access control class 2\n"
+	      "Access control class 3\n"
+	      "Access control class 4\n"
+	      "Access control class 5\n"
+	      "Access control class 6\n"
+	      "Access control class 7\n"
+	      "Access control class 8\n"
+	      "Access control class 9\n"
+	      "Access control class 11 for PLMN use\n"
+	      "Access control class 12 for security services\n"
+	      "Access control class 13 for public utilities (e.g. water/gas suppliers)\n"
+	      "Access control class 14 for emergency services\n"
+	      "Access control class 15 for PLMN staff\n"
+	      "barred to use access control class\n"
+	      "allowed to use access control class\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2771,11 +2824,13 @@
 
 #define CELL_STR "Cell Parameters\n"
 
-DEFUN(cfg_bts_cell_resel_hyst, cfg_bts_cell_resel_hyst_cmd,
-      "cell reselection hysteresis <0-14>",
-      CELL_STR "Cell re-selection parameters\n"
-      "Cell Re-Selection Hysteresis in dB\n"
-      "Cell Re-Selection Hysteresis in dB\n")
+DEFUN_USRATTR(cfg_bts_cell_resel_hyst,
+	      cfg_bts_cell_resel_hyst_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "cell reselection hysteresis <0-14>",
+	      CELL_STR "Cell re-selection parameters\n"
+	      "Cell Re-Selection Hysteresis in dB\n"
+	      "Cell Re-Selection Hysteresis in dB\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2784,12 +2839,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_rxlev_acc_min, cfg_bts_rxlev_acc_min_cmd,
-      "rxlev access min <0-63>",
-      "Minimum RxLev needed for cell access\n"
-      "Minimum RxLev needed for cell access\n"
-      "Minimum RxLev needed for cell access\n"
-      "Minimum RxLev needed for cell access (better than -110dBm)\n")
+DEFUN_USRATTR(cfg_bts_rxlev_acc_min,
+	      cfg_bts_rxlev_acc_min_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "rxlev access min <0-63>",
+	      "Minimum RxLev needed for cell access\n"
+	      "Minimum RxLev needed for cell access\n"
+	      "Minimum RxLev needed for cell access\n"
+	      "Minimum RxLev needed for cell access (better than -110dBm)\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2798,10 +2855,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_cell_bar_qualify, cfg_bts_cell_bar_qualify_cmd,
-	"cell bar qualify (0|1)",
-	CELL_STR "Cell Bar Qualify\n" "Cell Bar Qualify\n"
-	"Set CBQ to 0\n" "Set CBQ to 1\n")
+DEFUN_USRATTR(cfg_bts_cell_bar_qualify,
+	      cfg_bts_cell_bar_qualify_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "cell bar qualify (0|1)",
+	      CELL_STR "Cell Bar Qualify\n" "Cell Bar Qualify\n"
+	      "Set CBQ to 0\n" "Set CBQ to 1\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2811,12 +2870,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_cell_resel_ofs, cfg_bts_cell_resel_ofs_cmd,
-	"cell reselection offset <0-126>",
-	CELL_STR "Cell Re-Selection Parameters\n"
-	"Cell Re-Selection Offset (CRO) in dB\n"
-	"Cell Re-Selection Offset (CRO) in dB\n"
-	)
+DEFUN_USRATTR(cfg_bts_cell_resel_ofs,
+	      cfg_bts_cell_resel_ofs_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "cell reselection offset <0-126>",
+	      CELL_STR "Cell Re-Selection Parameters\n"
+	      "Cell Re-Selection Offset (CRO) in dB\n"
+	      "Cell Re-Selection Offset (CRO) in dB\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2826,11 +2886,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_temp_ofs, cfg_bts_temp_ofs_cmd,
-	"temporary offset <0-60>",
-	"Cell selection temporary negative offset\n"
-	"Cell selection temporary negative offset\n"
-	"Cell selection temporary negative offset in dB\n")
+DEFUN_USRATTR(cfg_bts_temp_ofs,
+	      cfg_bts_temp_ofs_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "temporary offset <0-60>",
+	      "Cell selection temporary negative offset\n"
+	      "Cell selection temporary negative offset\n"
+	      "Cell selection temporary negative offset in dB\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2840,11 +2902,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_temp_ofs_inf, cfg_bts_temp_ofs_inf_cmd,
-	"temporary offset infinite",
-	"Cell selection temporary negative offset\n"
-	"Cell selection temporary negative offset\n"
-	"Sets cell selection temporary negative offset to infinity\n")
+DEFUN_USRATTR(cfg_bts_temp_ofs_inf,
+	      cfg_bts_temp_ofs_inf_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "temporary offset infinite",
+	      "Cell selection temporary negative offset\n"
+	      "Cell selection temporary negative offset\n"
+	      "Sets cell selection temporary negative offset to infinity\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2854,11 +2918,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_penalty_time, cfg_bts_penalty_time_cmd,
-	"penalty time <20-620>",
-	"Cell selection penalty time\n"
-	"Cell selection penalty time\n"
-	"Cell selection penalty time in seconds (by 20s increments)\n")
+DEFUN_USRATTR(cfg_bts_penalty_time,
+	      cfg_bts_penalty_time_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "penalty time <20-620>",
+	      "Cell selection penalty time\n"
+	      "Cell selection penalty time\n"
+	      "Cell selection penalty time in seconds (by 20s increments)\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2868,13 +2934,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_penalty_time_rsvd, cfg_bts_penalty_time_rsvd_cmd,
-	"penalty time reserved",
-	"Cell selection penalty time\n"
-	"Cell selection penalty time\n"
-	"Set cell selection penalty time to reserved value 31, "
-		"(indicate that CELL_RESELECT_OFFSET is subtracted from C2 "
-		"and TEMPORARY_OFFSET is ignored)\n")
+DEFUN_USRATTR(cfg_bts_penalty_time_rsvd,
+	      cfg_bts_penalty_time_rsvd_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "penalty time reserved",
+	      "Cell selection penalty time\n"
+	      "Cell selection penalty time\n"
+	      "Set cell selection penalty time to reserved value 31, "
+		    "(indicate that CELL_RESELECT_OFFSET is subtracted from C2 "
+		    "and TEMPORARY_OFFSET is ignored)\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2884,10 +2952,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_radio_link_timeout, cfg_bts_radio_link_timeout_cmd,
-	"radio-link-timeout <4-64>",
-	"Radio link timeout criterion (BTS side)\n"
-	"Radio link timeout value (lost SACCH block)\n")
+DEFUN_USRATTR(cfg_bts_radio_link_timeout,
+	      cfg_bts_radio_link_timeout_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "radio-link-timeout <4-64>",
+	      "Radio link timeout criterion (BTS side)\n"
+	      "Radio link timeout value (lost SACCH block)\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2896,10 +2966,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_radio_link_timeout_inf, cfg_bts_radio_link_timeout_inf_cmd,
-	"radio-link-timeout infinite",
-	"Radio link timeout criterion (BTS side)\n"
-	"Infinite Radio link timeout value (use only for BTS RF testing)\n")
+DEFUN_USRATTR(cfg_bts_radio_link_timeout_inf,
+	      cfg_bts_radio_link_timeout_inf_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "radio-link-timeout infinite",
+	      "Radio link timeout criterion (BTS side)\n"
+	      "Infinite Radio link timeout value (use only for BTS RF testing)\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2925,12 +2997,14 @@
 		} \
 	} while (0)
 
-DEFUN(cfg_bts_prs_bvci, cfg_bts_gprs_bvci_cmd,
-	"gprs cell bvci <2-65535>",
-	GPRS_TEXT
-	"GPRS Cell Settings\n"
-	"GPRS BSSGP VC Identifier\n"
-	"GPRS BSSGP VC Identifier\n")
+DEFUN_USRATTR(cfg_bts_prs_bvci,
+	      cfg_bts_gprs_bvci_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs cell bvci <2-65535>",
+	      GPRS_TEXT
+	      "GPRS Cell Settings\n"
+	      "GPRS BSSGP VC Identifier\n"
+	      "GPRS BSSGP VC Identifier\n")
 {
 	/* ETSI TS 101 343: values 0 and 1 are reserved for signalling and PTM */
 	struct gsm_bts *bts = vty->index;
@@ -2942,11 +3016,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_nsei, cfg_bts_gprs_nsei_cmd,
-	"gprs nsei <0-65535>",
-	GPRS_TEXT
-	"GPRS NS Entity Identifier\n"
-	"GPRS NS Entity Identifier\n")
+DEFUN_USRATTR(cfg_bts_gprs_nsei,
+	      cfg_bts_gprs_nsei_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs nsei <0-65535>",
+	      GPRS_TEXT
+	      "GPRS NS Entity Identifier\n"
+	      "GPRS NS Entity Identifier\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -2960,11 +3036,13 @@
 #define NSVC_TEXT "Network Service Virtual Connection (NS-VC)\n" \
 		"NSVC Logical Number\n"
 
-DEFUN(cfg_bts_gprs_nsvci, cfg_bts_gprs_nsvci_cmd,
-	"gprs nsvc <0-1> nsvci <0-65535>",
-	GPRS_TEXT NSVC_TEXT
-	"NS Virtual Connection Identifier\n"
-	"GPRS NS VC Identifier\n")
+DEFUN_USRATTR(cfg_bts_gprs_nsvci,
+	      cfg_bts_gprs_nsvci_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs nsvc <0-1> nsvci <0-65535>",
+	      GPRS_TEXT NSVC_TEXT
+	      "NS Virtual Connection Identifier\n"
+	      "GPRS NS VC Identifier\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int idx = atoi(argv[0]);
@@ -2976,13 +3054,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_nsvc_lport, cfg_bts_gprs_nsvc_lport_cmd,
-	"gprs nsvc <0-1> local udp port <0-65535>",
-	GPRS_TEXT NSVC_TEXT
-	"GPRS NS Local UDP Port\n"
-	"GPRS NS Local UDP Port\n"
-	"GPRS NS Local UDP Port\n"
-	"GPRS NS Local UDP Port Number\n")
+DEFUN_USRATTR(cfg_bts_gprs_nsvc_lport,
+	      cfg_bts_gprs_nsvc_lport_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs nsvc <0-1> local udp port <0-65535>",
+	      GPRS_TEXT NSVC_TEXT
+	      "GPRS NS Local UDP Port\n"
+	      "GPRS NS Local UDP Port\n"
+	      "GPRS NS Local UDP Port\n"
+	      "GPRS NS Local UDP Port Number\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int idx = atoi(argv[0]);
@@ -2994,13 +3074,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_nsvc_rport, cfg_bts_gprs_nsvc_rport_cmd,
-	"gprs nsvc <0-1> remote udp port <0-65535>",
-	GPRS_TEXT NSVC_TEXT
-	"GPRS NS Remote UDP Port\n"
-	"GPRS NS Remote UDP Port\n"
-	"GPRS NS Remote UDP Port\n"
-	"GPRS NS Remote UDP Port Number\n")
+DEFUN_USRATTR(cfg_bts_gprs_nsvc_rport,
+	      cfg_bts_gprs_nsvc_rport_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs nsvc <0-1> remote udp port <0-65535>",
+	      GPRS_TEXT NSVC_TEXT
+	      "GPRS NS Remote UDP Port\n"
+	      "GPRS NS Remote UDP Port\n"
+	      "GPRS NS Remote UDP Port\n"
+	      "GPRS NS Remote UDP Port Number\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int idx = atoi(argv[0]);
@@ -3012,12 +3094,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_nsvc_rip, cfg_bts_gprs_nsvc_rip_cmd,
-	"gprs nsvc <0-1> remote ip A.B.C.D",
-	GPRS_TEXT NSVC_TEXT
-	"GPRS NS Remote IP Address\n"
-	"GPRS NS Remote IP Address\n"
-	"GPRS NS Remote IP Address\n")
+DEFUN_USRATTR(cfg_bts_gprs_nsvc_rip,
+	      cfg_bts_gprs_nsvc_rip_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs nsvc <0-1> remote ip A.B.C.D",
+	      GPRS_TEXT NSVC_TEXT
+	      "GPRS NS Remote IP Address\n"
+	      "GPRS NS Remote IP Address\n"
+	      "GPRS NS Remote IP Address\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int idx = atoi(argv[0]);
@@ -3043,11 +3127,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_ns_timer, cfg_bts_gprs_ns_timer_cmd,
-	"gprs ns timer " NS_TIMERS " <0-255>",
-	GPRS_TEXT "Network Service\n"
-	"Network Service Timer\n"
-	NS_TIMERS_HELP "Timer Value\n")
+DEFUN_USRATTR(cfg_bts_gprs_ns_timer,
+	      cfg_bts_gprs_ns_timer_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs ns timer " NS_TIMERS " <0-255>",
+	      GPRS_TEXT "Network Service\n"
+	      "Network Service Timer\n"
+	      NS_TIMERS_HELP "Timer Value\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int idx = get_string_value(gprs_ns_timer_strs, argv[0]);
@@ -3077,11 +3163,13 @@
 	"Tbvc-capa-update timeout\n"		\
 	"Tbvc-capa-update retries\n"
 
-DEFUN(cfg_bts_gprs_cell_timer, cfg_bts_gprs_cell_timer_cmd,
-	"gprs cell timer " BSSGP_TIMERS " <0-255>",
-	GPRS_TEXT "Cell / BSSGP\n"
-	"Cell/BSSGP Timer\n"
-	BSSGP_TIMERS_HELP "Timer Value\n")
+DEFUN_USRATTR(cfg_bts_gprs_cell_timer,
+	      cfg_bts_gprs_cell_timer_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs cell timer " BSSGP_TIMERS " <0-255>",
+	      GPRS_TEXT "Cell / BSSGP\n"
+	      "Cell/BSSGP Timer\n"
+	      BSSGP_TIMERS_HELP "Timer Value\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int idx = get_string_value(gprs_bssgp_cfg_strs, argv[0]);
@@ -3097,12 +3185,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_rac, cfg_bts_gprs_rac_cmd,
-	"gprs routing area <0-255>",
-	GPRS_TEXT
-	"GPRS Routing Area Code\n"
-	"GPRS Routing Area Code\n"
-	"GPRS Routing Area Code\n")
+DEFUN_USRATTR(cfg_bts_gprs_rac,
+	      cfg_bts_gprs_rac_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs routing area <0-255>",
+	      GPRS_TEXT
+	      "GPRS Routing Area Code\n"
+	      "GPRS Routing Area Code\n"
+	      "GPRS Routing Area Code\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3113,10 +3203,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_ctrl_ack, cfg_bts_gprs_ctrl_ack_cmd,
-	"gprs control-ack-type-rach", GPRS_TEXT
-	"Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
-	"four access bursts format instead of default RLC/MAC control block\n")
+DEFUN_USRATTR(cfg_bts_gprs_ctrl_ack,
+	      cfg_bts_gprs_ctrl_ack_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "gprs control-ack-type-rach",
+	      GPRS_TEXT
+	      "Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
+	      "four access bursts format instead of default RLC/MAC control block\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3127,10 +3220,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_no_bts_gprs_ctrl_ack, cfg_no_bts_gprs_ctrl_ack_cmd,
-	"no gprs control-ack-type-rach", NO_STR GPRS_TEXT
-	"Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
-	"default RLC/MAC control block\n")
+DEFUN_USRATTR(cfg_no_bts_gprs_ctrl_ack,
+	      cfg_no_bts_gprs_ctrl_ack_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "no gprs control-ack-type-rach",
+	      NO_STR GPRS_TEXT
+	      "Set GPRS Control Ack Type for PACKET CONTROL ACKNOWLEDGMENT message to "
+	      "default RLC/MAC control block\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3141,13 +3237,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_net_ctrl_ord, cfg_bts_gprs_net_ctrl_ord_cmd,
-	"gprs network-control-order (nc0|nc1|nc2)",
-	GPRS_TEXT
-	"GPRS Network Control Order\n"
-	"MS controlled cell re-selection, no measurement reporting\n"
-	"MS controlled cell re-selection, MS sends measurement reports\n"
-	"Network controlled cell re-selection, MS sends measurement reports\n")
+DEFUN_USRATTR(cfg_bts_gprs_net_ctrl_ord,
+	      cfg_bts_gprs_net_ctrl_ord_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "gprs network-control-order (nc0|nc1|nc2)",
+	      GPRS_TEXT
+	      "GPRS Network Control Order\n"
+	      "MS controlled cell re-selection, no measurement reporting\n"
+	      "MS controlled cell re-selection, MS sends measurement reports\n"
+	      "Network controlled cell re-selection, MS sends measurement reports\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3158,13 +3256,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_mode, cfg_bts_gprs_mode_cmd,
-	"gprs mode (none|gprs|egprs)",
-	GPRS_TEXT
-	"GPRS Mode for this BTS\n"
-	"GPRS Disabled on this BTS\n"
-	"GPRS Enabled on this BTS\n"
-	"EGPRS (EDGE) Enabled on this BTS\n")
+DEFUN_USRATTR(cfg_bts_gprs_mode,
+	      cfg_bts_gprs_mode_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "gprs mode (none|gprs|egprs)",
+	      GPRS_TEXT
+	      "GPRS Mode for this BTS\n"
+	      "GPRS Disabled on this BTS\n"
+	      "GPRS Enabled on this BTS\n"
+	      "EGPRS (EDGE) Enabled on this BTS\n")
 {
 	struct gsm_bts *bts = vty->index;
 	enum bts_gprs_mode mode = bts_gprs_mode_parse(argv[0], NULL);
@@ -3208,10 +3308,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_gprs_egprs_pkt_chan_req,
-      cfg_bts_gprs_egprs_pkt_chan_req_cmd,
-      "gprs egprs-packet-channel-request",
-      GPRS_TEXT "EGPRS Packet Channel Request support")
+DEFUN_USRATTR(cfg_bts_gprs_egprs_pkt_chan_req,
+	      cfg_bts_gprs_egprs_pkt_chan_req_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "gprs egprs-packet-channel-request",
+	      GPRS_TEXT "EGPRS Packet Channel Request support")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3225,10 +3326,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_no_gprs_egprs_pkt_chan_req,
-      cfg_bts_no_gprs_egprs_pkt_chan_req_cmd,
-      "no gprs egprs-packet-channel-request",
-      NO_STR GPRS_TEXT "EGPRS Packet Channel Request support")
+DEFUN_USRATTR(cfg_bts_no_gprs_egprs_pkt_chan_req,
+	      cfg_bts_no_gprs_egprs_pkt_chan_req_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "no gprs egprs-packet-channel-request",
+	      NO_STR GPRS_TEXT "EGPRS Packet Channel Request support")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3266,12 +3368,14 @@
 			"System Information Type 5bis\n"	\
 			"System Information Type 5ter\n"
 
-DEFUN(cfg_bts_si_mode, cfg_bts_si_mode_cmd,
-	"system-information " SI_TYPE_TEXT " mode (static|computed)",
-	SI_TEXT SI_TYPE_HELP
-	"System Information Mode\n"
-	"Static user-specified\n"
-	"Dynamic, BSC-computed\n")
+DEFUN_USRATTR(cfg_bts_si_mode,
+	      cfg_bts_si_mode_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "system-information " SI_TYPE_TEXT " mode (static|computed)",
+	      SI_TEXT SI_TYPE_HELP
+	      "System Information Mode\n"
+	      "Static user-specified\n"
+	      "Dynamic, BSC-computed\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int type;
@@ -3290,11 +3394,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_si_static, cfg_bts_si_static_cmd,
-	"system-information " SI_TYPE_TEXT " static HEXSTRING",
-	SI_TEXT SI_TYPE_HELP
-	"Static System Information filling\n"
-	"Static user-specified SI content in HEX notation\n")
+DEFUN_USRATTR(cfg_bts_si_static,
+	      cfg_bts_si_static_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "system-information " SI_TYPE_TEXT " static HEXSTRING",
+	      SI_TEXT SI_TYPE_HELP
+	      "Static System Information filling\n"
+	      "Static user-specified SI content in HEX notation\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int rc, type;
@@ -3327,11 +3433,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_si_unused_send_empty, cfg_bts_si_unused_send_empty_cmd,
-	"system-information unused-send-empty",
-	SI_TEXT
-	"Send BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
-	"Some nanoBTS fw versions are known to fail upon receival of these messages.\n")
+DEFUN_USRATTR(cfg_bts_si_unused_send_empty,
+	      cfg_bts_si_unused_send_empty_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "system-information unused-send-empty",
+	      SI_TEXT
+	      "Send BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
+	      "Some nanoBTS fw versions are known to fail upon receival of these messages.\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3340,11 +3448,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_no_si_unused_send_empty, cfg_bts_no_si_unused_send_empty_cmd,
-	"no system-information unused-send-empty",
-	NO_STR SI_TEXT
-	"Avoid sending BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
-	"Some nanoBTS fw versions are known to fail upon receival of these messages.\n")
+DEFUN_USRATTR(cfg_bts_no_si_unused_send_empty,
+	      cfg_bts_no_si_unused_send_empty_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "no system-information unused-send-empty",
+	      NO_STR SI_TEXT
+	      "Avoid sending BCCH Info with empty 'Full BCCH Info' TLV to notify disabled SI. "
+	      "Some nanoBTS fw versions are known to fail upon receival of these messages.\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3359,11 +3469,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_early_cm, cfg_bts_early_cm_cmd,
-	"early-classmark-sending (allowed|forbidden)",
-	"Early Classmark Sending\n"
-	"Early Classmark Sending is allowed\n"
-	"Early Classmark Sending is forbidden\n")
+DEFUN_USRATTR(cfg_bts_early_cm,
+	      cfg_bts_early_cm_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "early-classmark-sending (allowed|forbidden)",
+	      "Early Classmark Sending\n"
+	      "Early Classmark Sending is allowed\n"
+	      "Early Classmark Sending is forbidden\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3375,11 +3487,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_early_cm_3g, cfg_bts_early_cm_3g_cmd,
-	"early-classmark-sending-3g (allowed|forbidden)",
-	"3G Early Classmark Sending\n"
-	"3G Early Classmark Sending is allowed\n"
-	"3G Early Classmark Sending is forbidden\n")
+DEFUN_USRATTR(cfg_bts_early_cm_3g,
+	      cfg_bts_early_cm_3g_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "early-classmark-sending-3g (allowed|forbidden)",
+	      "3G Early Classmark Sending\n"
+	      "3G Early Classmark Sending is allowed\n"
+	      "3G Early Classmark Sending is forbidden\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3391,11 +3505,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_neigh_mode, cfg_bts_neigh_mode_cmd,
-	"neighbor-list mode (automatic|manual|manual-si5)",
-	"Neighbor List\n" "Mode of Neighbor List generation\n"
-	"Automatically from all BTS in this BSC\n" "Manual\n"
-	"Manual with different lists for SI2 and SI5\n")
+DEFUN_USRATTR(cfg_bts_neigh_mode,
+	      cfg_bts_neigh_mode_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "neighbor-list mode (automatic|manual|manual-si5)",
+	      "Neighbor List\n" "Mode of Neighbor List generation\n"
+	      "Automatically from all BTS in this BSC\n" "Manual\n"
+	      "Manual with different lists for SI2 and SI5\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int mode = get_string_value(bts_neigh_mode_strs, argv[0]);
@@ -3418,11 +3534,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_neigh, cfg_bts_neigh_cmd,
-	"neighbor-list (add|del) arfcn <0-1023>",
-	"Neighbor List\n" "Add to manual neighbor list\n"
-	"Delete from manual neighbor list\n" "ARFCN of neighbor\n"
-	"ARFCN of neighbor\n")
+DEFUN_USRATTR(cfg_bts_neigh,
+	      cfg_bts_neigh_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "neighbor-list (add|del) arfcn <0-1023>",
+	      "Neighbor List\n" "Add to manual neighbor list\n"
+	      "Delete from manual neighbor list\n" "ARFCN of neighbor\n"
+	      "ARFCN of neighbor\n")
 {
 	struct gsm_bts *bts = vty->index;
 	struct bitvec *bv = &bts->si_common.neigh_list;
@@ -3449,17 +3567,19 @@
 }
 
 /* help text should be kept in sync with EARFCN_*_INVALID defines */
-DEFUN(cfg_bts_si2quater_neigh_add, cfg_bts_si2quater_neigh_add_cmd,
-      "si2quater neighbor-list add earfcn <0-65535> thresh-hi <0-31> "
-      "thresh-lo <0-32> prio <0-8> qrxlv <0-32> meas <0-8>",
-      "SI2quater Neighbor List\n" "SI2quater Neighbor List\n"
-      "Add to manual SI2quater neighbor list\n"
-      "EARFCN of neighbor\n" "EARFCN of neighbor\n"
-      "threshold high bits\n" "threshold high bits\n"
-      "threshold low bits\n" "threshold low bits (32 means NA)\n"
-      "priority\n" "priority (8 means NA)\n"
-      "QRXLEVMIN\n" "QRXLEVMIN (32 means NA)\n"
-      "measurement bandwidth\n" "measurement bandwidth (8 means NA)\n")
+DEFUN_USRATTR(cfg_bts_si2quater_neigh_add,
+	      cfg_bts_si2quater_neigh_add_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "si2quater neighbor-list add earfcn <0-65535> thresh-hi <0-31> "
+	      "thresh-lo <0-32> prio <0-8> qrxlv <0-32> meas <0-8>",
+	      "SI2quater Neighbor List\n" "SI2quater Neighbor List\n"
+	      "Add to manual SI2quater neighbor list\n"
+	      "EARFCN of neighbor\n" "EARFCN of neighbor\n"
+	      "threshold high bits\n" "threshold high bits\n"
+	      "threshold low bits\n" "threshold low bits (32 means NA)\n"
+	      "priority\n" "priority (8 means NA)\n"
+	      "QRXLEVMIN\n" "QRXLEVMIN (32 means NA)\n"
+	      "measurement bandwidth\n" "measurement bandwidth (8 means NA)\n")
 {
 	struct gsm_bts *bts = vty->index;
 	struct osmo_earfcn_si2q *e = &bts->si_common.si2quater_neigh_list;
@@ -3502,13 +3622,15 @@
 	return CMD_WARNING;
 }
 
-DEFUN(cfg_bts_si2quater_neigh_del, cfg_bts_si2quater_neigh_del_cmd,
-	"si2quater neighbor-list del earfcn <0-65535>",
-	"SI2quater Neighbor List\n"
-	"SI2quater Neighbor List\n"
-	"Delete from SI2quater manual neighbor list\n"
-	"EARFCN of neighbor\n"
-	"EARFCN\n")
+DEFUN_USRATTR(cfg_bts_si2quater_neigh_del,
+	      cfg_bts_si2quater_neigh_del_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "si2quater neighbor-list del earfcn <0-65535>",
+	      "SI2quater Neighbor List\n"
+	      "SI2quater Neighbor List\n"
+	      "Delete from SI2quater manual neighbor list\n"
+	      "EARFCN of neighbor\n"
+	      "EARFCN\n")
 {
 	struct gsm_bts *bts = vty->index;
 	struct osmo_earfcn_si2q *e = &bts->si_common.si2quater_neigh_list;
@@ -3523,12 +3645,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_si2quater_uarfcn_add, cfg_bts_si2quater_uarfcn_add_cmd,
-      "si2quater neighbor-list add uarfcn <0-16383> <0-511> <0-1>",
-      "SI2quater Neighbor List\n"
-      "SI2quater Neighbor List\n" "Add to manual SI2quater neighbor list\n"
-      "UARFCN of neighbor\n" "UARFCN of neighbor\n" "scrambling code\n"
-      "diversity bit\n")
+DEFUN_USRATTR(cfg_bts_si2quater_uarfcn_add,
+	      cfg_bts_si2quater_uarfcn_add_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "si2quater neighbor-list add uarfcn <0-16383> <0-511> <0-1>",
+	      "SI2quater Neighbor List\n"
+	      "SI2quater Neighbor List\n" "Add to manual SI2quater neighbor list\n"
+	      "UARFCN of neighbor\n" "UARFCN of neighbor\n" "scrambling code\n"
+	      "diversity bit\n")
 {
 	struct gsm_bts *bts = vty->index;
 	uint16_t arfcn = atoi(argv[0]), scramble = atoi(argv[1]);
@@ -3551,14 +3675,16 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_si2quater_uarfcn_del, cfg_bts_si2quater_uarfcn_del_cmd,
-      "si2quater neighbor-list del uarfcn <0-16383> <0-511>",
-      "SI2quater Neighbor List\n"
-      "SI2quater Neighbor List\n"
-      "Delete from SI2quater manual neighbor list\n"
-      "UARFCN of neighbor\n"
-      "UARFCN\n"
-      "scrambling code\n")
+DEFUN_USRATTR(cfg_bts_si2quater_uarfcn_del,
+	      cfg_bts_si2quater_uarfcn_del_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "si2quater neighbor-list del uarfcn <0-16383> <0-511>",
+	      "SI2quater Neighbor List\n"
+	      "SI2quater Neighbor List\n"
+	      "Delete from SI2quater manual neighbor list\n"
+	      "UARFCN of neighbor\n"
+	      "UARFCN\n"
+	      "scrambling code\n")
 {
 	struct gsm_bts *bts = vty->index;
 
@@ -3571,12 +3697,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_si5_neigh, cfg_bts_si5_neigh_cmd,
-	"si5 neighbor-list (add|del) arfcn <0-1023>",
-	"SI5 Neighbor List\n"
-	"SI5 Neighbor List\n" "Add to manual SI5 neighbor list\n"
-	"Delete from SI5 manual neighbor list\n" "ARFCN of neighbor\n"
-	"ARFCN of neighbor\n")
+DEFUN_USRATTR(cfg_bts_si5_neigh,
+	      cfg_bts_si5_neigh_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "si5 neighbor-list (add|del) arfcn <0-1023>",
+	      "SI5 Neighbor List\n"
+	      "SI5 Neighbor List\n" "Add to manual SI5 neighbor list\n"
+	      "Delete from SI5 manual neighbor list\n" "ARFCN of neighbor\n"
+	      "ARFCN of neighbor\n")
 {
 	enum gsm_band unused;
 	struct gsm_bts *bts = vty->index;
@@ -3602,10 +3730,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_pcu_sock, cfg_bts_pcu_sock_cmd,
-	"pcu-socket PATH",
-	"PCU Socket Path for using OsmoPCU co-located with BSC (legacy BTS)\n"
-	"Path in the file system for the unix-domain PCU socket\n")
+DEFUN_USRATTR(cfg_bts_pcu_sock,
+	      cfg_bts_pcu_sock_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "pcu-socket PATH",
+	      "PCU Socket Path for using OsmoPCU co-located with BSC (legacy BTS)\n"
+	      "Path in the file system for the unix-domain PCU socket\n")
 {
 	struct gsm_bts *bts = vty->index;
 	int rc;
@@ -3784,10 +3914,11 @@
 
 #define FORCE_COMB_SI_STR "Force the generation of a single SI (no ter/bis)\n"
 
-DEFUN(cfg_bts_force_comb_si,
-      cfg_bts_force_comb_si_cmd,
-      "force-combined-si",
-      FORCE_COMB_SI_STR)
+DEFUN_USRATTR(cfg_bts_force_comb_si,
+	      cfg_bts_force_comb_si_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "force-combined-si",
+	      FORCE_COMB_SI_STR)
 {
 	struct gsm_bts *bts = vty->index;
 	bts->force_combined_si = 1;
@@ -3795,10 +3926,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_bts_no_force_comb_si,
-      cfg_bts_no_force_comb_si_cmd,
-      "no force-combined-si",
-      NO_STR FORCE_COMB_SI_STR)
+DEFUN_USRATTR(cfg_bts_no_force_comb_si,
+	      cfg_bts_no_force_comb_si_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "no force-combined-si",
+	      NO_STR FORCE_COMB_SI_STR)
 {
 	struct gsm_bts *bts = vty->index;
 	bts->force_combined_si = 0;
@@ -4371,11 +4503,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_trx_arfcn,
-      cfg_trx_arfcn_cmd,
-      "arfcn <0-1023>",
-      "Set the ARFCN for this TRX\n"
-      "Absolute Radio Frequency Channel Number\n")
+DEFUN_USRATTR(cfg_trx_arfcn,
+	      cfg_trx_arfcn_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "arfcn <0-1023>",
+	      "Set the ARFCN for this TRX\n"
+	      "Absolute Radio Frequency Channel Number\n")
 {
 	enum gsm_band unused;
 	struct gsm_bts_trx *trx = vty->index;
@@ -4411,11 +4544,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_trx_max_power_red,
-      cfg_trx_max_power_red_cmd,
-      "max_power_red <0-100>",
-      "Reduction of maximum BS RF Power (relative to nominal power)\n"
-      "Reduction of maximum BS RF Power in dB\n")
+DEFUN_USRATTR(cfg_trx_max_power_red,
+	      cfg_trx_max_power_red_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "max_power_red <0-100>",
+	      "Reduction of maximum BS RF Power (relative to nominal power)\n"
+	      "Reduction of maximum BS RF Power in dB\n")
 {
 	int maxpwr_r = atoi(argv[0]);
 	struct gsm_bts_trx *trx = vty->index;
@@ -4440,21 +4574,22 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_trx_rsl_e1,
-      cfg_trx_rsl_e1_cmd,
-      "rsl e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
-      "RSL Parameters\n"
-      "E1/T1 interface to be used for RSL\n"
-      "E1/T1 interface to be used for RSL\n"
-      "E1/T1 Line Number to be used for RSL\n"
-      "E1/T1 Timeslot to be used for RSL\n"
-      "E1/T1 Timeslot to be used for RSL\n"
-      "E1/T1 Sub-slot to be used for RSL\n"
-      "E1/T1 Sub-slot 0 is to be used for RSL\n"
-      "E1/T1 Sub-slot 1 is to be used for RSL\n"
-      "E1/T1 Sub-slot 2 is to be used for RSL\n"
-      "E1/T1 Sub-slot 3 is to be used for RSL\n"
-      "E1/T1 full timeslot is to be used for RSL\n")
+DEFUN_USRATTR(cfg_trx_rsl_e1,
+	      cfg_trx_rsl_e1_cmd,
+	      0x00, /* FIXME: BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK? */
+	      "rsl e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
+	      "RSL Parameters\n"
+	      "E1/T1 interface to be used for RSL\n"
+	      "E1/T1 interface to be used for RSL\n"
+	      "E1/T1 Line Number to be used for RSL\n"
+	      "E1/T1 Timeslot to be used for RSL\n"
+	      "E1/T1 Timeslot to be used for RSL\n"
+	      "E1/T1 Sub-slot to be used for RSL\n"
+	      "E1/T1 Sub-slot 0 is to be used for RSL\n"
+	      "E1/T1 Sub-slot 1 is to be used for RSL\n"
+	      "E1/T1 Sub-slot 2 is to be used for RSL\n"
+	      "E1/T1 Sub-slot 3 is to be used for RSL\n"
+	      "E1/T1 full timeslot is to be used for RSL\n")
 {
 	struct gsm_bts_trx *trx = vty->index;
 
@@ -4463,13 +4598,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_trx_rsl_e1_tei,
-      cfg_trx_rsl_e1_tei_cmd,
-      "rsl e1 tei <0-63>",
-      "RSL Parameters\n"
-      "Set the TEI to be used for RSL\n"
-      "Set the TEI to be used for RSL\n"
-      "TEI to be used for RSL\n")
+DEFUN_USRATTR(cfg_trx_rsl_e1_tei,
+	      cfg_trx_rsl_e1_tei_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "rsl e1 tei <0-63>",
+	      "RSL Parameters\n"
+	      "Set the TEI to be used for RSL\n"
+	      "Set the TEI to be used for RSL\n"
+	      "TEI to be used for RSL\n")
 {
 	struct gsm_bts_trx *trx = vty->index;
 
@@ -4517,10 +4653,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ts_pchan,
-      cfg_ts_pchan_cmd,
-      "phys_chan_config PCHAN", /* dynamically generated! */
-      "Physical Channel configuration (TCH/SDCCH/...)\n" "Physical Channel\n")
+DEFUN_USRATTR(cfg_ts_pchan,
+	      cfg_ts_pchan_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "phys_chan_config PCHAN", /* dynamically generated! */
+	      "Physical Channel configuration (TCH/SDCCH/...)\n" "Physical Channel\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 	int pchanc;
@@ -4557,10 +4694,11 @@
 
 
 
-DEFUN(cfg_ts_tsc,
-      cfg_ts_tsc_cmd,
-      "training_sequence_code <0-7>",
-      "Training Sequence Code of the Timeslot\n" "TSC\n")
+DEFUN_USRATTR(cfg_ts_tsc,
+	      cfg_ts_tsc_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "training_sequence_code <0-7>",
+	      "Training Sequence Code of the Timeslot\n" "TSC\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 
@@ -4578,11 +4716,12 @@
 
 #define HOPPING_STR "Configure frequency hopping\n"
 
-DEFUN(cfg_ts_hopping,
-      cfg_ts_hopping_cmd,
-      "hopping enabled (0|1)",
-	HOPPING_STR "Enable or disable frequency hopping\n"
-      "Disable frequency hopping\n" "Enable frequency hopping\n")
+DEFUN_USRATTR(cfg_ts_hopping,
+	      cfg_ts_hopping_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "hopping enabled (0|1)",
+	      HOPPING_STR "Enable or disable frequency hopping\n"
+	      "Disable frequency hopping\n" "Enable frequency hopping\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 	int enabled = atoi(argv[0]);
@@ -4599,12 +4738,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ts_hsn,
-      cfg_ts_hsn_cmd,
-      "hopping sequence-number <0-63>",
-	HOPPING_STR
-      "Which hopping sequence to use for this channel\n"
-      "Hopping Sequence Number (HSN)\n")
+DEFUN_USRATTR(cfg_ts_hsn,
+	      cfg_ts_hsn_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "hopping sequence-number <0-63>",
+	      HOPPING_STR
+	      "Which hopping sequence to use for this channel\n"
+	      "Hopping Sequence Number (HSN)\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 
@@ -4613,12 +4753,13 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ts_maio,
-      cfg_ts_maio_cmd,
-      "hopping maio <0-63>",
-	HOPPING_STR
-      "Which hopping MAIO to use for this channel\n"
-      "Mobile Allocation Index Offset (MAIO)\n")
+DEFUN_USRATTR(cfg_ts_maio,
+	      cfg_ts_maio_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "hopping maio <0-63>",
+	      HOPPING_STR
+	      "Which hopping MAIO to use for this channel\n"
+	      "Mobile Allocation Index Offset (MAIO)\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 
@@ -4627,11 +4768,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ts_arfcn_add,
-      cfg_ts_arfcn_add_cmd,
-      "hopping arfcn add <0-1023>",
-	HOPPING_STR "Configure hopping ARFCN list\n"
-      "Add an entry to the hopping ARFCN list\n" "ARFCN\n")
+DEFUN_USRATTR(cfg_ts_arfcn_add,
+	      cfg_ts_arfcn_add_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "hopping arfcn add <0-1023>",
+	      HOPPING_STR "Configure hopping ARFCN list\n"
+	      "Add an entry to the hopping ARFCN list\n" "ARFCN\n")
 {
 	enum gsm_band unused;
 	struct gsm_bts_trx_ts *ts = vty->index;
@@ -4647,11 +4789,12 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ts_arfcn_del,
-      cfg_ts_arfcn_del_cmd,
-      "hopping arfcn del <0-1023>",
-	HOPPING_STR "Configure hopping ARFCN list\n"
-      "Delete an entry to the hopping ARFCN list\n" "ARFCN\n")
+DEFUN_USRATTR(cfg_ts_arfcn_del,
+	      cfg_ts_arfcn_del_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_OML_LINK,
+	      "hopping arfcn del <0-1023>",
+	      HOPPING_STR "Configure hopping ARFCN list\n"
+	      "Delete an entry to the hopping ARFCN list\n" "ARFCN\n")
 {
 	enum gsm_band unused;
 	struct gsm_bts_trx_ts *ts = vty->index;
@@ -4667,20 +4810,21 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ts_e1_subslot,
-      cfg_ts_e1_subslot_cmd,
-      "e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
-      "E1/T1 channel connected to this on-air timeslot\n"
-      "E1/T1 channel connected to this on-air timeslot\n"
-      "E1/T1 line connected to this on-air timeslot\n"
-      "E1/T1 timeslot connected to this on-air timeslot\n"
-      "E1/T1 timeslot connected to this on-air timeslot\n"
-      "E1/T1 sub-slot connected to this on-air timeslot\n"
-      "E1/T1 sub-slot 0 connected to this on-air timeslot\n"
-      "E1/T1 sub-slot 1 connected to this on-air timeslot\n"
-      "E1/T1 sub-slot 2 connected to this on-air timeslot\n"
-      "E1/T1 sub-slot 3 connected to this on-air timeslot\n"
-      "Full E1/T1 timeslot connected to this on-air timeslot\n")
+DEFUN_USRATTR(cfg_ts_e1_subslot,
+	      cfg_ts_e1_subslot_cmd,
+	      0x00, /* FIXME: BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK? */
+	      "e1 line E1_LINE timeslot <1-31> sub-slot (0|1|2|3|full)",
+	      "E1/T1 channel connected to this on-air timeslot\n"
+	      "E1/T1 channel connected to this on-air timeslot\n"
+	      "E1/T1 line connected to this on-air timeslot\n"
+	      "E1/T1 timeslot connected to this on-air timeslot\n"
+	      "E1/T1 timeslot connected to this on-air timeslot\n"
+	      "E1/T1 sub-slot connected to this on-air timeslot\n"
+	      "E1/T1 sub-slot 0 connected to this on-air timeslot\n"
+	      "E1/T1 sub-slot 1 connected to this on-air timeslot\n"
+	      "E1/T1 sub-slot 2 connected to this on-air timeslot\n"
+	      "E1/T1 sub-slot 3 connected to this on-air timeslot\n"
+	      "Full E1/T1 timeslot connected to this on-air timeslot\n")
 {
 	struct gsm_bts_trx_ts *ts = vty->index;
 
@@ -5204,13 +5348,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_ncc,
-      cfg_net_ncc_cmd,
-      "network country code <1-999>",
-      "Set the GSM network country code\n"
-      "Country commands\n"
-      CODE_CMD_STR
-      "Network Country Code to use\n")
+DEFUN_USRATTR(cfg_net_ncc,
+	      cfg_net_ncc_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "network country code <1-999>",
+	      "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);
 	uint16_t mcc;
@@ -5225,13 +5370,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_mnc,
-      cfg_net_mnc_cmd,
-      "mobile network code <0-999>",
-      "Set the GSM mobile network code\n"
-      "Network Commands\n"
-      CODE_CMD_STR
-      "Mobile Network Code to use\n")
+DEFUN_USRATTR(cfg_net_mnc,
+	      cfg_net_mnc_cmd,
+	      BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK,
+	      "mobile network code <0-999>",
+	      "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);
 	uint16_t mnc;
@@ -5343,12 +5489,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_per_loc_upd, cfg_net_per_loc_upd_cmd,
-      "periodic location update <6-1530>",
-      "Periodic Location Updating Interval\n"
-      "Periodic Location Updating Interval\n"
-      "Periodic Location Updating Interval\n"
-      "Periodic Location Updating Interval in Minutes\n")
+/* FIXME: changing this value would not affect generated System Information */
+DEFUN_USRATTR(cfg_net_per_loc_upd,
+	      cfg_net_per_loc_upd_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "periodic location update <6-1530>",
+	      "Periodic Location Updating Interval\n"
+	      "Periodic Location Updating Interval\n"
+	      "Periodic Location Updating Interval\n"
+	      "Periodic Location Updating Interval in Minutes\n")
 {
 	struct gsm_network *net = vty->index;
 	struct osmo_tdef *d = osmo_tdef_get_entry(net->T_defs, 3212);
@@ -5359,12 +5508,15 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_no_per_loc_upd, cfg_net_no_per_loc_upd_cmd,
-      "no periodic location update",
-      NO_STR
-      "Periodic Location Updating Interval\n"
-      "Periodic Location Updating Interval\n"
-      "Periodic Location Updating Interval\n")
+/* FIXME: changing this value would not affect generated System Information */
+DEFUN_USRATTR(cfg_net_no_per_loc_upd,
+	      cfg_net_no_per_loc_upd_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "no periodic location update",
+	      NO_STR
+	      "Periodic Location Updating Interval\n"
+	      "Periodic Location Updating Interval\n"
+	      "Periodic Location Updating Interval\n")
 {
 	struct gsm_network *net = vty->index;
 	struct osmo_tdef *d = osmo_tdef_get_entry(net->T_defs, 3212);
@@ -5423,9 +5575,11 @@
 	return osmo_tdef_vty_set_cmd(vty, net->T_defs, argv);
 }
 
-DEFUN(cfg_net_allow_unusable_timeslots, cfg_net_allow_unusable_timeslots_cmd,
-      "allow-unusable-timeslots",
-      "Don't refuse to start with mutually exclusive codec settings\n")
+DEFUN_USRATTR(cfg_net_allow_unusable_timeslots,
+	      cfg_net_allow_unusable_timeslots_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "allow-unusable-timeslots",
+	      "Don't refuse to start with mutually exclusive codec settings\n")
 {
 	struct gsm_network *net = gsmnet_from_vty(vty);
 	net->allow_unusable_timeslots = true;
@@ -5817,10 +5971,11 @@
 	addr->ssn = OSMO_SCCP_SSN_BSSAP;
 }
 
-DEFUN(cfg_msc_cs7_bsc_addr,
-      cfg_msc_cs7_bsc_addr_cmd,
-      "bsc-addr NAME",
-      "Calling Address (local address of this BSC)\n" "SCCP address name\n")
+DEFUN_USRATTR(cfg_msc_cs7_bsc_addr,
+	      cfg_msc_cs7_bsc_addr_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "bsc-addr NAME",
+	      "Calling Address (local address of this BSC)\n" "SCCP address name\n")
 {
 	struct bsc_msc_data *msc = bsc_msc_data(vty);
 	const char *bsc_addr_name = argv[0];
@@ -5849,10 +6004,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_msc_cs7_msc_addr,
-      cfg_msc_cs7_msc_addr_cmd,
-      "msc-addr NAME",
-      "Called Address (remote address of the MSC)\n" "SCCP address name\n")
+DEFUN_USRATTR(cfg_msc_cs7_msc_addr,
+	      cfg_msc_cs7_msc_addr_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "msc-addr NAME",
+	      "Called Address (remote address of the MSC)\n" "SCCP address name\n")
 {
 	struct bsc_msc_data *msc = bsc_msc_data(vty);
 	const char *msc_addr_name = argv[0];
@@ -5881,13 +6037,14 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_msc_cs7_asp_proto,
-      cfg_msc_cs7_asp_proto_cmd,
-      "asp-protocol (m3ua|sua|ipa)",
-      "A interface protocol to use for this MSC)\n"
-      "MTP3 User Adaptation\n"
-      "SCCP User Adaptation\n"
-      "IPA Multiplex (SCCP Lite)\n")
+DEFUN_USRATTR(cfg_msc_cs7_asp_proto,
+	      cfg_msc_cs7_asp_proto_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "asp-protocol (m3ua|sua|ipa)",
+	      "A interface protocol to use for this MSC)\n"
+	      "MTP3 User Adaptation\n"
+	      "SCCP User Adaptation\n"
+	      "IPA Multiplex (SCCP Lite)\n")
 {
 	struct bsc_msc_data *msc = bsc_msc_data(vty);
 
@@ -5985,10 +6142,11 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_rf_socket,
-      cfg_net_rf_socket_cmd,
-      "bsc-rf-socket PATH",
-      "Set the filename for the RF control interface.\n" "RF Control path\n")
+DEFUN_USRATTR(cfg_net_rf_socket,
+	      cfg_net_rf_socket_cmd,
+	      BSC_VTY_ATTR_RESTART_FULL,
+	      "bsc-rf-socket PATH",
+	      "Set the filename for the RF control interface.\n" "RF Control path\n")
 {
 	osmo_talloc_replace_string(bsc_gsmnet, &bsc_gsmnet->rf_ctrl_name, argv[0]);
 	return CMD_SUCCESS;
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 84b44f7..dd0328c 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -641,6 +641,7 @@
 	.version	= PACKAGE_VERSION,
 	.go_parent_cb	= bsc_vty_go_parent,
 	.is_config_node	= bsc_vty_is_config_node,
+	.attr_desc	= bsc_vty_cmd_attr_desc,
 };
 
 extern int bsc_shutdown_net(struct gsm_network *net);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/19670
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3bf9223295fc4a2fcb4046a1f29f792ff6a41d51
Gerrit-Change-Number: 19670
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200816/d8fa7325/attachment.htm>


More information about the gerrit-log mailing list