ip: save fib index for buffer in ip lookup
[vpp.git] / src / vnet / ip / lookup.h
index 90c6a25..ecabd81 100644 (file)
@@ -93,9 +93,6 @@ typedef struct
   /* Interface which has this address. */
   u32 sw_if_index;
 
-  /* Adjacency for neighbor probe (ARP) for this interface address. */
-  u32 neighbor_probe_adj_index;
-
   /* Address (prefix) length for this interface. */
   u16 address_length;
 
@@ -214,6 +211,28 @@ do {                                                                    \
 } while (0)
 /* *INDENT-ON* */
 
+always_inline void
+ip_lookup_set_buffer_fib_index (u32 * fib_index_by_sw_if_index,
+                               vlib_buffer_t * b)
+{
+  vnet_buffer (b)->ip.fib_index =
+    vec_elt (fib_index_by_sw_if_index, vnet_buffer (b)->sw_if_index[VLIB_RX]);
+  vnet_buffer (b)->ip.fib_index =
+    (vnet_buffer (b)->sw_if_index[VLIB_TX] ==
+     (u32) ~ 0) ? vnet_buffer (b)->ip.
+    fib_index : vnet_buffer (b)->sw_if_index[VLIB_TX];
+}
+
+typedef struct _vnet_ip_container_proxy_args
+{
+  fib_prefix_t prefix;
+  u32 sw_if_index;
+  u8 is_add;
+} vnet_ip_container_proxy_args_t;
+
+clib_error_t *vnet_ip_container_proxy_add_del (vnet_ip_container_proxy_args_t
+                                              * args);
+
 void ip_lookup_init (ip_lookup_main_t * lm, u32 ip_lookup_node_index);
 
 #endif /* included_ip_lookup_h */