vppinfra: make _vec_len() read-only
[vpp.git] / src / vnet / ipsec / ipsec_tun.h
index b8e80d3..9d8a124 100644 (file)
 
 #include <vnet/ipsec/ipsec.h>
 
-#define foreach_ipsec_protect_flags \
-  _(L2, 1, "l2")                    \
-  _(ENCAPED, 2, "encapped")         \
-  _(ITF, 4, "itf")                  \
+#define foreach_ipsec_protect_flags                                           \
+  _ (L2, 1, "l2")                                                             \
+  _ (ENCAPED, 2, "encapped")                                                  \
+  _ (ITF, 4, "itf")                                                           \
+  _ (FEAT, 8, "feat")
 
 typedef enum ipsec_protect_flags_t_
 {
@@ -143,16 +144,9 @@ typedef struct ipsec_tun_protect_t_
   }                                                        \
 }
 
-extern int ipsec_tun_protect_update_one (u32 sw_if_index,
-                                        const ip_address_t * nh,
-                                        u32 sa_out, u32 sa_in);
 extern int ipsec_tun_protect_update (u32 sw_if_index,
                                     const ip_address_t * nh,
                                     u32 sa_out, u32 * sa_ins);
-extern int ipsec_tun_protect_update_in (u32 sw_if_index,
-                                       const ip_address_t * nh, u32 sa_in);
-extern int ipsec_tun_protect_update_out (u32 sw_if_index,
-                                        const ip_address_t * nh, u32 sa_out);
 
 extern int ipsec_tun_protect_del (u32 sw_if_index, const ip_address_t * nh);
 
@@ -169,12 +163,8 @@ extern u8 *format_ipsec_tun_protect_index (u8 * s, va_list * args);
 extern void ipsec_tun_register_nodes (ip_address_family_t af);
 extern void ipsec_tun_unregister_nodes (ip_address_family_t af);
 
-extern void ipsec_tun_table_init (ip_address_family_t af,
-                                 uword table_size, u32 n_buckets);
-
-// FIXME
-extern vlib_node_registration_t ipsec4_tun_input_node;
-extern vlib_node_registration_t ipsec6_tun_input_node;
+extern void ipsec_tun_table_init (ip_address_family_t af, uword table_size,
+                                 u32 n_buckets);
 
 /*
  * DP API
@@ -192,7 +182,6 @@ always_inline index_t
 ipsec_tun_protect_get_sa_out (adj_index_t ai)
 {
   ASSERT (vec_len (ipsec_tun_protect_sa_by_adj_index) > ai);
-  ASSERT (INDEX_INVALID != ipsec_tun_protect_sa_by_adj_index[ai]);
 
   return (ipsec_tun_protect_sa_by_adj_index[ai]);
 }