pespin has uploaded this change for review.

View Change

vty: Use libosmocore defines for IPv4 and IPv6 addresses

Change-Id: I25cad316739600dce6c5c31e1a813c614c399f3f
---
M src/osmo-pfcp-tool/pfcp_tool_vty.c
M src/osmo-upf/upf_vty.c
M tests/upf.vty
3 files changed, 13 insertions(+), 12 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/91/44091/1
diff --git a/src/osmo-pfcp-tool/pfcp_tool_vty.c b/src/osmo-pfcp-tool/pfcp_tool_vty.c
index 7f68ccf..ccaaa8a 100644
--- a/src/osmo-pfcp-tool/pfcp_tool_vty.c
+++ b/src/osmo-pfcp-tool/pfcp_tool_vty.c
@@ -42,9 +42,9 @@
};

DEFUN(c_local_addr, c_local_addr_cmd,
- "local-addr IP_ADDR",
+ "local-addr " VTY_IPV46_CMD,
"Set the local IP address to bind on for PFCP; see also 'listen'\n"
- "IP address\n")
+ "IPv4 address\n" "IPv6 address\n")
{
if (g_pfcp_tool->ep != NULL) {
vty_out(vty, "Already listening on %s%s",
diff --git a/src/osmo-upf/upf_vty.c b/src/osmo-upf/upf_vty.c
index 5636cbd..1ce6cc0 100644
--- a/src/osmo-upf/upf_vty.c
+++ b/src/osmo-upf/upf_vty.c
@@ -76,19 +76,18 @@
}

DEFUN(cfg_pfcp_local_addr, cfg_pfcp_local_addr_cmd,
- "local-addr IP_ADDR",
+ "local-addr " VTY_IPV46_CMD,
"Set the local IP address to bind on for PFCP\n"
- "IP address\n")
+ "IPv4 address\n" "IPv6 address\n")
{
osmo_talloc_replace_string(g_upf, &pfcp_vty.local_addr, argv[0]);
return CMD_SUCCESS;
}

DEFUN(cfg_pfcp_node_id, cfg_pfcp_node_id_cmd,
- "node-id (IP_ADDR|FQDN)",
+ "node-id (" VTY_IPV4_CMD "|" VTY_IPV6_CMD "|FQDN)",
"Set the local Node ID to transmit over PFCP\n"
- "IPv4 or IPv6 address\n"
- "FQDN\n")
+ "IPv4 address\n" "IPv6 address\n" "FQDN\n")
{
osmo_talloc_replace_string(g_upf, &pfcp_vty.node_id, argv[0]);
return CMD_SUCCESS;
diff --git a/tests/upf.vty b/tests/upf.vty
index 88ce626..275e232 100644
--- a/tests/upf.vty
+++ b/tests/upf.vty
@@ -6,16 +6,18 @@
OsmoUPF(config)# pfcp
OsmoUPF(config-pfcp)# list
...
- local-addr IP_ADDR
- node-id (IP_ADDR|FQDN)
+ local-addr (A.B.C.D|X:X::X:X)
+ node-id (A.B.C.D|X:X::X:X|FQDN)
OsmoUPF(config-pfcp)# local-addr?
local-addr Set the local IP address to bind on for PFCP
OsmoUPF(config-pfcp)# local-addr ?
- IP_ADDR IP address
+ A.B.C.D IPv4 address
+ X:X::X:X IPv6 address
OsmoUPF(config-pfcp)# node-id ?
node-id
- IP_ADDR IPv4 or IPv6 address
- FQDN FQDN
+ A.B.C.D IPv4 address
+ X:X::X:X IPv6 address
+ FQDN FQDN
OsmoUPF(config-pfcp)# exit

OsmoUPF(config)# # ensure its old name "gtp" enters the tunend node

To view, visit change 44091. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I25cad316739600dce6c5c31e1a813c614c399f3f
Gerrit-Change-Number: 44091
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>