diff options
Diffstat (limited to 'src/vnet/ip/ip.c')
-rw-r--r-- | src/vnet/ip/ip.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c index 5d0c7707dd3..586f7dfbc85 100644 --- a/src/vnet/ip/ip.c +++ b/src/vnet/ip/ip.c @@ -18,6 +18,20 @@ u32 ip_flow_hash_router_id; +ethernet_type_t +ip_address_family_to_ether_type (ip_address_family_t af) +{ + switch (af) + { + case AF_IP4: + return (ETHERNET_TYPE_IP4); + case AF_IP6: + return (ETHERNET_TYPE_IP6); + } + ASSERT (0); + return (ETHERNET_TYPE_IP4); +} + u8 ip_is_zero (ip46_address_t * ip46_address, u8 is_ip4) { @@ -104,7 +118,6 @@ ip_set (ip46_address_t * dst, void *src, u8 is_ip4) sizeof (ip6_address_t)); } -/* *INDENT-OFF* */ static const char *ip_arc_names[N_IP_FEATURE_LOCATIONS][N_AF][N_SAFI] = { [IP_FEATURE_INPUT] = { [AF_IP4] = { @@ -157,7 +170,6 @@ static const char *ip_arc_names[N_IP_FEATURE_LOCATIONS][N_AF][N_SAFI] = { }, }, }; -/* *INDENT-ON* */ void ip_feature_enable_disable (ip_address_family_t af, @@ -189,7 +201,8 @@ ip_feature_enable_disable (ip_address_family_t af, } int -ip_flow_hash_set (ip_address_family_t af, u32 table_id, u32 flow_hash_config) +ip_flow_hash_set (ip_address_family_t af, u32 table_id, + flow_hash_config_t flow_hash_config) { fib_protocol_t fproto; u32 fib_index; |