laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/19139 )

Change subject: vty: add a define VTY_IPV46_CMD to require a IPv4/6 address
......................................................................

vty: add a define VTY_IPV46_CMD to require a IPv4/6 address

Allow to use this define in vty definitions when a IPV4/6 address
is required as argument.

Change-Id: I86e399aea86b68b48e627f11e1de48fdfad16525
---
M include/osmocom/vty/command.h
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve



diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 88490f7..29206ce 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -304,6 +304,10 @@
 #define CMD_IPV6(S)        ((strcmp ((S), "X:X::X:X") == 0))
 #define CMD_IPV6_PREFIX(S) ((strcmp ((S), "X:X::X:X/M") == 0))

+#define VTY_IPV4_CMD "A.B.C.D"
+#define VTY_IPV6_CMD "X:X::X:X"
+#define VTY_IPV46_CMD "(" VTY_IPV4_CMD "|" VTY_IPV6_CMD ")"
+
 /* Common descriptions. */
 #define SHOW_STR "Show running system information\n"
 #define IP_STR "IP information\n"

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/19139
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I86e399aea86b68b48e627f11e1de48fdfad16525
Gerrit-Change-Number: 19139
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to