+static int
+session_create_lookpback (u32 table_id, u32 * sw_if_index,
+ ip4_address_t * intf_addr)
+{
+ u8 intf_mac[6];
+
+ memset (intf_mac, 0, sizeof (intf_mac));
+
+ if (vnet_create_loopback_interface (sw_if_index, intf_mac, 0, 0))
+ {
+ clib_warning ("couldn't create loopback. stopping the test!");
+ return -1;
+ }
+
+ if (table_id != 0)
+ ip_table_bind (FIB_PROTOCOL_IP4, *sw_if_index, table_id, 0);
+
+ vnet_sw_interface_set_flags (vnet_get_main (), *sw_if_index,
+ VNET_SW_INTERFACE_FLAG_ADMIN_UP);
+
+ if (ip4_add_del_interface_address (vlib_get_main (), *sw_if_index,
+ intf_addr, 24, 0))
+ {
+ clib_warning ("couldn't assign loopback ip %U", format_ip4_address,
+ intf_addr);
+ return -1;
+ }
+
+ return 0;
+}
+
+static void
+session_delete_loopback (u32 sw_if_index)
+{
+ /* fails spectacularly */
+ /* vnet_delete_loopback_interface (sw_if_index); */
+}
+