aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat_api.c
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/plugins/nat/nat_api.c
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/plugins/nat/nat_api.c')
-rw-r--r--src/plugins/nat/nat_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/nat/nat_api.c b/src/plugins/nat/nat_api.c
index 1dad4e42728..9cb27448fdf 100644
--- a/src/plugins/nat/nat_api.c
+++ b/src/plugins/nat/nat_api.c
@@ -3007,7 +3007,7 @@ vl_api_nat64_add_del_prefix_t_handler (vl_api_nat64_add_del_prefix_t * mp)
ip6_address_t prefix;
int rv = 0;
- memcpy (&prefix.as_u8, mp->prefix.prefix, 16);
+ memcpy (&prefix.as_u8, mp->prefix.address, 16);
rv =
nat64_add_del_prefix (&prefix, mp->prefix.len,
@@ -3022,7 +3022,7 @@ vl_api_nat64_add_del_prefix_t_print (vl_api_nat64_add_del_prefix_t * mp,
u8 *s;
s = format (0, "SCRIPT: nat64_add_del_prefix %U/%u vrf_id %u %s\n",
- format_ip6_address, mp->prefix.prefix, mp->prefix.len,
+ format_ip6_address, mp->prefix.address, mp->prefix.len,
ntohl (mp->vrf_id), mp->is_add ? "" : "del");
FINISH;
@@ -3038,7 +3038,7 @@ nat64_api_prefix_walk (nat64_prefix_t * p, void *arg)
rmp = vl_msg_api_alloc (sizeof (*rmp));
clib_memset (rmp, 0, sizeof (*rmp));
rmp->_vl_msg_id = ntohs (VL_API_NAT64_PREFIX_DETAILS + sm->msg_id_base);
- clib_memcpy (rmp->prefix.prefix, &(p->prefix), 16);
+ clib_memcpy (rmp->prefix.address, &(p->prefix), 16);
rmp->prefix.len = p->plen;
rmp->vrf_id = ntohl (p->vrf_id);
rmp->context = ctx->context;