ip: change ip API enums address_family and ip_proto size to u8
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I73d27520726543d6375caad76a841339f68c3533
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
diff --git a/src/vnet/udp/udp_api.c b/src/vnet/udp/udp_api.c
index 522b0a8..566acbc 100644
--- a/src/vnet/udp/udp_api.c
+++ b/src/vnet/udp/udp_api.c
@@ -61,8 +61,8 @@
&ue->ue_hdrs.ip4.ue_ip4.src_address, 4);
clib_memcpy (&mp->udp_encap.dst_ip.un.ip4,
&ue->ue_hdrs.ip4.ue_ip4.dst_address, 4);
- mp->udp_encap.dst_ip.af = clib_host_to_net_u32 (ADDRESS_IP4);
- mp->udp_encap.src_ip.af = clib_host_to_net_u32 (ADDRESS_IP4);
+ mp->udp_encap.dst_ip.af = ip_address_family_encode (AF_IP4);
+ mp->udp_encap.src_ip.af = ip_address_family_encode (AF_IP4);
/* ports aren't byte swapped because they are stored in network
* byte order */
@@ -75,8 +75,8 @@
&ue->ue_hdrs.ip6.ue_ip6.src_address, 16);
clib_memcpy (&mp->udp_encap.dst_ip.un.ip6,
&ue->ue_hdrs.ip6.ue_ip6.dst_address, 16);
- mp->udp_encap.dst_ip.af = clib_host_to_net_u32 (ADDRESS_IP6);
- mp->udp_encap.src_ip.af = clib_host_to_net_u32 (ADDRESS_IP6);
+ mp->udp_encap.dst_ip.af = ip_address_family_encode (AF_IP6);
+ mp->udp_encap.src_ip.af = ip_address_family_encode (AF_IP6);
/* ports aren't byte swapped because they are stored in network
* byte order */