summaryrefslogtreecommitdiff
path: root/lib/bfd.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-06-27 18:47:03 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-06-27 19:04:41 +0000
commitfacfee22f55631992113af5606cf8ade069684b3 (patch)
treeb7ca477d3a90724929f2af749b09bdd6306ae8a6 /lib/bfd.c
parent5ce1d8b118ae85765d135aaf06bf04a554607d12 (diff)
*: remove VTY_GET_*
CLI validates input tokens, so there's no need to do it in handler functions anymore. spatch follows ---------------- @getull@ expression v; expression str; @@ <... - VTY_GET_ULL(..., v, str) + v = strtoull (str, NULL, 10) ...> @getul@ expression v; expression str; @@ <... - VTY_GET_ULONG(..., v, str) + v = strtoul (str, NULL, 10) ...> @getintrange@ expression name; expression v; expression str; @@ <... - VTY_GET_INTEGER_RANGE(name, v, str, ...) + v = strtoul (str, NULL, 10) ...> @getint@ expression v; expression str; @@ <... - VTY_GET_INTEGER(..., v, str) + v = strtoul (str, NULL, 10) ...> @getv4@ expression v; expression str; @@ <... - VTY_GET_IPV4_ADDRESS(..., v, str) + inet_aton (str, &v) ...> @getv4pfx@ expression v; expression str; @@ <... - VTY_GET_IPV4_PREFIX(..., v, str) + str2prefix_ipv4 (str, &v) ...> Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/bfd.c')
-rw-r--r--lib/bfd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index 217fc09722..99d13c2597 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -93,12 +93,9 @@ bfd_validate_param(struct vty *vty, const char *dm_str, const char *rx_str,
const char *tx_str, u_int8_t *dm_val, u_int32_t *rx_val,
u_int32_t *tx_val)
{
- VTY_GET_INTEGER_RANGE ("detect-mul", *dm_val, dm_str,
- BFD_MIN_DETECT_MULT, BFD_MAX_DETECT_MULT);
- VTY_GET_INTEGER_RANGE ("min-rx", *rx_val, rx_str,
- BFD_MIN_MIN_RX, BFD_MAX_MIN_RX);
- VTY_GET_INTEGER_RANGE ("min-tx", *tx_val, tx_str,
- BFD_MIN_MIN_TX, BFD_MAX_MIN_TX);
+ *dm_val = strtoul(dm_str, NULL, 10);
+ *rx_val = strtoul(rx_str, NULL, 10);
+ *tx_val = strtoul(tx_str, NULL, 10);
return CMD_SUCCESS;
}