IP-neighbor: add and delete internal API
Change-Id: I4d1ab5ff0c8f0756e91bf63e045f88513bb7d039
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h
index 6207400..ea2fa15 100644
--- a/src/vnet/ip/ip6_packet.h
+++ b/src/vnet/ip/ip6_packet.h
@@ -93,6 +93,8 @@
#define ip46_address_is_zero(ip46) (((ip46)->as_u64[0] == 0) && ((ip46)->as_u64[1] == 0))
#define ip46_address_is_equal(a1, a2) (((a1)->as_u64[0] == (a2)->as_u64[0]) \
&& ((a1)->as_u64[1] == (a2)->as_u64[1]))
+#define ip46_address_initializer {{{ 0 }}}
+
static_always_inline void
ip46_address_copy (ip46_address_t * dst, const ip46_address_t * src)
{
@@ -100,7 +102,12 @@
dst->as_u64[1] = src->as_u64[1];
}
-#define ip46_address_initializer {{{ 0 }}}
+static_always_inline void
+ip46_address_set_ip6 (ip46_address_t * dst, const ip6_address_t * src)
+{
+ dst->as_u64[0] = src->as_u64[0];
+ dst->as_u64[1] = src->as_u64[1];
+}
always_inline ip46_address_t
to_ip46 (u32 is_ipv6, u8 * buf)