diff options
author | 2020-11-20 13:05:59 +0000 | |
---|---|---|
committer | 2020-11-25 12:57:16 +0000 | |
commit | 4ac36bcb190b85e6541d27072157fdcee42bee23 (patch) | |
tree | 8c3da48e217bcef492b56deacd2e3c333ff5a683 /src/vnet/ip-neighbor/ip_neighbor_types.c | |
parent | 38340fa32c96e9c6cb1593f03117dd504efbd5f4 (diff) |
ip-neighbor: Send API event when neighbor is removed
Type: fix
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I9952497a108bac26445af95c28d4eed46099c2fc
Diffstat (limited to 'src/vnet/ip-neighbor/ip_neighbor_types.c')
-rw-r--r-- | src/vnet/ip-neighbor/ip_neighbor_types.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnet/ip-neighbor/ip_neighbor_types.c b/src/vnet/ip-neighbor/ip_neighbor_types.c index c18e4948c43..76fbc5ac8a9 100644 --- a/src/vnet/ip-neighbor/ip_neighbor_types.c +++ b/src/vnet/ip-neighbor/ip_neighbor_types.c @@ -17,6 +17,21 @@ #include <vnet/ip-neighbor/ip_neighbor_types.h> +void +ip_neighbor_clone (const ip_neighbor_t * ipn, ip_neighbor_t * clone) +{ + clib_memcpy (clone, ipn, sizeof (*ipn)); + + clone->ipn_key = clib_mem_alloc (sizeof (ip_neighbor_key_t)); + clib_memcpy (clone->ipn_key, ipn->ipn_key, sizeof (ip_neighbor_key_t)); +} + +void +ip_neighbor_free (ip_neighbor_t * ipn) +{ + clib_mem_free (ipn->ipn_key); +} + u8 * format_ip_neighbor_flags (u8 * s, va_list * args) { |