diff options
author | 2020-04-01 15:42:06 +0200 | |
---|---|---|
committer | 2020-04-03 11:26:28 +0000 | |
commit | 4fce36b8f9922d979ad72d89fb891bff0c4483ad (patch) | |
tree | b5da648c00ce3014ce728445a889966a4063c629 /src/vpp | |
parent | b32436aab9626cb8b7bc4099142135c5c9e19beb (diff) |
ip: remove vl_api_address_family_t byte order swap
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I8074db3623ee4b37ac70ce8ea0d1912b97e5c059
Diffstat (limited to 'src/vpp')
-rw-r--r-- | src/vpp/api/types.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vpp/api/types.c b/src/vpp/api/types.c index 92905c260d2..a30736fbb9f 100644 --- a/src/vpp/api/types.c +++ b/src/vpp/api/types.c @@ -27,7 +27,7 @@ format_vl_api_address_family (u8 * s, va_list * args) { vl_api_address_family_t af = va_arg (*args, int); - if (ADDRESS_IP6 == clib_net_to_host_u32 (af)) + if (ADDRESS_IP6 == af) s = format (s, "ip4"); else s = format (s, "ip6"); @@ -40,7 +40,7 @@ format_vl_api_address (u8 * s, va_list * args) { const vl_api_address_t *addr = va_arg (*args, vl_api_address_t *); - if (ADDRESS_IP6 == clib_net_to_host_u32 (addr->af)) + if (ADDRESS_IP6 == addr->af) s = format (s, "%U", format_ip6_address, addr->un.ip6); else s = format (s, "%U", format_ip4_address, addr->un.ip4); @@ -130,9 +130,9 @@ unformat_vl_api_address (unformat_input_t * input, va_list * args) vl_api_address_t *ip = va_arg (*args, vl_api_address_t *); if (unformat (input, "%U", unformat_ip4_address, &ip->un.ip4)) - ip->af = clib_host_to_net_u32(ADDRESS_IP4); + ip->af = ADDRESS_IP4; else if (unformat (input, "%U", unformat_ip6_address, &ip->un.ip6)) - ip->af = clib_host_to_net_u32(ADDRESS_IP6); + ip->af = ADDRESS_IP6; else return (0); @@ -146,9 +146,9 @@ unformat_vl_api_address_family (unformat_input_t * input, vl_api_address_family_t *af = va_arg (*args, vl_api_address_family_t *); if (unformat (input, "ip4") || unformat (input, "ipv4")) - *af = clib_host_to_net_u32(ADDRESS_IP4); + *af = ADDRESS_IP4; else if (unformat (input, "ip6") || unformat (input, "ipv6")) - *af = clib_host_to_net_u32(ADDRESS_IP6); + *af = ADDRESS_IP6; else return (0); |