aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-08-24 17:54:49 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-24 17:54:49 +0200
commit55dc31e7812fec9ab9f013702cdfd2203a778071 (patch)
treebf6a26fd4ccff7709ae386ef32c985a393f75e7d /openbsc/src
parent6e688082476310be0192a17440a3432bcbb7128e (diff)
Use port number #defines for VTY and CTRL ports
.. as defined in libosmocore
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c3
-rw-r--r--openbsc/src/gprs/sgsn_main.c6
-rw-r--r--openbsc/src/libbsc/bsc_init.c3
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_main.c3
-rw-r--r--openbsc/src/osmo-bsc_mgcp/mgcp_main.c4
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c3
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c3
-rw-r--r--openbsc/src/osmo-nitb/bsc_hack.c3
8 files changed, 18 insertions, 10 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index 149253b53..03299df95 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -48,6 +48,7 @@
#include <osmocom/vty/command.h>
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/logging.h>
+#include <osmocom/vty/ports.h>
#include "../../bscconfig.h"
@@ -250,7 +251,7 @@ int main(int argc, char **argv)
rate_ctr_init(tall_bsc_ctx);
- rc = telnet_init(tall_bsc_ctx, &dummy_network, 4246);
+ rc = telnet_init(tall_bsc_ctx, &dummy_network, OSMO_VTY_PORT_GBPROXY);
if (rc < 0)
exit(1);
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index c8078ba93..41e11f72b 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -43,6 +43,7 @@
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/logging.h>
+#include <osmocom/vty/ports.h>
#include <openbsc/signal.h>
#include <openbsc/debug.h>
@@ -51,6 +52,7 @@
#include <openbsc/gprs_llc.h>
#include <openbsc/gprs_gmm.h>
#include <osmocom/ctrl/control_if.h>
+#include <osmocom/ctrl/ports.h>
#include <gtp.h>
@@ -312,11 +314,11 @@ int main(int argc, char **argv)
handle_options(argc, argv);
rate_ctr_init(tall_bsc_ctx);
- rc = telnet_init(tall_bsc_ctx, &dummy_network, 4245);
+ rc = telnet_init(tall_bsc_ctx, &dummy_network, OSMO_VTY_PORT_SGSN);
if (rc < 0)
exit(1);
- ctrl = sgsn_controlif_setup(NULL, 4251);
+ ctrl = sgsn_controlif_setup(NULL, OSMO_CTRL_PORT_SGSN);
if (!ctrl) {
LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n");
exit(1);
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 8fd72cf46..796d02793 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -27,6 +27,7 @@
#include <openbsc/debug.h>
#include <openbsc/misdn.h>
#include <osmocom/vty/telnet_interface.h>
+#include <osmocom/vty/ports.h>
#include <openbsc/system_information.h>
#include <openbsc/paging.h>
#include <openbsc/signal.h>
@@ -478,7 +479,7 @@ int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *),
return rc;
}
- rc = telnet_init(tall_bsc_ctx, bsc_gsmnet, 4242);
+ rc = telnet_init(tall_bsc_ctx, bsc_gsmnet, OSMO_VTY_PORT_NITB_BSC);
if (rc < 0)
return rc;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index d39759b6a..5c3885575 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -31,6 +31,7 @@
#include <osmocom/ctrl/control_cmd.h>
#include <osmocom/ctrl/control_if.h>
+#include <osmocom/ctrl/ports.h>
#include <osmocom/core/application.h>
#include <osmocom/core/linuxlist.h>
@@ -213,7 +214,7 @@ int main(int argc, char **argv)
}
bsc_api_init(bsc_gsmnet, osmo_bsc_api());
- bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet, 4249);
+ bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet, OSMO_CTRL_PORT_NITB_BSC);
if (!bsc_gsmnet) {
fprintf(stderr, "Failed to init the control interface. Exiting.\n");
exit(1);
diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
index 16fb72231..bee127680 100644
--- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
+++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
@@ -44,7 +44,7 @@
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/logging.h>
-
+#include <osmocom/vty/ports.h>
#include <osmocom/vty/command.h>
#include "../../bscconfig.h"
@@ -228,7 +228,7 @@ int main(int argc, char **argv)
if (rc < 0)
return rc;
- rc = telnet_init(tall_bsc_ctx, &dummy_network, 4243);
+ rc = telnet_init(tall_bsc_ctx, &dummy_network, OSMO_VTY_PORT_BSC_MGCP);
if (rc < 0)
return rc;
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index e66eb08f6..dcc30ca8c 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -57,6 +57,7 @@
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/vty.h>
#include <osmocom/vty/logging.h>
+#include <osmocom/vty/ports.h>
#include <osmocom/sccp/sccp.h>
@@ -1534,7 +1535,7 @@ int main(int argc, char **argv)
rate_ctr_init(tall_bsc_ctx);
/* init vty and parse */
- telnet_init(tall_bsc_ctx, NULL, 4244);
+ telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_BSC_NAT);
if (mgcp_parse_config(config_file, nat->mgcp_cfg, MGCP_BSC_NAT) < 0) {
fprintf(stderr, "Failed to parse the config file: '%s'\n", config_file);
return -3;
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
index 14985e77f..877a8c85e 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c
@@ -23,6 +23,7 @@
#include <osmocom/ctrl/control_cmd.h>
#include <osmocom/ctrl/control_if.h>
+#include <osmocom/ctrl/ports.h>
#include <openbsc/ctrl.h>
#include <openbsc/bsc_nat.h>
@@ -383,7 +384,7 @@ struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, int port)
int rc;
- ctrl = bsc_controlif_setup(NULL, 4250);
+ ctrl = bsc_controlif_setup(NULL, OSMO_CTRL_PORT_BSC_NAT);
if (!ctrl) {
fprintf(stderr, "Failed to initialize the control interface. Exiting.\n");
return NULL;
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 372e52789..a802507d4 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -47,6 +47,7 @@
#include <openbsc/handover_decision.h>
#include <openbsc/rrlp.h>
#include <osmocom/ctrl/control_if.h>
+#include <osmocom/ctrl/ports.h>
#include <openbsc/ctrl.h>
#include <openbsc/osmo_bsc_rf.h>
@@ -285,7 +286,7 @@ int main(int argc, char **argv)
#endif
bsc_api_init(bsc_gsmnet, msc_bsc_api());
- bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet, 4249);
+ bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet, OSMO_CTRL_PORT_NITB_BSC);
if (!bsc_gsmnet->ctrl) {
printf("Failed to initialize control interface. Exiting.\n");
return -1;