diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2020-06-08 00:28:36 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2020-07-28 13:58:48 +0200 |
commit | 99c538e4be5eae063fe8943d1bedeec665498370 (patch) | |
tree | 5509c2940229458f182f53b9feb21313aea19e5e | |
parent | b20d852a95b8f90018e80ef16995c613a5f251f2 (diff) |
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
-rw-r--r-- | include/osmocom/vty/command.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 88490f79..29206ceb 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -304,6 +304,10 @@ struct desc { #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" |