VPP-25 Add API for GRE tunnel create/delete/show.
Add API methods to create, delete and show GRE tunnels.
Also add missing CLI functionality for deleting and listing
configured tunnels.
Change-Id: I7565966037d94ade07938e4ff0d9333419716857
Signed-off-by: Chris Luke <chrisy@flirble.org>
diff --git a/vnet/vnet/gre/gre.h b/vnet/vnet/gre/gre.h
index de9db32..6cbe4aa 100644
--- a/vnet/vnet/gre/gre.h
+++ b/vnet/vnet/gre/gre.h
@@ -54,6 +54,7 @@
ip4_address_t tunnel_dst;
u32 outer_fib_index;
u32 hw_if_index;
+ u32 sw_if_index;
} gre_tunnel_t;
typedef struct {
@@ -67,6 +68,12 @@
/* Hash mapping src/dst addr pair to tunnel */
uword * tunnel_by_key;
+ /* Free vlib hw_if_indices */
+ u32 * free_vxlan_tunnel_hw_if_indices;
+
+ /* Mapping from sw_if_index to tunnel index */
+ u32 * tunnel_index_by_sw_if_index;
+
/* convenience */
vlib_main_t * vlib_main;
vnet_main_t * vnet_main;
@@ -115,4 +122,14 @@
/* manually added to the interface output node in gre.c */
#define GRE_OUTPUT_NEXT_LOOKUP 1
+typedef struct {
+ u8 is_add;
+
+ ip4_address_t src, dst;
+ u32 outer_table_id;
+} vnet_gre_add_del_tunnel_args_t;
+
+int vnet_gre_add_del_tunnel
+ (vnet_gre_add_del_tunnel_args_t *a, u32 * sw_if_indexp);
+
#endif /* included_gre_h */