aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-06-06 14:07:55 -0400
committerNeale Ranns <nranns@cisco.com>2019-06-26 11:36:57 +0000
commitab05508e1eb96749b68de8ccd2f6f88ff3e64fad (patch)
tree05f290dfff68a24810d0a3bdb2f7227ac4608114 /src/vnet
parent941da4a224bbfc153bfe7c2344ae00e294d92798 (diff)
api: refactor format_vl_api_prefix_t return keys
format_vl_api_prefix_t returns a dict with keys 'address' and 'address_length', but other format_vl_api_prefix functions return a dict with 'prefix', and 'len'. Refactor all format_vl_api_prefix_t to return consistent keys 'address' and 'len'. Type: refactor Change-Id: I5f9558fc2da8742a303266e011102f5b2db80aad Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/ip_types.api6
-rw-r--r--src/vnet/ip/ip_types_api.c4
-rw-r--r--src/vnet/ipip/ipip_api.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/ip/ip_types.api b/src/vnet/ip/ip_types.api
index 4c685670d5e..b962e1a6f31 100644
--- a/src/vnet/ip/ip_types.api
+++ b/src/vnet/ip/ip_types.api
@@ -41,7 +41,7 @@ typedef address {
typedef prefix {
vl_api_address_t address;
- u8 address_length;
+ u8 len;
};
typedef mprefix {
@@ -52,11 +52,11 @@ typedef mprefix {
};
typedef ip6_prefix {
- vl_api_ip6_address_t prefix;
+ vl_api_ip6_address_t address;
u8 len;
};
typedef ip4_prefix {
- vl_api_ip4_address_t prefix;
+ vl_api_ip4_address_t address;
u8 len;
};
diff --git a/src/vnet/ip/ip_types_api.c b/src/vnet/ip/ip_types_api.c
index 6ad2c366dff..0343d2001ad 100644
--- a/src/vnet/ip/ip_types_api.c
+++ b/src/vnet/ip/ip_types_api.c
@@ -196,7 +196,7 @@ ip_prefix_decode (const vl_api_prefix_t * in, fib_prefix_t * out)
out->fp_proto = FIB_PROTOCOL_IP6;
break;
}
- out->fp_len = in->address_length;
+ out->fp_len = in->len;
out->___fp___pad = 0;
ip_address_decode (&in->address, &out->fp_addr);
}
@@ -204,7 +204,7 @@ ip_prefix_decode (const vl_api_prefix_t * in, fib_prefix_t * out)
void
ip_prefix_encode (const fib_prefix_t * in, vl_api_prefix_t * out)
{
- out->address_length = in->fp_len;
+ out->len = in->fp_len;
ip_address_encode (&in->fp_addr,
fib_proto_to_ip46 (in->fp_proto), &out->address);
}
diff --git a/src/vnet/ipip/ipip_api.c b/src/vnet/ipip/ipip_api.c
index 62a99659eee..d88047560a9 100644
--- a/src/vnet/ipip/ipip_api.c
+++ b/src/vnet/ipip/ipip_api.c
@@ -180,9 +180,9 @@ vl_api_ipip_6rd_add_tunnel_t_handler (vl_api_ipip_6rd_add_tunnel_t * mp)
}
else
{
- rv = sixrd_add_tunnel ((ip6_address_t *) & mp->ip6_prefix.prefix,
+ rv = sixrd_add_tunnel ((ip6_address_t *) & mp->ip6_prefix.address,
mp->ip6_prefix.len,
- (ip4_address_t *) & mp->ip4_prefix.prefix,
+ (ip4_address_t *) & mp->ip4_prefix.address,
mp->ip4_prefix.len,
(ip4_address_t *) & mp->ip4_src,
mp->security_check,