aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-25 09:53:59 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-28 11:39:04 +0700
commit64bd96b3f8c178de53b1efbbcedb9d94cb0c176f (patch)
tree593ba302e5fa3dc71a03f6f58d86a0600946e895
parent4785fe7622e6e47dba6f891a9226a1d64af6a05a (diff)
vty: make most struct pointers const in show/write commands
-rw-r--r--include/osmo-bts/bts.h2
-rw-r--r--include/osmo-bts/bts_model.h8
-rw-r--r--include/osmo-bts/phy_link.h2
-rw-r--r--src/common/l1sap.c2
-rw-r--r--src/common/phy_link.c2
-rw-r--r--src/common/vty.c88
-rw-r--r--src/osmo-bts-litecell15/lc15bts_vty.c10
-rw-r--r--src/osmo-bts-oc2g/oc2gbts_vty.c8
-rw-r--r--src/osmo-bts-octphy/octphy_vty.c8
-rw-r--r--src/osmo-bts-sysmo/sysmobts_vty.c8
-rw-r--r--src/osmo-bts-trx/trx_vty.c8
-rw-r--r--src/osmo-bts-virtual/virtualbts_vty.c8
12 files changed, 77 insertions, 77 deletions
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 7d3f8bf5..ffaeb577 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -347,7 +347,7 @@ int bts_main(int argc, char **argv);
int bts_supports_cm(struct gsm_bts *bts, enum gsm_phys_chan_config pchan,
enum gsm48_chan_mode cm);
-int32_t bts_get_avg_fn_advance(struct gsm_bts *bts);
+int32_t bts_get_avg_fn_advance(const struct gsm_bts *bts);
/* return the gsm_lchan for the CBCH (if it exists at all) */
struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts);
diff --git a/include/osmo-bts/bts_model.h b/include/osmo-bts/bts_model.h
index 4fd0813d..568ff007 100644
--- a/include/osmo-bts/bts_model.h
+++ b/include/osmo-bts/bts_model.h
@@ -36,10 +36,10 @@ void bts_model_trx_close(struct gsm_bts_trx *trx);
int bts_model_vty_init(struct gsm_bts *bts);
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts);
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx);
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink);
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst);
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts);
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx);
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink);
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst);
int bts_model_oml_estab(struct gsm_bts *bts);
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index ce4ea45f..ef3df27c 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -164,7 +164,7 @@ enum phy_link_state phy_link_state_get(struct phy_link *plink);
const char *phy_link_state_name(enum phy_link_state state);
int phy_links_open(void);
-struct phy_instance *phy_instance_by_num(struct phy_link *plink, int num);
+struct phy_instance *phy_instance_by_num(const struct phy_link *plink, int num);
struct phy_instance *phy_instance_create(struct phy_link *plink, int num);
void phy_instance_link_to_trx(struct phy_instance *pinst, struct gsm_bts_trx *trx);
void phy_instance_destroy(struct phy_instance *pinst);
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index eac50004..ca1949a8 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -882,7 +882,7 @@ int is_ccch_for_agch(struct gsm_bts_trx *trx, uint32_t fn) {
}
/* return the measured average of frame numbers that the RTS clock is running in advance */
-int32_t bts_get_avg_fn_advance(struct gsm_bts *bts)
+int32_t bts_get_avg_fn_advance(const struct gsm_bts *bts)
{
if (bts->fn_stats.avg_count == 0)
return 0;
diff --git a/src/common/phy_link.c b/src/common/phy_link.c
index d13d3f18..48ba283e 100644
--- a/src/common/phy_link.c
+++ b/src/common/phy_link.c
@@ -79,7 +79,7 @@ const char *phy_link_state_name(enum phy_link_state state)
return get_value_string(phy_link_state_vals, state);
}
-struct phy_instance *phy_instance_by_num(struct phy_link *plink, int num)
+struct phy_instance *phy_instance_by_num(const struct phy_link *plink, int num)
{
struct phy_instance *pinst;
diff --git a/src/common/vty.c b/src/common/vty.c
index dd83a111..b662320c 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -216,9 +216,9 @@ DEFUN(cfg_bts_trx, cfg_bts_trx_cmd,
return CMD_SUCCESS;
}
-static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
+static void config_write_bts_single(struct vty *vty, const struct gsm_bts *bts)
{
- struct gsm_bts_trx *trx;
+ const struct gsm_bts_trx *trx;
const char *sapi_buf;
int i;
@@ -281,8 +281,8 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
bts_model_config_write_bts(vty, bts);
llist_for_each_entry(trx, &bts->trx_list, list) {
- struct trx_power_params *tpp = &trx->power_params;
- struct phy_instance *pinst = trx_phy_instance(trx);
+ const struct trx_power_params *tpp = &trx->power_params;
+ const struct phy_instance *pinst = trx_phy_instance(trx);
vty_out(vty, " trx %u%s", trx->nr, VTY_NEWLINE);
if (trx->power_params.user_gain_mdB)
@@ -307,7 +307,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
static int config_write_bts(struct vty *vty)
{
struct gsm_network *net = gsmnet_from_vty(vty);
- struct gsm_bts *bts;
+ const struct gsm_bts *bts;
llist_for_each_entry(bts, &net->bts_list, list)
config_write_bts_single(vty, bts);
@@ -315,7 +315,7 @@ static int config_write_bts(struct vty *vty)
return CMD_SUCCESS;
}
-static void config_write_phy_single(struct vty *vty, struct phy_link *plink)
+static void config_write_phy_single(struct vty *vty, const struct phy_link *plink)
{
int i;
@@ -323,7 +323,7 @@ static void config_write_phy_single(struct vty *vty, struct phy_link *plink)
bts_model_config_write_phy(vty, plink);
for (i = 0; i < 255; i++) {
- struct phy_instance *pinst = phy_instance_by_num(plink, i);
+ const struct phy_instance *pinst = phy_instance_by_num(plink, i);
if (!pinst)
break;
vty_out(vty, " instance %u%s", pinst->num, VTY_NEWLINE);
@@ -336,7 +336,7 @@ static int config_write_phy(struct vty *vty)
int i;
for (i = 0; i < 255; i++) {
- struct phy_link *plink = phy_link_by_num(i);
+ const struct phy_link *plink = phy_link_by_num(i);
if (!plink)
break;
config_write_phy_single(vty, plink);
@@ -815,7 +815,7 @@ DEFUN(cfg_trx_phy, cfg_trx_phy_cmd,
* SHOW
* ======================================================================*/
-static void net_dump_nmstate(struct vty *vty, struct gsm_nm_state *nms)
+static void net_dump_nmstate(struct vty *vty, const struct gsm_nm_state *nms)
{
vty_out(vty,"Oper '%s', Admin '%s', Avail '%s'%s",
abis_nm_opstate_name(nms->operational),
@@ -823,7 +823,7 @@ static void net_dump_nmstate(struct vty *vty, struct gsm_nm_state *nms)
abis_nm_avail_name(nms->availability), VTY_NEWLINE);
}
-static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts)
+static void bts_dump_vty_features(struct vty *vty, const struct gsm_bts *bts)
{
unsigned int i;
bool no_features;
@@ -855,9 +855,9 @@ static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " (not available)%s", VTY_NEWLINE);
}
-static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
+static void bts_dump_vty(struct vty *vty, const struct gsm_bts *bts)
{
- struct gsm_bts_trx *trx;
+ const struct gsm_bts_trx *trx;
vty_out(vty, "BTS %u is of %s type in band %s, has CI %u LAC %u, "
"BSIC %u and %u TRX%s",
@@ -904,7 +904,7 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
bts_get_avg_fn_advance(bts), bts->fn_stats.min, bts->fn_stats.max, VTY_NEWLINE);
llist_for_each_entry(trx, &bts->trx_list, list) {
- struct phy_instance *pinst = trx_phy_instance(trx);
+ const struct phy_instance *pinst = trx_phy_instance(trx);
vty_out(vty, " TRX %u%s", trx->nr, VTY_NEWLINE);
if (pinst) {
vty_out(vty, " phy %d %s", pinst->num, pinst->version);
@@ -923,7 +923,7 @@ DEFUN(show_bts, show_bts_cmd, "show bts <0-255>",
SHOW_STR "Display information about a BTS\n"
BTS_NR_STR)
{
- struct gsm_network *net = gsmnet_from_vty(vty);
+ const struct gsm_network *net = gsmnet_from_vty(vty);
int bts_nr;
if (argc != 0) {
@@ -948,9 +948,9 @@ DEFUN(test_send_failure_event_report, test_send_failure_event_report_cmd, "test
"Various testing commands\n"
"Send a test OML failure event report to the BSC\n" BTS_NR_STR)
{
- struct gsm_network *net = gsmnet_from_vty(vty);
+ const struct gsm_network *net = gsmnet_from_vty(vty);
int bts_nr = atoi(argv[0]);
- struct gsm_bts *bts;
+ const struct gsm_bts *bts;
if (bts_nr >= net->num_bts) {
vty_out(vty, "%% can't find BTS '%s'%s", argv[0], VTY_NEWLINE);
@@ -963,7 +963,7 @@ DEFUN(test_send_failure_event_report, test_send_failure_event_report_cmd, "test
return CMD_SUCCESS;
}
-static void trx_dump_vty(struct vty *vty, struct gsm_bts_trx *trx)
+static void trx_dump_vty(struct vty *vty, const struct gsm_bts_trx *trx)
{
vty_out(vty, "TRX %u of BTS %u is on ARFCN %u%s",
trx->nr, trx->bts->nr, trx->arfcn, VTY_NEWLINE);
@@ -994,8 +994,8 @@ DEFUN(show_trx,
SHOW_STR "Display information about a TRX\n"
BTS_TRX_STR)
{
- struct gsm_network *net = gsmnet_from_vty(vty);
- struct gsm_bts *bts = NULL;
+ const struct gsm_network *net = gsmnet_from_vty(vty);
+ const struct gsm_bts *bts = NULL;
int bts_nr, trx_nr;
if (argc >= 1) {
@@ -1031,7 +1031,7 @@ DEFUN(show_trx,
}
-static void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts)
+static void ts_dump_vty(struct vty *vty, const struct gsm_bts_trx_ts *ts)
{
vty_out(vty, "BTS %u, TRX %u, Timeslot %u, phys cfg %s, TSC %u",
ts->trx->bts->nr, ts->trx->nr, ts->nr,
@@ -1050,10 +1050,10 @@ DEFUN(show_ts,
SHOW_STR "Display information about a TS\n"
BTS_TRX_TS_STR)
{
- struct gsm_network *net = gsmnet_from_vty(vty);
- struct gsm_bts *bts = NULL;
- struct gsm_bts_trx *trx = NULL;
- struct gsm_bts_trx_ts *ts = NULL;
+ const struct gsm_network *net = gsmnet_from_vty(vty);
+ const struct gsm_bts *bts = NULL;
+ const struct gsm_bts_trx *trx = NULL;
+ const struct gsm_bts_trx_ts *ts = NULL;
int bts_nr, trx_nr, ts_nr;
if (argc >= 1) {
@@ -1122,7 +1122,7 @@ DEFUN(show_ts,
/* call vty_out() to print a string like " as TCH/H" for dynamic timeslots.
* Don't do anything if the ts is not dynamic. */
-static void vty_out_dyn_ts_status(struct vty *vty, struct gsm_bts_trx_ts *ts)
+static void vty_out_dyn_ts_status(struct vty *vty, const struct gsm_bts_trx_ts *ts)
{
switch (ts->pchan) {
case GSM_PCHAN_TCH_F_TCH_H_PDCH:
@@ -1152,7 +1152,7 @@ static void vty_out_dyn_ts_status(struct vty *vty, struct gsm_bts_trx_ts *ts)
}
}
-static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan)
+static void lchan_dump_full_vty(struct vty *vty, const struct gsm_lchan *lchan)
{
struct in_addr ia;
@@ -1228,7 +1228,7 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan)
/* TODO: MS Power Control */
}
-static void lchan_dump_short_vty(struct vty *vty, struct gsm_lchan *lchan)
+static void lchan_dump_short_vty(struct vty *vty, const struct gsm_lchan *lchan)
{
const struct gsm_meas_rep_unidir *mru = &lchan->meas.ul_res;
@@ -1244,12 +1244,12 @@ static void lchan_dump_short_vty(struct vty *vty, struct gsm_lchan *lchan)
VTY_NEWLINE);
}
-static int dump_lchan_trx_ts(struct gsm_bts_trx_ts *ts, struct vty *vty,
- void (*dump_cb)(struct vty *, struct gsm_lchan *))
+static int dump_lchan_trx_ts(const struct gsm_bts_trx_ts *ts, struct vty *vty,
+ void (*dump_cb)(struct vty *, const struct gsm_lchan *))
{
int lchan_nr;
for (lchan_nr = 0; lchan_nr < TS_MAX_LCHAN; lchan_nr++) {
- struct gsm_lchan *lchan = &ts->lchan[lchan_nr];
+ const struct gsm_lchan *lchan = &ts->lchan[lchan_nr];
if (lchan->state == LCHAN_S_NONE)
continue;
dump_cb(vty, lchan);
@@ -1258,26 +1258,26 @@ static int dump_lchan_trx_ts(struct gsm_bts_trx_ts *ts, struct vty *vty,
return CMD_SUCCESS;
}
-static int dump_lchan_trx(struct gsm_bts_trx *trx, struct vty *vty,
- void (*dump_cb)(struct vty *, struct gsm_lchan *))
+static int dump_lchan_trx(const struct gsm_bts_trx *trx, struct vty *vty,
+ void (*dump_cb)(struct vty *, const struct gsm_lchan *))
{
int ts_nr;
for (ts_nr = 0; ts_nr < TRX_NR_TS; ts_nr++) {
- struct gsm_bts_trx_ts *ts = &trx->ts[ts_nr];
+ const struct gsm_bts_trx_ts *ts = &trx->ts[ts_nr];
dump_lchan_trx_ts(ts, vty, dump_cb);
}
return CMD_SUCCESS;
}
-static int dump_lchan_bts(struct gsm_bts *bts, struct vty *vty,
- void (*dump_cb)(struct vty *, struct gsm_lchan *))
+static int dump_lchan_bts(const struct gsm_bts *bts, struct vty *vty,
+ void (*dump_cb)(struct vty *, const struct gsm_lchan *))
{
int trx_nr;
for (trx_nr = 0; trx_nr < bts->num_trx; trx_nr++) {
- struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, trx_nr);
+ const struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, trx_nr);
dump_lchan_trx(trx, vty, dump_cb);
}
@@ -1285,13 +1285,13 @@ static int dump_lchan_bts(struct gsm_bts *bts, struct vty *vty,
}
static int lchan_summary(struct vty *vty, int argc, const char **argv,
- void (*dump_cb)(struct vty *, struct gsm_lchan *))
+ void (*dump_cb)(struct vty *, const struct gsm_lchan *))
{
- struct gsm_network *net = gsmnet_from_vty(vty);
- struct gsm_bts *bts;
- struct gsm_bts_trx *trx;
- struct gsm_bts_trx_ts *ts;
- struct gsm_lchan *lchan;
+ const struct gsm_network *net = gsmnet_from_vty(vty);
+ const struct gsm_bts *bts;
+ const struct gsm_bts_trx *trx;
+ const struct gsm_bts_trx_ts *ts;
+ const struct gsm_lchan *lchan;
int bts_nr, trx_nr, ts_nr, lchan_nr;
if (argc >= 1) {
@@ -1370,8 +1370,8 @@ DEFUN(show_lchan_summary,
return lchan_summary(vty, argc, argv, lchan_dump_short_vty);
}
-static struct gsm_lchan *resolve_lchan(struct gsm_network *net,
- const char **argv, int idx)
+static struct gsm_lchan *resolve_lchan(const struct gsm_network *net,
+ const char **argv, int idx)
{
int bts_nr = atoi(argv[idx+0]);
int trx_nr = atoi(argv[idx+1]);
diff --git a/src/osmo-bts-litecell15/lc15bts_vty.c b/src/osmo-bts-litecell15/lc15bts_vty.c
index 2cc812ca..5308d1ad 100644
--- a/src/osmo-bts-litecell15/lc15bts_vty.c
+++ b/src/osmo-bts-litecell15/lc15bts_vty.c
@@ -505,9 +505,9 @@ DEFUN(cfg_bts_rtp_drift_threshold, cfg_bts_rtp_drift_threshold_cmd,
return CMD_SUCCESS;
}
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts)
{
- struct bts_lc15_priv *bts_lc15 = bts->model_priv;
+ const struct bts_lc15_priv *bts_lc15 = bts->model_priv;
vty_out(vty, " led-control-mode %s%s",
get_value_string(lc15_led_mode_strs, bts_lc15->led_ctrl_mode), VTY_NEWLINE);
@@ -516,16 +516,16 @@ void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
}
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx)
{
vty_out(vty, " nominal-tx-power %d%s", trx->nominal_power,VTY_NEWLINE);
}
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink)
{
}
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst)
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst)
{
int i;
diff --git a/src/osmo-bts-oc2g/oc2gbts_vty.c b/src/osmo-bts-oc2g/oc2gbts_vty.c
index 8dc4efaa..c12d0bf7 100644
--- a/src/osmo-bts-oc2g/oc2gbts_vty.c
+++ b/src/osmo-bts-oc2g/oc2gbts_vty.c
@@ -541,7 +541,7 @@ DEFUN(cfg_bts_rtp_drift_threshold, cfg_bts_rtp_drift_threshold_cmd,
}
*/
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts)
{
/* TODO(oramadan) MERGE
struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
@@ -555,16 +555,16 @@ void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
}
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx)
{
vty_out(vty, " nominal-tx-power %d%s", trx->nominal_power,VTY_NEWLINE);
}
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink)
{
}
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst)
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst)
{
int i;
diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c
index afc2ce7b..8b263fdf 100644
--- a/src/osmo-bts-octphy/octphy_vty.c
+++ b/src/osmo-bts-octphy/octphy_vty.c
@@ -360,7 +360,7 @@ DEFUN(show_clk_sync_stats, show_clk_sync_stats_cmd,
return CMD_SUCCESS;
}
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink)
{
if (plink->u.octphy.netdev_name)
vty_out(vty, " octphy net-device %s%s",
@@ -399,15 +399,15 @@ void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
#endif
}
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst)
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst)
{
}
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts)
{
}
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx)
{
}
diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c
index 7876612d..b6130317 100644
--- a/src/osmo-bts-sysmo/sysmobts_vty.c
+++ b/src/osmo-bts-sysmo/sysmobts_vty.c
@@ -433,22 +433,22 @@ DEFUN(no_loopback, no_loopback_cmd,
}
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts)
{
}
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx)
{
if (trx->nominal_power != get_p_max_out_mdBm(trx))
vty_out(vty, " nominal-tx-power %d%s", trx->nominal_power,
VTY_NEWLINE);
}
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink)
{
}
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst)
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst)
{
int i;
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 6b8ca77a..e5199ec1 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -514,7 +514,7 @@ DEFUN(cfg_phy_trxd_max_version, cfg_phy_trxd_max_version_cmd,
return CMD_SUCCESS;
}
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink)
{
if (plink->u.osmotrx.local_ip)
vty_out(vty, " osmotrx ip local %s%s",
@@ -542,7 +542,7 @@ void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
vty_out(vty, " osmotrx trxd-max-version %d%s", plink->u.osmotrx.trxd_hdr_ver_max, VTY_NEWLINE);
}
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst)
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst)
{
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
@@ -571,11 +571,11 @@ void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst
VTY_NEWLINE);
}
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts)
{
}
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx)
{
struct phy_instance *pinst = trx_phy_instance(trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
diff --git a/src/osmo-bts-virtual/virtualbts_vty.c b/src/osmo-bts-virtual/virtualbts_vty.c
index 875e6822..9d632421 100644
--- a/src/osmo-bts-virtual/virtualbts_vty.c
+++ b/src/osmo-bts-virtual/virtualbts_vty.c
@@ -52,19 +52,19 @@
static struct gsm_bts *vty_bts;
-void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts)
+void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts)
{
}
-void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
+void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx)
{
}
-void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst)
+void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst)
{
}
-void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
+void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink)
{
if (plink->u.virt.mcast_dev)
vty_out(vty, " virtual-um net-device %s%s",