From ff3bde8b49ef7cf530c535c99e5960dd5b8871cf Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 19 May 2010 15:09:09 +0200 Subject: [GPRS] NS: VTY: Move all local ip/port bind values into 'ns' node This removes the requirement for gb_proxy and sgsn to have duplicate vty parsing code --- openbsc/src/gprs/sgsn_vty.c | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'openbsc/src/gprs/sgsn_vty.c') diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index a065ba46e..2532a8840 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -54,18 +54,10 @@ static int config_write_sgsn(struct vty *vty) vty_out(vty, "sgsn%s", VTY_NEWLINE); - if (g_cfg->nsip_listen_ip) { - ia.s_addr = htonl(g_cfg->nsip_listen_ip); - vty_out(vty, " nsip local ip %s%s", inet_ntoa(ia), - VTY_NEWLINE); - } - vty_out(vty, " nsip local port %u%s", g_cfg->nsip_listen_port, - VTY_NEWLINE); - llist_for_each_entry(gctx, &sgsn_ggsn_ctxts, list) { - vty_out(vty, " ggsn %u remote-ip %s%s", gctx->id, + vty_out(vty, " ggsn %u remote-ip %s%s", gctx->id, inet_ntoa(gctx->remote_addr), VTY_NEWLINE); - vty_out(vty, " ggsn %u gtp-version %u%s", gctx->id, + vty_out(vty, " ggsn %u gtp-version %u%s", gctx->id, gctx->gtp_version, VTY_NEWLINE); } @@ -81,32 +73,6 @@ DEFUN(cfg_sgsn, return CMD_SUCCESS; } - -DEFUN(cfg_nsip_local_ip, - cfg_nsip_local_ip_cmd, - "nsip local ip A.B.C.D", - "Set the IP address on which we listen for BSS connects") -{ - struct in_addr ia; - - inet_aton(argv[0], &ia); - g_cfg->nsip_listen_ip = ntohl(ia.s_addr); - - return CMD_SUCCESS; -} - -DEFUN(cfg_nsip_local_port, - cfg_nsip_local_port_cmd, - "nsip local port <0-65534>", - "Set the UDP port on which we listen for BSS connects") -{ - unsigned int port = atoi(argv[0]); - - g_cfg->nsip_listen_port = port; - - return CMD_SUCCESS; -} - DEFUN(cfg_ggsn_remote_ip, cfg_ggsn_remote_ip_cmd, "ggsn <0-255> remote-ip A.B.C.D", "") @@ -288,8 +254,6 @@ int sgsn_vty_init(void) install_default(SGSN_NODE); install_element(SGSN_NODE, &ournode_exit_cmd); install_element(SGSN_NODE, &ournode_end_cmd); - install_element(SGSN_NODE, &cfg_nsip_local_ip_cmd); - install_element(SGSN_NODE, &cfg_nsip_local_port_cmd); install_element(SGSN_NODE, &cfg_ggsn_remote_ip_cmd); //install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd); install_element(SGSN_NODE, &cfg_ggsn_gtp_version_cmd); -- cgit v1.2.3