summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_packet.h
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-09-07 11:04:52 -0700
committerDamjan Marion <dmarion@me.com>2018-09-13 00:32:57 +0000
commit0bdd319b3b5d7d4037605f9baba8889d30bd1717 (patch)
treeb2fee9d4c96dfa6a72d138de865a6b04325275e4 /src/vnet/ip/ip6_packet.h
parent9ce6a21aaa76cd40c95ebbcb5fc6e48a8f5dfdb9 (diff)
IP-neighbor: add and delete internal API
Change-Id: I4d1ab5ff0c8f0756e91bf63e045f88513bb7d039 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip6_packet.h')
-rw-r--r--src/vnet/ip/ip6_packet.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h
index 620740061c1..ea2fa155b5e 100644
--- a/src/vnet/ip/ip6_packet.h
+++ b/src/vnet/ip/ip6_packet.h
@@ -93,6 +93,8 @@ typedef CLIB_PACKED (union {
#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 @@ ip46_address_copy (ip46_address_t * dst, const ip46_address_t * src)
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)