pg: A Tunnel mode variant of a pg interface

Type: feature

this allows VPP to simulate linux tun devices.

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3adf38b49a254804370f78edd5d275d192fd00a6
diff --git a/src/vnet/pg/pg.api b/src/vnet/pg/pg.api
index 3a44f1d..3630e0c 100644
--- a/src/vnet/pg/pg.api
+++ b/src/vnet/pg/pg.api
@@ -22,6 +22,13 @@
 
 import "vnet/interface_types.api";
 
+enum pg_interface_mode : u8
+{
+ PG_API_MODE_ETHERNET = 0,
+ PG_API_MODE_IP4,
+ PG_API_MODE_IP6,
+};
+
 /** \brief PacketGenerator create interface request
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
@@ -37,6 +44,15 @@
   bool gso_enabled;
   u32 gso_size;
 };
+define pg_create_interface_v2
+{
+  u32 client_index;
+  u32 context;
+  vl_api_interface_index_t interface_id;
+  bool gso_enabled;
+  u32 gso_size;
+  vl_api_pg_interface_mode_t mode;
+};
 
 /** \brief PacketGenerator create interface response
     @param context - sender context, to match reply w/ request
@@ -48,6 +64,12 @@
   i32 retval;
   vl_api_interface_index_t sw_if_index;
 };
+define pg_create_interface_v2_reply
+{
+  u32 context;
+  i32 retval;
+  vl_api_interface_index_t sw_if_index;
+};
 
 /** \brief PacketGenerator interface enable/disable packet coalesce
     @param client_index - opaque cookie to identify the sender