osmo-sgsn[master]: vty: absorb command explanations from osmo-gsm-manuals

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/7128
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I35984014424412e91437b7ed71576aef3819cb1e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sgsn[master]: vty: absorb command explanations from osmo-gsm-manuals

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: vty: absorb command explanations from osmo-gsm-manuals
..


vty: absorb command explanations from osmo-gsm-manuals

The osmo-gsm-manuals/vty/sgsn_vty_additions.xml contained many command
explanations that are redundant with the VTY online doc. Some however are more
verbose / easier to understand. Absorb these into the online VTY doc here.

This matches the removal in osmo-gsm-manuals change-id
I71863e5056ad369d2055e9882a52a00fa999ab04.

Change-Id: I35984014424412e91437b7ed71576aef3819cb1e
---
M src/gprs/sgsn_vty.c
1 file changed, 38 insertions(+), 15 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index c2c03b5..9d1d86d 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -301,7 +301,12 @@
 DEFUN(cfg_sgsn_bind_addr, cfg_sgsn_bind_addr_cmd,
"gtp local-ip A.B.C.D",
"GTP Parameters\n"
-   "Set the IP address for the local GTP bind\n"
+   "Set the IP address for the local GTP bind for the Gp interface 
(towards the GGSNs)."
+   " Note: in case you would like to run the GGSN on the same machine as 
the SGSN, you can not run"
+   " both on the same IP address, since both sides are specified to use 
the same GTP port numbers"
+   " (" OSMO_STRINGIFY_VAL(GTP1C_PORT) " and " 
OSMO_STRINGIFY_VAL(GTP1U_PORT) ")."
+   " For example, you could use 127.0.0.1 for the SGSN and 127.0.0.2 for 
the GGSN in such"
+   " situations.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gtp_listenaddr.sin_addr);
@@ -311,7 +316,9 @@
 
 DEFUN(cfg_ggsn_remote_ip, cfg_ggsn_remote_ip_cmd,
"ggsn <0-255> remote-ip A.B.C.D",
-   GGSN_STR "GGSN Number\n" IP_STR "IPv4 Address\n")
+   GGSN_STR "GGSN Number\n"
+   "Configure this static GGSN to use the specified remote IP address.\n"
+   "IPv4 Address\n")
 {
uint32_t id = atoi(argv[0]);
struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id);
@@ -351,7 +358,9 @@
 
 DEFUN(cfg_ggsn_dynamic_lookup, cfg_ggsn_dynamic_lookup_cmd,
"ggsn dynamic",
-   GGSN_STR "Enable dynamic GRX based look-up (requires restart)\n")
+   GGSN_STR
+   "Enable dynamic resolving of GGSNs based on DNS resolving the APN name 
like in a GRX-style setup."
+   " Changing this setting requires a restart.\n")
 {
sgsn->cfg.dynamic_lookup = 1;
return CMD_SUCCESS;
@@ -359,7 +368,8 @@
 
 DEFUN(cfg_grx_ggsn, cfg_grx_ggsn_cmd,
"grx-dns-add A.B.C.D",
-   "Add DNS server\nIPv4 address\n")
+   "Use the specified IP address for DNS-resolving the AP names to GGSN IP 
addresses\n"
+   "IPv4 address\n")
 {
struct ares_addr_node *node = talloc_zero(tall_bsc_ctx, struct 
ares_addr_node);
node->family = AF_INET;
@@ -401,7 +411,7 @@
 DEFUN(cfg_apn_ggsn, cfg_apn_ggsn_cmd,
"apn APNAME ggsn <0-255>",
APN_STR APN_GW_STR
-   "Select the GGSN to use when the APN gateway prefix matches\n"
+   "Select the GGSN to use for the given APN gateway prefix\n"
"The GGSN id")
 {
 
@@ -411,7 +421,8 @@
 DEFUN(cfg_apn_imsi_ggsn, cfg_apn_imsi_ggsn_cmd,
"apn APNAME imsi-prefix IMSIPRE ggsn <0-255>",
APN_STR APN_GW_STR
-   "Restrict rule to a certain IMSI prefix\n"
+   "Select the GGSN to use for the given APN gateway prefix if and only if 
the IMSI matches the"
+   " given prefix.\n"
"An IMSI prefix\n"
"Select the GGSN to use when APN gateway and IMSI prefix match\n"
"The GGSN id")
@@ -634,7 +645,8 @@
 
 DEFUN(cfg_auth_policy, cfg_auth_policy_cmd,
"auth-policy (accept-all|closed|acl-only|remote)",
-   "Autorization Policy of SGSN\n"
+   "Configure the Authorization policy of the SGSN. This setting 
determines which subscribers are"
+   " permitted to register to the network.\n"
"Accept all IMSIs (DANGEROUS)\n"
"Accept only home network subscribers or those in the ACL\n"
"Accept only subscribers in the ACL\n"
@@ -986,7 +998,8 @@
 DEFUN(cfg_gsup_remote_ip, cfg_gsup_remote_ip_cmd,
"gsup remote-ip A.B.C.D",
"GSUP Parameters\n"
-   "Set the IP address of the remote GSUP server\n"
+   "Set the IP address of the remote GSUP server (e.g. OsmoHLR)."
+   " This setting only applies if 'auth-policy remote' is used.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gsup_server_addr.sin_addr);
@@ -997,7 +1010,7 @@
 DEFUN(cfg_gsup_remote_port, cfg_gsup_remote_port_cmd,
"gsup remote-port <0-65535>",
"GSUP Parameters\n"
-   "Set the TCP port of the remote GSUP server\n"
+   "Set the TCP port of the remote GSUP server, see also 'gsup 
remote-ip'\n"
"Remote TCP port\n")
 {
g_cfg->gsup_server_port = atoi(argv[0]);
@@ -1008,7 +1021,9 @@
 

[PATCH] osmo-sgsn[master]: vty: absorb command explanations from osmo-gsm-manuals

2018-03-06 Thread Neels Hofmeyr

Review at  https://gerrit.osmocom.org/7128

vty: absorb command explanations from osmo-gsm-manuals

The osmo-gsm-manuals/vty/sgsn_vty_additions.xml contained many command
explanations that are redundant with the VTY online doc. Some however are more
verbose / easier to understand. Absorb these into the online VTY doc here.

This matches the removal in osmo-gsm-manuals change-id
I71863e5056ad369d2055e9882a52a00fa999ab04.

Change-Id: I35984014424412e91437b7ed71576aef3819cb1e
---
M src/gprs/sgsn_vty.c
1 file changed, 38 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/28/7128/1

diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index c2c03b5..9d1d86d 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -301,7 +301,12 @@
 DEFUN(cfg_sgsn_bind_addr, cfg_sgsn_bind_addr_cmd,
"gtp local-ip A.B.C.D",
"GTP Parameters\n"
-   "Set the IP address for the local GTP bind\n"
+   "Set the IP address for the local GTP bind for the Gp interface 
(towards the GGSNs)."
+   " Note: in case you would like to run the GGSN on the same machine as 
the SGSN, you can not run"
+   " both on the same IP address, since both sides are specified to use 
the same GTP port numbers"
+   " (" OSMO_STRINGIFY_VAL(GTP1C_PORT) " and " 
OSMO_STRINGIFY_VAL(GTP1U_PORT) ")."
+   " For example, you could use 127.0.0.1 for the SGSN and 127.0.0.2 for 
the GGSN in such"
+   " situations.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gtp_listenaddr.sin_addr);
@@ -311,7 +316,9 @@
 
 DEFUN(cfg_ggsn_remote_ip, cfg_ggsn_remote_ip_cmd,
"ggsn <0-255> remote-ip A.B.C.D",
-   GGSN_STR "GGSN Number\n" IP_STR "IPv4 Address\n")
+   GGSN_STR "GGSN Number\n"
+   "Configure this static GGSN to use the specified remote IP address.\n"
+   "IPv4 Address\n")
 {
uint32_t id = atoi(argv[0]);
struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id);
@@ -351,7 +358,9 @@
 
 DEFUN(cfg_ggsn_dynamic_lookup, cfg_ggsn_dynamic_lookup_cmd,
"ggsn dynamic",
-   GGSN_STR "Enable dynamic GRX based look-up (requires restart)\n")
+   GGSN_STR
+   "Enable dynamic resolving of GGSNs based on DNS resolving the APN name 
like in a GRX-style setup."
+   " Changing this setting requires a restart.\n")
 {
sgsn->cfg.dynamic_lookup = 1;
return CMD_SUCCESS;
@@ -359,7 +368,8 @@
 
 DEFUN(cfg_grx_ggsn, cfg_grx_ggsn_cmd,
"grx-dns-add A.B.C.D",
-   "Add DNS server\nIPv4 address\n")
+   "Use the specified IP address for DNS-resolving the AP names to GGSN IP 
addresses\n"
+   "IPv4 address\n")
 {
struct ares_addr_node *node = talloc_zero(tall_bsc_ctx, struct 
ares_addr_node);
node->family = AF_INET;
@@ -401,7 +411,7 @@
 DEFUN(cfg_apn_ggsn, cfg_apn_ggsn_cmd,
"apn APNAME ggsn <0-255>",
APN_STR APN_GW_STR
-   "Select the GGSN to use when the APN gateway prefix matches\n"
+   "Select the GGSN to use for the given APN gateway prefix\n"
"The GGSN id")
 {
 
@@ -411,7 +421,8 @@
 DEFUN(cfg_apn_imsi_ggsn, cfg_apn_imsi_ggsn_cmd,
"apn APNAME imsi-prefix IMSIPRE ggsn <0-255>",
APN_STR APN_GW_STR
-   "Restrict rule to a certain IMSI prefix\n"
+   "Select the GGSN to use for the given APN gateway prefix if and only if 
the IMSI matches the"
+   " given prefix.\n"
"An IMSI prefix\n"
"Select the GGSN to use when APN gateway and IMSI prefix match\n"
"The GGSN id")
@@ -634,7 +645,8 @@
 
 DEFUN(cfg_auth_policy, cfg_auth_policy_cmd,
"auth-policy (accept-all|closed|acl-only|remote)",
-   "Autorization Policy of SGSN\n"
+   "Configure the Authorization policy of the SGSN. This setting 
determines which subscribers are"
+   " permitted to register to the network.\n"
"Accept all IMSIs (DANGEROUS)\n"
"Accept only home network subscribers or those in the ACL\n"
"Accept only subscribers in the ACL\n"
@@ -986,7 +998,8 @@
 DEFUN(cfg_gsup_remote_ip, cfg_gsup_remote_ip_cmd,
"gsup remote-ip A.B.C.D",
"GSUP Parameters\n"
-   "Set the IP address of the remote GSUP server\n"
+   "Set the IP address of the remote GSUP server (e.g. OsmoHLR)."
+   " This setting only applies if 'auth-policy remote' is used.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gsup_server_addr.sin_addr);
@@ -997,7 +1010,7 @@
 DEFUN(cfg_gsup_remote_port, cfg_gsup_remote_port_cmd,
"gsup remote-port <0-65535>",
"GSUP Parameters\n"
-   "Set the TCP port of the remote GSUP server\n"
+   "Set the TCP port of the remote GSUP server, see also 'gsup 
remote-ip'\n"
"Remote TCP port\n")
 {
g_cfg->gsup_server_port = atoi(argv[0]);
@@ -1008,7 +1021,9 @@
 DEFUN(cfg_gsup_oap_id, cfg_gsup_oap_id_cmd,
"gsup oap-id <0-65535>",
"GSUP Parameters\n"
-   "Set the SGSN's OAP client ID\nOAP client ID (0 == disabled)\n")
+