-/*
- * sixrd_get_addr
- */
-static_always_inline u32
-sixrd_get_addr_net (const sixrd_tunnel_t * t, u64 dal)
-{
- /* 1:1 mode */
- if (t->ip4_prefix_len == 32)
- return (t->ip4_prefix.as_u32);
-
- dal = clib_net_to_host_u64 (dal);
-
- /* Grab 32 - ip4_prefix_len bits out of IPv6 address from offset
- * ip6_prefix_len */
- u32 mask = ~(~0ULL << (32 - t->ip4_prefix_len));
- u32 ip4 =
- clib_net_to_host_u32 (t->
- ip4_prefix.as_u32) | ((u32) (dal >> t->
- shift) & mask);
- return clib_host_to_net_u32 (ip4);
-}
-