vcl: RX event may lost when accept session repeatedly
[vpp.git] / src / vnet / ip / ip_neighbor.h
index d2790bc..d370dde 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * ip_neighboor.h: ip neighbor generic services
+ * ip_neighbor.h: ip neighbor generic services
  *
  * Copyright (c) 2018 Cisco and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,11 +30,30 @@ typedef struct
   u8 max_proc_time;            /* max processing time per run, in usecs */
   u8 max_update;               /* max probe/delete operations per run */
   u8 scan_int_delay;           /* delay in msecs, to resume scan on max */
-  u8 stale_threshold;          /* Threashold in minutes to delete nei entry */
+  u8 stale_threshold;          /* Threshold in minutes to delete nei entry */
 } ip_neighbor_scan_arg_t;
 
 void ip_neighbor_scan_enable_disable (ip_neighbor_scan_arg_t * arg);
 
+typedef enum ip_neighbor_flags_t_
+{
+  IP_NEIGHBOR_FLAG_NONE = 0,
+  IP_NEIGHBOR_FLAG_STATIC = (1 << 0),
+  IP_NEIGHBOR_FLAG_DYNAMIC = (1 << 1),
+  IP_NEIGHBOR_FLAG_NO_FIB_ENTRY = (1 << 2),
+} __attribute__ ((packed)) ip_neighbor_flags_t;
+
+extern u8 *format_ip_neighbor_flags (u8 * s, va_list * args);
+
+extern int ip_neighbor_add (const ip46_address_t * ip,
+                           ip46_type_t type,
+                           const mac_address_t * mac,
+                           u32 sw_if_index,
+                           ip_neighbor_flags_t flags, u32 * stats_index);
+
+extern int ip_neighbor_del (const ip46_address_t * ip,
+                           ip46_type_t type, u32 sw_if_index);
+
 #endif /* included_ip_neighbor_h */
 
 /*