[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
diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h
index 40c88d2..ed1ac2d 100644
--- a/openbsc/include/openbsc/gb_proxy.h
+++ b/openbsc/include/openbsc/gb_proxy.h
@@ -10,11 +10,6 @@
struct gbproxy_config {
/* parsed from config file */
- u_int32_t nsip_listen_ip;
- u_int16_t nsip_listen_port;
-
- int frgre_enabled;
-
u_int16_t nsip_sgsn_nsei;
/* misc */
diff --git a/openbsc/include/openbsc/gprs_ns.h b/openbsc/include/openbsc/gprs_ns.h
index 319ff3d..1ec6631 100644
--- a/openbsc/include/openbsc/gprs_ns.h
+++ b/openbsc/include/openbsc/gprs_ns.h
@@ -134,10 +134,14 @@
/* NS-over-IP specific bits */
struct {
struct bsc_fd fd;
+ uint32_t local_ip;
+ uint16_t local_port;
} nsip;
/* NS-over-FR-over-GRE-over-IP specific bits */
struct {
struct bsc_fd fd;
+ uint32_t local_ip;
+ int enabled:1;
} frgre;
};
@@ -188,7 +192,7 @@
void gprs_ns_destroy(struct gprs_ns_inst *nsi);
/* Listen for incoming GPRS packets via NS/UDP */
-int nsip_listen(struct gprs_ns_inst *nsi, uint32_t ip, uint16_t udp_port);
+int gprs_ns_nsip_listen(struct gprs_ns_inst *nsi);
struct sockaddr_in;
@@ -200,7 +204,7 @@
int gprs_ns_tx_unblock(struct gprs_nsvc *nsvc);
/* Listen for incoming GPRS packets via NS/FR/GRE */
-int gprs_ns_frgre_listen(struct gprs_ns_inst *nsi, uint32_t ip);
+int gprs_ns_frgre_listen(struct gprs_ns_inst *nsi);
/* Establish a connection (from the BSS) to the SGSN */
struct gprs_nsvc *nsip_connect(struct gprs_ns_inst *nsi,
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index a90a864..1ce608a 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -10,8 +10,6 @@
struct sgsn_config {
/* parsed from config file */
- u_int32_t nsip_listen_ip;
- u_int16_t nsip_listen_port;
char *gtp_statedir;
struct sockaddr_in gtp_listenaddr;