aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip_types.c7
-rw-r--r--src/vnet/ip/ip_types.h3
2 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/ip/ip_types.c b/src/vnet/ip/ip_types.c
index 8f9f012ad77..3e5ecebf142 100644
--- a/src/vnet/ip/ip_types.c
+++ b/src/vnet/ip/ip_types.c
@@ -203,13 +203,12 @@ ip_address_family_to_link_type (ip_address_family_t af)
return (VNET_LINK_IP4);
}
-
void
-ip_address_set (ip_address_t * dst, const void *src, u8 version)
+ip_address_set (ip_address_t *dst, const void *src, ip_address_family_t af)
{
- ip_addr_version (dst) = version;
+ ip_addr_version (dst) = af;
- switch (version)
+ switch (af)
{
case AF_IP4:
ip_addr_v4 (dst) = *(ip4_address_t *) src;
diff --git a/src/vnet/ip/ip_types.h b/src/vnet/ip/ip_types.h
index fa1f0fe0952..83a0f6adc72 100644
--- a/src/vnet/ip/ip_types.h
+++ b/src/vnet/ip/ip_types.h
@@ -99,7 +99,8 @@ extern int ip_address_cmp (const ip_address_t * ip1,
const ip_address_t * ip2);
extern void ip_address_copy (ip_address_t * dst, const ip_address_t * src);
extern void ip_address_copy_addr (void *dst, const ip_address_t * src);
-extern void ip_address_set (ip_address_t * dst, const void *src, u8 version);
+extern void ip_address_set (ip_address_t *dst, const void *src,
+ ip_address_family_t version);
extern u16 ip_address_size (const ip_address_t * a);
extern u16 ip_version_to_size (ip_address_family_t af);
extern u8 *format_ip_address (u8 * s, va_list * args);