summaryrefslogtreecommitdiffstats
path: root/src/vat/api_format.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-11-12 17:16:47 +0000
committerFlorin Coras <florin.coras@gmail.com>2019-11-12 18:56:04 +0000
commitea93e48cf6e918937422638cb574964b88a146b6 (patch)
treec35f8c921a8a9175b0dbf89e3e0775abc433e521 /src/vat/api_format.c
parentc046d709e1e493d20fee80f8c23b4106be67a98e (diff)
ip: IP address and prefix types (moved from LISP)
Type: refactor Change-Id: I2c6b59013bfd21136a2955442c779685f951932b Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vat/api_format.c')
-rw-r--r--src/vat/api_format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 482575a66bf..e1e8bfee57a 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -16278,13 +16278,13 @@ api_one_use_petr (vat_main_t * vam)
if (unformat (input, "%U", unformat_ip4_address, &ip_addr_v4 (&ip)))
{
is_add = 1;
- ip_addr_version (&ip) = IP4;
+ ip_addr_version (&ip) = AF_IP4;
}
else
if (unformat (input, "%U", unformat_ip6_address, &ip_addr_v6 (&ip)))
{
is_add = 1;
- ip_addr_version (&ip) = IP6;
+ ip_addr_version (&ip) = AF_IP6;
}
else
{
@@ -16298,7 +16298,7 @@ api_one_use_petr (vat_main_t * vam)
mp->is_add = is_add;
if (is_add)
{
- mp->is_ip4 = ip_addr_version (&ip) == IP4 ? 1 : 0;
+ mp->is_ip4 = ip_addr_version (&ip) == AF_IP4 ? 1 : 0;
if (mp->is_ip4)
clib_memcpy (mp->address, &ip, 4);
else