mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 13:06:51 +00:00
lib: reformat vty.h
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
a4b2b61027
commit
0157c32771
42
lib/vty.h
42
lib/vty.h
@ -231,33 +231,33 @@ do { \
|
|||||||
VTY_GET_INTEGER_RANGE_HEART(NAME,tmpl,STR,MIN,MAX); \
|
VTY_GET_INTEGER_RANGE_HEART(NAME,tmpl,STR,MIN,MAX); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define VTY_GET_INTEGER(NAME,V,STR) \
|
#define VTY_GET_INTEGER(NAME,V,STR) \
|
||||||
VTY_GET_INTEGER_RANGE(NAME,V,STR,0U,UINT32_MAX)
|
VTY_GET_INTEGER_RANGE(NAME,V,STR,0U,UINT32_MAX)
|
||||||
|
|
||||||
#define VTY_GET_IPV4_ADDRESS(NAME,V,STR) \
|
#define VTY_GET_IPV4_ADDRESS(NAME,V,STR) \
|
||||||
do { \
|
do { \
|
||||||
int retv; \
|
int retv; \
|
||||||
retv = inet_aton ((STR), &(V)); \
|
retv = inet_aton ((STR), &(V)); \
|
||||||
if (!retv) \
|
if (!retv) \
|
||||||
{ \
|
{ \
|
||||||
vty_out (vty, "%% Invalid %s value%s", NAME, VTY_NEWLINE); \
|
vty_out (vty, "%% Invalid %s value%s", NAME, VTY_NEWLINE); \
|
||||||
return CMD_WARNING; \
|
return CMD_WARNING; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define VTY_GET_IPV4_PREFIX(NAME,V,STR) \
|
#define VTY_GET_IPV4_PREFIX(NAME,V,STR) \
|
||||||
do { \
|
do { \
|
||||||
int retv; \
|
int retv; \
|
||||||
retv = str2prefix_ipv4 ((STR), &(V)); \
|
retv = str2prefix_ipv4 ((STR), &(V)); \
|
||||||
if (retv <= 0) \
|
if (retv <= 0) \
|
||||||
{ \
|
{ \
|
||||||
vty_out (vty, "%% Invalid %s value%s", NAME, VTY_NEWLINE); \
|
vty_out (vty, "%% Invalid %s value%s", NAME, VTY_NEWLINE); \
|
||||||
return CMD_WARNING; \
|
return CMD_WARNING; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define VTY_WARN_EXPERIMENTAL() \
|
#define VTY_WARN_EXPERIMENTAL() \
|
||||||
do { \
|
do { \
|
||||||
vty_out (vty, "%% WARNING: this command is experimental. Both its name and" \
|
vty_out (vty, "%% WARNING: this command is experimental. Both its name and" \
|
||||||
" parameters may%s%% change in a future version of Quagga," \
|
" parameters may%s%% change in a future version of Quagga," \
|
||||||
" possibly breaking your configuration!%s", \
|
" possibly breaking your configuration!%s", \
|
||||||
|
Loading…
Reference in New Issue
Block a user