diff --git a/build-root/emacs-lisp/all-skel.el b/build-root/emacs-lisp/all-skel.el
new file mode 100644
index 0000000..afc2d37
--- /dev/null
+++ b/build-root/emacs-lisp/all-skel.el
@@ -0,0 +1,11 @@
+;; list of clib / vlib / vnet / vpp skeleton files
+
+(load-file "./cli-cmd-skel.el")
+(load-file "./pipe-skel.el")
+(load-file "./dual-loop-skel.el")
+(load-file "./periodic-skel.el")
+(load-file "./config-skel.el")
+(load-file "./tunnel-c-skel.el")
+(load-file "./tunnel-h-skel.el")
+(load-file "./tunnel-encap-skel.el")
+(load-file "./tunnel-decap-skel.el")
diff --git a/build-root/emacs-lisp/cli-cmd-skel.el b/build-root/emacs-lisp/cli-cmd-skel.el
new file mode 100644
index 0000000..8a83cd1
--- /dev/null
+++ b/build-root/emacs-lisp/cli-cmd-skel.el
@@ -0,0 +1,32 @@
+;;; cli-cmd-skel.el - cli command skeleton
+
+(require 'skeleton)
+
+(define-skeleton cli-cmd-skel
+"Insert a CLI command "
+nil
+'(setq cmd-name (skeleton-read "Command Name: "))
+'(setq path (skeleton-read "Path: "))
+
+"
+static clib_error_t *
+" cmd-name "_command_fn (vlib_main_t * vm,
+		 unformat_input_t * input,
+		 vlib_cli_command_t * cmd)
+{
+    while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
+	if (unformat (input, \"whatever %d\", &whatever))
+	    ;
+	else
+	    return clib_error_return (0, \"unknown input `%U'\",
+				      format_unformat_error, input);
+    }
+    return 0;
+}
+
+VLIB_CLI_COMMAND (" cmd-name "_command, static) = {
+    .path = \"" path "\",
+    .short_help = \"" path "\",
+    .function = " cmd-name "_command_fn,
+};
+")
diff --git a/build-root/emacs-lisp/config-skel.el b/build-root/emacs-lisp/config-skel.el
new file mode 100644
index 0000000..c9a1eb6
--- /dev/null
+++ b/build-root/emacs-lisp/config-skel.el
@@ -0,0 +1,28 @@
+;;; config-skel.el - config function command skeleton
+
+(require 'skeleton)
+
+(define-skeleton config-skel
+"Insert a vlib config skeleton "
+nil
+'(setq cfg-name (skeleton-read "Config Class Name: "))
+
+"
+static clib_error_t *
+" cfg-name "_config (vlib_main_t * vm, unformat_input_t * input)
+{
+    u32 whatever;
+
+    while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) {
+	if (unformat (input, \"whatever %d\", &whatever))
+	    ;
+	else
+	    return clib_error_return (0, \"unknown input `%U'\",
+				      format_unformat_error, input);
+    }
+
+    return 0;
+}
+
+VLIB_CONFIG_FUNCTION (" cfg-name "_config, \"" cfg-name "\");
+")
diff --git a/build-root/emacs-lisp/dual-loop-skel.el b/build-root/emacs-lisp/dual-loop-skel.el
new file mode 100644
index 0000000..fafd21a
--- /dev/null
+++ b/build-root/emacs-lisp/dual-loop-skel.el
@@ -0,0 +1,290 @@
+;;; dual-loop-skel.el - Eliotic dual-loop node skeleton
+
+(require 'skeleton)
+
+(define-skeleton dual-loop-skel
+"Insert a skeleton dual-loop graph node"
+nil
+'(setq node-name (skeleton-read "Node Name: "))
+'(setq uc-node-name (upcase node-name))
+"
+#include <vlib/vlib.h>
+#include <vnet/vnet.h>
+#include <vnet/pg/pg.h>
+#include <clib/error.h>
+
+#include <vnet/ip/ip.h>
+#include <vnet/ethernet/ethernet.h>
+
+#include <clib/hash.h>
+#include <clib/error.h>
+#include <clib/elog.h>
+
+typedef struct {
+  /* convenience */
+  vlib_main_t * vlib_main;
+  vnet_main_t * vnet_main;
+  ethernet_main_t * ethernet_main;
+} " node-name "_main_t;
+
+" node-name "_main_t " node-name "_main;
+
+vlib_node_registration_t " node-name "_node;
+
+typedef struct {
+  u32 next_index;
+  u32 sw_if_index;
+} " node-name "_trace_t;
+
+/* packet trace format function */
+static u8 * format_" node-name "_trace (u8 * s, va_list * args)
+{
+  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
+  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
+  " node-name "_trace_t * t = va_arg (*args, " node-name "_trace_t *);
+  
+  s = format (s, \"" uc-node-name ": sw_if_index %d, next index %d\",
+              t->sw_if_index, t->next_index);
+  return s;
+}
+
+vlib_node_registration_t " node-name "_node;
+
+#define foreach_" node-name "_error \\
+_(SWAPPED, \"Mac swap packets processed\")
+
+typedef enum {
+#define _(sym,str) " uc-node-name "_ERROR_##sym,
+  foreach_" node-name "_error
+#undef _
+  " uc-node-name "_N_ERROR,
+} " node-name "_error_t;
+
+static char * " node-name "_error_strings[] = {
+#define _(sym,string) string,
+  foreach_" node-name "_error
+#undef _
+};
+
+typedef enum {
+  " uc-node-name "_NEXT_INTERFACE_OUTPUT,
+  " uc-node-name "_N_NEXT,
+} " node-name "_next_t;
+
+#define foreach_mac_address_offset              \\
+_(0)                                            \\
+_(1)                                            \\
+_(2)                                            \\
+_(3)                                            \\
+_(4)                                            \\
+_(5)
+
+static uword
+" node-name "_node_fn (vlib_main_t * vm,
+		  vlib_node_runtime_t * node,
+		  vlib_frame_t * frame)
+{
+  u32 n_left_from, * from, * to_next;
+  " node-name "_next_t next_index;
+  u32 pkts_swapped = 0;
+
+  from = vlib_frame_vector_args (frame);
+  n_left_from = frame->n_vectors;
+  next_index = node->cached_next_index;
+
+  while (n_left_from > 0)
+    {
+      u32 n_left_to_next;
+
+      vlib_get_next_frame (vm, node, next_index,
+			   to_next, n_left_to_next);
+
+      while (n_left_from >= 4 && n_left_to_next >= 2)
+	{
+          u32 next0 = " uc-node-name "_NEXT_INTERFACE_OUTPUT;
+          u32 next1 = " uc-node-name "_NEXT_INTERFACE_OUTPUT;
+          u32 sw_if_index0, sw_if_index1;
+          u8 tmp0[6], tmp1[6];
+          ethernet_header_t *en0, *en1;
+          u32 bi0, bi1;
+	  vlib_buffer_t * b0, * b1;
+          
+	  /* Prefetch next iteration. */
+	  {
+	    vlib_buffer_t * p2, * p3;
+            
+	    p2 = vlib_get_buffer (vm, from[2]);
+	    p3 = vlib_get_buffer (vm, from[3]);
+            
+	    vlib_prefetch_buffer_header (p2, LOAD);
+	    vlib_prefetch_buffer_header (p3, LOAD);
+
+	    CLIB_PREFETCH (p2->data, CLIB_CACHE_LINE_BYTES, STORE);
+	    CLIB_PREFETCH (p3->data, CLIB_CACHE_LINE_BYTES, STORE);
+	  }
+
+          /* speculatively enqueue b0 and b1 to the current next frame */
+	  to_next[0] = bi0 = from[0];
+	  to_next[1] = bi1 = from[1];
+	  from += 2;
+	  to_next += 2;
+	  n_left_from -= 2;
+	  n_left_to_next -= 2;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+	  b1 = vlib_get_buffer (vm, bi1);
+
+          /* $$$$$ Dual loop: process 2 x packets here $$$$$ */
+          ASSERT (b0->current_data == 0);
+          ASSERT (b1->current_data == 0);
+          
+          en0 = vlib_buffer_get_current (b0);
+          en1 = vlib_buffer_get_current (b1);
+
+          /* This is not the fastest way to swap src + dst mac addresses */
+#define _(a) tmp0[a] = en0->src_address[a];
+          foreach_mac_address_offset;
+#undef _
+#define _(a) en0->src_address[a] = en0->dst_address[a];
+          foreach_mac_address_offset;
+#undef _
+#define _(a) en0->dst_address[a] = tmp0[a];
+          foreach_mac_address_offset;
+#undef _
+
+#define _(a) tmp1[a] = en1->src_address[a];
+          foreach_mac_address_offset;
+#undef _
+#define _(a) en1->src_address[a] = en1->dst_address[a];
+          foreach_mac_address_offset;
+#undef _
+#define _(a) en1->dst_address[a] = tmp1[a];
+          foreach_mac_address_offset;
+#undef _
+
+          sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
+          sw_if_index1 = vnet_buffer(b1)->sw_if_index[VLIB_RX];
+
+          /* Send pkt back out the RX interface */
+          vnet_buffer(b0)->sw_if_index[VLIB_TX] = sw_if_index0;
+          vnet_buffer(b1)->sw_if_index[VLIB_TX] = sw_if_index1;
+
+          pkts_swapped += 2;
+          /* $$$$$ End of processing 2 x packets $$$$$ */
+
+          if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE)))
+            {
+              if (b0->flags & VLIB_BUFFER_IS_TRACED) 
+                {
+                    " node-name "_trace_t *t = 
+                      vlib_add_trace (vm, node, b0, sizeof (*t));
+                    t->sw_if_index = sw_if_index0;
+                    t->next_index = next0;
+                  }
+                if (b1->flags & VLIB_BUFFER_IS_TRACED) 
+                  {
+                    " node-name "_trace_t *t = 
+                      vlib_add_trace (vm, node, b1, sizeof (*t));
+                    t->sw_if_index = sw_if_index1;
+                    t->next_index = next1;
+                  }
+              }
+            
+            /* verify speculative enqueues, maybe switch current next frame */
+            vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
+                                             to_next, n_left_to_next,
+                                             bi0, bi1, next0, next1);
+        }
+
+      while (n_left_from > 0 && n_left_to_next > 0)
+	{
+          u32 bi0;
+	  vlib_buffer_t * b0;
+          u32 next0 = " uc-node-name "_NEXT_INTERFACE_OUTPUT;
+          u32 sw_if_index0;
+          u8 tmp0[6];
+          ethernet_header_t *en0;
+
+          /* speculatively enqueue b0 to the current next frame */
+	  bi0 = from[0];
+	  to_next[0] = bi0;
+	  from += 1;
+	  to_next += 1;
+	  n_left_from -= 1;
+	  n_left_to_next -= 1;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+
+          /* $$$$$ Single loop: process 1  packet here $$$$$ */
+
+          /* 
+           * Direct from the driver, we should be at offset 0
+           * aka at &b0->data[0]
+           */
+          ASSERT (b0->current_data == 0);
+
+          en0 = vlib_buffer_get_current (b0);
+
+          /* This is not the fastest way to swap src + dst mac addresses */
+#define _(a) tmp0[a] = en0->src_address[a];
+          foreach_mac_address_offset;
+#undef _
+#define _(a) en0->src_address[a] = en0->dst_address[a];
+          foreach_mac_address_offset;
+#undef _
+#define _(a) en0->dst_address[a] = tmp0[a];
+          foreach_mac_address_offset;
+#undef _
+
+          sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
+
+          /* Send pkt back out the RX interface */
+          vnet_buffer(b0)->sw_if_index[VLIB_TX] = sw_if_index0;
+
+          if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE) 
+                            && (b0->flags & VLIB_BUFFER_IS_TRACED))) 
+            {
+              " node-name "_trace_t *t = 
+                 vlib_add_trace (vm, node, b0, sizeof (*t));
+              t->sw_if_index = sw_if_index0;
+              t->next_index = next0;
+            }
+            
+          pkts_swapped += 1;
+
+          /* $$$$$ Done processing 1 packet here $$$$$ */
+
+          /* verify speculative enqueue, maybe switch current next frame */
+	  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, next0);
+	}
+
+      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
+    }
+
+  vlib_node_increment_counter (vm, " node-name "_node.index, 
+                               " uc-node-name "_ERROR_SWAPPED, pkts_swapped);
+  return frame->n_vectors;
+}
+
+VLIB_REGISTER_NODE (" node-name "_node) = {
+  .function = " node-name "_node_fn,
+  .name = \"" node-name "\",
+  .vector_size = sizeof (u32),
+  .format_trace = format_" node-name "_trace,
+  .type = VLIB_NODE_TYPE_INTERNAL,
+  
+  .n_errors = ARRAY_LEN(" node-name "_error_strings),
+  .error_strings = " node-name "_error_strings,
+
+  .n_next_nodes = " uc-node-name "_N_NEXT,
+
+  /* edit / add dispositions here */
+  .next_nodes = {
+        [" uc-node-name "_NEXT_INTERFACE_OUTPUT] = \"interface-output\",
+  },
+};
+
+")
+
diff --git a/build-root/emacs-lisp/periodic-skel.el b/build-root/emacs-lisp/periodic-skel.el
new file mode 100644
index 0000000..37c2085
--- /dev/null
+++ b/build-root/emacs-lisp/periodic-skel.el
@@ -0,0 +1,86 @@
+;;; pipe-skel.el - pipelined graph node skeleton
+
+(require 'skeleton)
+
+(define-skeleton periodic-skel
+"Insert a skeleton periodic process node"
+nil
+'(setq node-name (skeleton-read "Name: "))
+'(setq uc-node-name (upcase node-name))
+'(setq poll-period (skeleton-read "Poll period (f64 seconds, e.g. 10.0): "))
+
+"
+#define " uc-node-name "_POLL_PERIOD " poll-period "
+
+static uword
+" node-name "_process (vlib_main_t * vm,
+                       vlib_node_runtime_t * rt,
+                       vlib_frame_t * f)
+{
+    f64 poll_time_remaining;
+    uword event_type, * event_data = 0;
+
+    poll_time_remaining = " uc-node-name "_POLL_PERIOD;
+    while (1) {
+        int i;
+
+        /* 
+         * Sleep until next periodic call due, or until we receive event(s) 
+         */
+        poll_time_remaining = 
+            vlib_process_wait_for_event_or_clock (vm, poll_time_remaining);
+        
+        event_type = vlib_process_get_events (vm, &event_data);
+        switch (event_type) {
+        case ~0:                /* no events => timeout */
+            break;
+
+        /* 
+         * $$$$ FIXME: add cases / handlers for each event type 
+         */
+        case EVENT1:
+            for (i = 0; i < vec_len (event_data); i++) 
+                handle_event1 (mm, event_data[i]);
+            break;
+
+        case EVENT2:
+            for (i = 0; i < vec_len (event_data); i++) 
+                handle_event2 (vm, event_data[i]);
+	    break;
+
+        /* ... and so forth for each event type */
+
+        default:
+            /* This should never happen... */
+            clib_warning (\"BUG: unhandled event type %d\", event_type);
+            break;
+        }
+        if (event_data)
+            _vec_len (event_data) = 0;
+
+        /* Timer expired, call periodic function */
+        if (vlib_process_suspend_time_is_zero (poll_time_remaining)) {
+            " node-name "_periodic (vm);
+            poll_time_remaining = " uc-node-name "_POLL_PERIOD;
+        }
+    }
+
+    return 0;
+}
+
+/*
+ * " node-name " periodic node declaration 
+ */
+static VLIB_REGISTER_NODE (" node-name "_node) = {
+    .function = " node-name "_process,
+    .type = VLIB_NODE_TYPE_PROCESS,
+    .name = \"" node-name "-process\",
+};
+
+/*
+ * To signal an event:
+ *
+ * vlib_process_signal_event (vm, " node-name "_node.index, EVENTn, datum);
+ *
+ */
+")
diff --git a/build-root/emacs-lisp/pipe-skel.el b/build-root/emacs-lisp/pipe-skel.el
new file mode 100644
index 0000000..8ad25c0
--- /dev/null
+++ b/build-root/emacs-lisp/pipe-skel.el
@@ -0,0 +1,132 @@
+;;; pipe-skel.el - pipelined graph node skeleton
+
+(require 'skeleton)
+
+(define-skeleton pipeline-node-skel
+"Insert a skeleton pipelined graph node"
+nil
+'(setq node-name (skeleton-read "Node Name: "))
+'(setq uc-node-name (upcase node-name))
+'(setq nstages (skeleton-read "Number of pipeline stages: "))
+"
+#include <vlib/vlib.h>
+#include <clib/error.h>
+
+/*
+ * Dump these counters via the \"show error\" CLI command 
+ * FIXME: Add packet counter / error strings as desired
+ */
+
+#define foreach_" node-name "_error \\
+_(ERROR1, \"sample counter/ error string\")
+
+static char * " node-name "_error_strings[] = {
+#define _(sym,string) string,
+  foreach_" node-name "_error
+#undef _
+};
+
+/*
+ * packet error / counter enumeration
+ *
+ * To count and drop a vlib_buffer_t *b:
+ *
+ *     Set b->error = node->errors[" uc-node-name "_ERROR_xxx];
+ *     last_stage returns a disposition index bound to \"error-drop\"
+ * 
+ * To manually increment the specific counter " uc-node-name "_ERROR1
+ *
+ *  vlib_node_t *n = vlib_get_node (vm, " node-name ".index);
+ *  u32 node_counter_base_index = n->error_heap_index;
+ *  vlib_error_main_t * em = &vm->error_main;
+ *  em->counters[node_counter_base_index + " uc-node-name "_ERROR1] += 1;
+ * 
+ */
+
+typedef enum {
+#define _(sym,str) " uc-node-name "_ERROR_##sym,
+    foreach_" node-name "_error
+#undef _
+    " uc-node-name "_N_ERROR,
+} " node-name "_error_t;
+
+/*
+ * enumeration of per-packet dispositions
+ * FIXME: add dispositions as desired
+ */
+
+typedef enum { \n"
+"    " uc-node-name "_NEXT_NORMAL,\n"
+"    " uc-node-name "_N_NEXT,
+} " node-name "_next_t;
+
+#define NSTAGES " nstages "
+
+/* 
+ * Use the generic buffer metadata + first line of packet data prefetch
+ * stage function from <api/pipeline.h>. This is usually a Good Idea.
+ */
+#define stage0 generic_stage0
+
+/* 
+ * FIXME: add stage functions. Here is the function prototype:
+ * 
+ * static inline void stageN (vlib_main_t * vm,
+ *                            vlib_node_runtime_t * node,
+ *                            u32 buffer_index)
+ */
+
+/*
+ * FIXME: the last pipeline stage returns the desired pkt next node index,
+ * from the " node-name "_next_t enum above
+ */
+static inline u32 last_stage (vlib_main_t *vm, vlib_node_runtime_t *node,
+                              u32 bi)
+{
+    vlib_buffer_t *b = vlib_get_buffer (vm, bi);
+
+    b->error = node->errors[EXAMPLE_ERROR_ERROR1];
+
+    return " uc-node-name "_NEXT_NORMAL;
+}
+
+#include <api/pipeline.h>
+
+static uword " node-name "_node_fn (vlib_main_t * vm,
+                              vlib_node_runtime_t * node,
+                              vlib_frame_t * frame)
+{
+    return dispatch_pipeline (vm, node, frame);
+}
+
+static VLIB_REGISTER_NODE (example_node) = {
+  .function = " node-name "_node_fn,
+  .name = \"" node-name "-node\",
+  .vector_size = sizeof (u32),
+  .type = VLIB_NODE_TYPE_INTERNAL,
+  
+  .n_errors = ARRAY_LEN(" node-name "_error_strings),
+  .error_strings = " node-name "_error_strings,
+
+  .n_next_nodes = " uc-node-name "_N_NEXT,
+
+  /* edit / add dispositions here */
+  .next_nodes = {
+        [" uc-node-name "_NEXT_NORMAL] = \"error-drop\",
+  },
+};
+
+/* 
+ * packet generator definition to push superframes of data into the
+ * new graph node. Cut and paste into <file>, then
+ * \"exec <file>\", \"pa enable test\" at the QVNET prompt...
+ * 
+packet-generator new {
+  name test
+  limit 100
+  node " node-name "-node
+  size 374-374
+  data { hex 0x02b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2043333735304520536f66747761726520284333373530452d554e4956455253414c2d4d292c2056657273696f6e2031322e32283335295345352c2052454c4541534520534f4654574152452028666331290a436f707972696768742028632920313938362d3230303720627920436973636f2053797374656d732c20496e632e0a436f6d70696c6564205468752031392d4a756c2d30372031363a3137206279206e616368656e00060018636973636f2057532d4333373530452d3234544400020011000000010101cc0004000000000003001b54656e4769676162697445746865726e6574312f302f3100040008000000280008002400000c011200000000ffffffff010221ff000000000000001e7a50f000ff000000090004000a00060001000b0005010012000500001300050000160011000000010101cc000400000000001a00100000000100000000ffffffff }
+}
+ */
+")
diff --git a/build-root/emacs-lisp/tunnel-c-skel.el b/build-root/emacs-lisp/tunnel-c-skel.el
new file mode 100644
index 0000000..6f1096c
--- /dev/null
+++ b/build-root/emacs-lisp/tunnel-c-skel.el
@@ -0,0 +1,441 @@
+;;; tunnel-c-skel.el - tunnel encap cli / api
+
+(require 'skeleton)
+
+(define-skeleton tunnel-c-skel
+"Insert a tunnel cli/api implementation"
+nil
+'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): "))
+'(setq ENCAP_STACK (upcase encap_stack))
+'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack))
+"
+#include <vnet/" encap-stack "/" encap_stack" .h>
+
+" encap_stack "_main_t " encap_stack "_main;
+
+static u8 * format_decap_next (u8 * s, va_list * args)
+{
+  u32 next_index = va_arg (*args, u32);
+
+  switch (next_index)
+    {
+    case " ENCAP_STACK "_INPUT_NEXT_DROP:
+      return format (s, \"drop\");
+    case " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT:
+      return format (s, \"ip4\");
+    case " ENCAP_STACK "_INPUT_NEXT_IP6_INPUT:
+      return format (s, \"ip6\");
+    case " ENCAP_STACK "_INPUT_NEXT_" ENCAP_STACK "_ENCAP:
+      return format (s, \"" encap-stack "\");
+    default:
+      return format (s, \"unknown %d\", next_index);
+    }
+  return s;
+}
+
+u8 * format_" encap_stack "_tunnel (u8 * s, va_list * args)
+{
+  " encap_stack "_tunnel_t * t = va_arg (*args, " encap_stack "_tunnel_t *);
+  " encap_stack "_main_t * ngm = &" encap_stack "_main;
+
+  s = format (s, 
+              \"[%d] %U (src) %U (dst) fibs: encap %d, decap %d\",
+              t - ngm->tunnels,
+              format_ip4_address, &t->src,
+              format_ip4_address, &t->dst,
+              t->encap_fib_index,
+              t->decap_fib_index);
+
+  s = format (s, \" decap next %U\\n\", format_decap_next, t->decap_next_index);
+  /* FIXME: add protocol details */
+  return s;
+}
+
+static u8 * format_" encap_stack "_name (u8 * s, va_list * args)
+{
+  u32 dev_instance = va_arg (*args, u32);
+  return format (s, \"" encap_stack "_tunnel%d\", dev_instance);
+}
+
+static uword dummy_interface_tx (vlib_main_t * vm,
+                                 vlib_node_runtime_t * node,
+                                 vlib_frame_t * frame)
+{
+  clib_warning (\"you shouldn't be here, leaking buffers...\");
+  return frame->n_vectors;
+}
+
+VNET_DEVICE_CLASS (" encap_stack "_device_class,static) = {
+  .name = "" ENCAP_STACK "",
+  .format_device_name = format_" encap_stack "_name,
+  .format_tx_trace = format_" encap_stack "_encap_trace,
+  .tx_function = dummy_interface_tx,
+};
+
+static uword dummy_set_rewrite (vnet_main_t * vnm,
+                                u32 sw_if_index,
+                                u32 l3_type,
+                                void * dst_address,
+                                void * rewrite,
+                                uword max_rewrite_bytes)
+{
+  return 0;
+}
+
+u8 * format_" encap_stack "_header_with_length (u8 * s, va_list * args)
+{
+  " encap_stack "_header_t * h = va_arg (*args, " encap_stack "_header_t *);
+  u32 max_header_bytes = va_arg (*args, u32);
+  u32 header_bytes;
+
+  header_bytes = sizeof (h[0]);
+  if (max_header_bytes != 0 && header_bytes > max_header_bytes)
+    return format (s, \"" encap-stack "header truncated\");
+
+  /* FIXME: pretty-print an " encap_stack " header */
+
+  return s;
+}
+
+VNET_HW_INTERFACE_CLASS (" encap_stack "_hw_class) = {
+  .name = \"" ENCAP_STACK "\",
+  .format_header = format_" encap_stack "_header_with_length,
+  .set_rewrite = dummy_set_rewrite,
+};
+
+#define foreach_copy_field                      \
+_(src.as_u32)                                   \
+_(dst.as_u32)                                   \
+_(encap_fib_index)                              \
+_(decap_fib_index)                              \
+_(decap_next_index)                             \
+_(FIXME_ADD_ALL_COPY_FIELDS )
+
+static int " encap_stack "_rewrite (" encap_stack "_tunnel_t * t)
+{
+  u8 *rw = 0;
+  ip4_header_t * ip0;
+  " encap_stack "_header_t * h0;
+  int len;
+
+  len = sizeof (*h0);
+
+  vec_validate_aligned (rw, len-1, CLIB_CACHE_LINE_BYTES);
+
+  h0 = (ip4_udp_" encap_stack "_header_t *) rw;
+
+  /* FIXME: build the actual header here... */
+
+  /* Fixed portion of the (outer) ip4 header */
+  ip0 = &h0->ip4;
+  ip0->ip_version_and_header_length = 0x45;
+  ip0->ttl = 254;
+  ip0->protocol = IP_PROTOCOL_UDP;
+
+  /* we'll fix up the ip4 header length and checksum after-the-fact */
+  ip0->src_address.as_u32 = t->src.as_u32;
+  ip0->dst_address.as_u32 = t->dst.as_u32;
+  ip0->checksum = ip4_header_checksum (ip0);
+
+  /* UDP header, randomize src port on something, maybe? */
+  h0->udp.src_port = clib_host_to_net_u16 (4341);
+  h0->udp.dst_port = clib_host_to_net_u16 (UDP_DST_PORT_" encap_stack ");
+
+  /* $$$ build a <mumble> tunnel header here */
+  
+  t->rewrite = rw;
+  return (0);
+}
+
+int vnet_" encap_stack "_add_del_tunnel 
+(vnet_" encap_stack "_add_del_tunnel_args_t *a, u32 * hw_if_indexp)
+{
+  " encap_stack "_main_t * ngm = &" encap_stack "_main;
+  " encap_stack "_tunnel_t *t = 0;
+  vnet_main_t * vnm = ngm->vnet_main;
+  vnet_hw_interface_t * hi;
+  uword * p;
+  u32 hw_if_index = ~0;
+  int rv;
+  " encap_stack "_tunnel_key_t key, *key_copy;
+  hash_pair_t *hp;
+  
+  key.FIXME = clib_host_to_net_XXX(FIXME);
+
+  p = hash_get_mem (ngm->" encap_stack "_tunnel_by_key, &key);
+  
+  if (a->is_add)
+    {
+      /* adding a tunnel: tunnel must not already exist */
+      if (p) 
+        return VNET_API_ERROR_INVALID_VALUE;
+      
+      pool_get_aligned (ngm->tunnels, t, CLIB_CACHE_LINE_BYTES);
+      memset (t, 0, sizeof (*t));
+      
+      /* copy from arg structure */
+#define _(x) t->x = a->x;
+      foreach_copy_field;
+#undef _
+      
+      rv = " encap_stack "_rewrite (t);
+
+      if (rv)
+        {
+          pool_put (ngm->tunnels, t);
+          return rv;
+        }
+
+      /* $$$$ use a simple hash if you can ... */
+      key_copy = clib_mem_alloc (sizeof (*key_copy));
+      memcpy (key_copy, &key, sizeof (*key_copy));
+
+      hash_set_mem (ngm->" encap_stack "_tunnel_by_key, key_copy, 
+                    t - ngm->tunnels);
+      
+      /* 
+       * interface freelist / recycle shtik
+       * This simple implementation rapidly reuses freed tunnel interfaces.
+       * Consider whether to refcount, etc. etc.
+       */ 
+      if (vec_len (ngm->free_" encap_stack "_tunnel_hw_if_indices) > 0)
+        {
+          hw_if_index = ngm->free_" encap_stack "_tunnel_hw_if_indices
+            [vec_len (ngm->free_" encap_stack "_tunnel_hw_if_indices)-1];
+          _vec_len (ngm->free_" encap_stack "_tunnel_hw_if_indices) -= 1;
+          
+          hi = vnet_get_hw_interface (vnm, hw_if_index);
+          hi->dev_instance = t - ngm->tunnels;
+          hi->hw_instance = hi->dev_instance;
+        }
+      else 
+        {
+          hw_if_index = vnet_register_interface
+            (vnm, " encap_stack "_device_class.index, t - ngm->tunnels,
+             " encap_stack "_hw_class.index, t - ngm->tunnels);
+          hi = vnet_get_hw_interface (vnm, hw_if_index);
+          hi->output_node_index = " encap_stack "_encap_node.index;
+        }
+      
+      t->hw_if_index = hw_if_index;
+      
+      vnet_sw_interface_set_flags (vnm, hi->sw_if_index, 
+                                   VNET_SW_INTERFACE_FLAG_ADMIN_UP);
+    }
+  else
+    {
+      /* deleting a tunnel: tunnel must exist */
+      if (!p) 
+        return VNET_API_ERROR_NO_SUCH_ENTRY;
+
+      t = pool_elt_at_index (ngm->tunnels, p[0]);
+
+      vnet_sw_interface_set_flags (vnm, t->hw_if_index, 0 /* down */);
+      vec_add1 (ngm->free_" encap_stack "_tunnel_hw_if_indices, t->hw_if_index);
+
+      hp = hash_get_pair (ngm->" encap_stack "_tunnel_by_key, &key);
+      key_copy = (void *)(hp->key);
+      hash_unset_mem (ngm->" encap_stack "_tunnel_by_key, &key);
+      clib_mem_free (key_copy);
+
+      vec_free (t->rewrite);
+      pool_put (ngm->tunnels, t);
+    }
+
+  if (hw_if_indexp)
+      *hw_if_indexp = hw_if_index;
+
+  return 0;
+}
+
+static u32 fib_index_from_fib_id (u32 fib_id)
+{
+  ip4_main_t * im = &ip4_main;
+  uword * p;
+
+  p = hash_get (im->fib_index_by_table_id, fib_id);
+  if (!p)
+    return ~0;
+
+  return p[0];
+}
+
+static uword unformat_decap_next (unformat_input_t * input, va_list * args)
+{
+  u32 * result = va_arg (*args, u32 *);
+  u32 tmp;
+  
+  if (unformat (input, \"drop\"))
+    *result = " ENCAP_STACK "_INPUT_NEXT_DROP;
+  else if (unformat (input, \"ip4\"))
+    *result = " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT;
+  else if (unformat (input, \"ip6\"))
+    *result = " ENCAP_STACK "_INPUT_NEXT_IP6_INPUT;
+  else if (unformat (input, \"ethernet\"))
+    *result = " ENCAP_STACK "_INPUT_NEXT_IP6_INPUT;
+  else if (unformat (input, \"" encap-stack "\"))
+    *result = " ENCAP_STACK "_INPUT_NEXT_" ENCAP_STACK "_ENCAP;
+  else if (unformat (input, \"%d\", &tmp))
+    *result = tmp;
+  else
+    return 0;
+  return 1;
+}
+
+static clib_error_t *
+" encap_stack "_add_del_tunnel_command_fn (vlib_main_t * vm,
+                                   unformat_input_t * input,
+                                   vlib_cli_command_t * cmd)
+{
+  unformat_input_t _line_input, * line_input = &_line_input;
+  ip4_address_t src, dst;
+  u8 is_add = 1;
+  u8 src_set = 0;
+  u8 dst_set = 0;
+  u32 encap_fib_index = 0;
+  u32 decap_fib_index = 0;
+  u8 next_protocol = " ENCAP_STACK "_NEXT_PROTOCOL_IP4;
+  u32 decap_next_index = " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT;
+  u8 flags = " ENCAP_STACK "_FLAGS_P;
+  u8 ver_res = 0;
+  u8 res = 0;
+  u32 iid = 0;
+  u8 iid_set = 0;
+  u32 tmp;
+  int rv;
+  vnet_" encap_stack "_add_del_tunnel_args_t _a, * a = &_a;
+  
+  /* Get a line of input. */
+  if (! unformat_user (input, unformat_line_input, line_input))
+    return 0;
+
+  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) {
+    if (unformat (line_input, \"del\"))
+      is_add = 0;
+    else if (unformat (line_input, \"src %U\", 
+                       unformat_ip4_address, &src))
+      src_set = 1;
+    else if (unformat (line_input, \"dst %U\",
+                       unformat_ip4_address, &dst))
+      dst_set = 1;
+    else if (unformat (line_input, \"encap-vrf-id %d\", &tmp))
+      {
+        encap_fib_index = fib_index_from_fib_id (tmp);
+        if (encap_fib_index == ~0)
+          return clib_error_return (0, \"nonexistent encap fib id %d\", tmp);
+      }
+    else if (unformat (line_input, \"decap-vrf-id %d\", &tmp))
+      {
+        decap_fib_index = fib_index_from_fib_id (tmp);
+        if (decap_fib_index == ~0)
+          return clib_error_return (0, \"nonexistent decap fib id %d\", tmp);
+      }
+    else if (unformat (line_input, \"decap-next %U\", unformat_decap_next, 
+                       &decap_next_index))
+      ;
+    else if (unformat(line_input, \"next-ip4\"))
+      next_protocol = 1;
+    else if (unformat(line_input, \"next-ip6\"))
+      next_protocol = 2;
+    else if (unformat(line_input, \"next-ethernet\"))
+      next_protocol = 3;
+    else if (unformat(line_input, \"next-nsh\"))
+      next_protocol = 4;
+    /* 
+     * $$$ allow the user to specify anything they want 
+     * in the " ENCAP_STACK " header
+     */
+    else 
+      return clib_error_return (0, \"parse error: '%U'\", 
+                                format_unformat_error, line_input);
+  }
+
+  unformat_free (line_input);
+
+  if (src_set == 0)
+    return clib_error_return (0, \"tunnel src address not specified\");
+
+  if (dst_set == 0)
+    return clib_error_return (0, \"tunnel dst address not specified\");
+
+  memset (a, 0, sizeof (*a));
+
+  a->is_add = is_add;
+
+#define _(x) a->x = x;
+  foreach_copy_field;
+#undef _
+  
+  rv = vnet_" encap_stack "_add_del_tunnel (a, 0 /* hw_if_indexp */);
+
+  switch(rv)
+    {
+    case 0:
+      break;
+    case VNET_API_ERROR_INVALID_VALUE:
+      return clib_error_return (0, \"tunnel already exists...\");
+
+    case VNET_API_ERROR_NO_SUCH_ENTRY:
+      return clib_error_return (0, \"tunnel does not exist...\");
+
+    default:
+      return clib_error_return 
+        (0, \"vnet_" encap_stack "_add_del_tunnel returned %d\", rv);
+    }
+
+  return 0;
+}
+
+VLIB_CLI_COMMAND (create_" encap_stack "_tunnel_command, static) = {
+  .path = \"lisp gpe tunnel\",
+  .short_help = 
+  \"<mumble> tunnel src <ip4-addr> dst <ip4-addr>\\n\"
+  \"    [encap-fib-id <nn>] [decap-fib-id <nn>]\\n\"
+  \"    [decap-next [ip4|ip6|ethernet|nsh-encap|<nn>]][del]\\n\",
+  .function = " encap_stack "_add_del_tunnel_command_fn,
+};
+
+static clib_error_t *
+show_" encap_stack "_tunnel_command_fn (vlib_main_t * vm,
+                                unformat_input_t * input,
+                                vlib_cli_command_t * cmd)
+{
+  " encap_stack "_main_t * ngm = &" encap_stack "_main;
+  " encap_stack "_tunnel_t * t;
+  
+  if (pool_elts (ngm->tunnels) == 0)
+    vlib_cli_output (vm, \"No lisp-gpe tunnels configured...\");
+
+  pool_foreach (t, ngm->tunnels,
+  ({
+    vlib_cli_output (vm, \"%U\", format_" encap_stack "_tunnel);
+  }));
+  
+  return 0;
+}
+
+VLIB_CLI_COMMAND (show_" encap_stack "_tunnel_command, static) = {
+    .path = \"show lisp gpe tunnel\",
+    .function = show_" encap_stack "_tunnel_command_fn,
+};
+
+clib_error_t *" encap_stack "_init (vlib_main_t *vm)
+{
+  " encap_stack "_main_t *ngm = &" encap_stack "_main;
+  
+  ngm->vnet_main = vnet_get_main();
+  ngm->vlib_main = vm;
+  
+  ngm->" encap_stack "_tunnel_by_key 
+    = hash_create_mem (0, sizeof(" encap_stack "_tunnel_key_t), sizeof (uword));
+
+  /* YMMV, register with the local netstack */
+  udp_register_dst_port (vm, UDP_DST_PORT_" encap_stack ", 
+                         " encap_stack "_input_node.index, 1 /* is_ip4 */);
+  return 0;
+}
+
+VLIB_INIT_FUNCTION(" encap_stack "_init);
+
+")
+  
diff --git a/build-root/emacs-lisp/tunnel-decap-skel.el b/build-root/emacs-lisp/tunnel-decap-skel.el
new file mode 100644
index 0000000..fc6f3a1
--- /dev/null
+++ b/build-root/emacs-lisp/tunnel-decap-skel.el
@@ -0,0 +1,299 @@
+;;; tunnel-decap-skel.el - tunnel decapsulation skeleton
+
+(require 'skeleton)
+
+(define-skeleton tunnel-decap-skel
+"Insert a tunnel decap implementation"
+nil
+'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): "))
+'(setq ENCAP_STACK (upcase encap_stack))
+'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack))
+'(setq ENCAP-STACK (upcase encap-stack))
+"
+#include <vlib/vlib.h>
+#include <vnet/pg/pg.h>
+#include <vnet/" encap-stack "/" encap_stack ".h>
+
+typedef struct {
+  u32 next_index;
+  u32 tunnel_index;
+  u32 error;
+  " encap_stack "_header_t h;
+} " encap_stack "_rx_trace_t;
+
+static u8 * format_" encap_stack "_rx_trace (u8 * s, va_list * args)
+{
+  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
+  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
+  " encap_stack "_rx_trace_t * t = va_arg (*args, " encap_stack "_rx_trace_t *);
+
+  if (t->tunnel_index != ~0)
+    {
+      s = format (s, \"" ENCAP-STACK ": tunnel %d next %d error %d\", 
+                  t->tunnel_index, t->next_index, t->error);
+    }
+  else
+    {
+      s = format (s, \"" ENCAP-STACK ": no tunnel next %d error %d\\n\", 
+                  t->next_index, t->error);
+    }
+  s = format (s, \"\\n  %U\", format_" encap_stack "_header_with_length, &t->h, 
+              (u32) sizeof (t->h) /* max size */);
+  return s;
+}
+
+static uword
+" encap_stack "_input (vlib_main_t * vm,
+                     vlib_node_runtime_t * node,
+                     vlib_frame_t * from_frame)
+{
+  u32 n_left_from, next_index, * from, * to_next;
+  " encap_stack "_main_t * ngm = &" encap_stack "_main;
+  u32 last_tunnel_index = ~0;
+  " encap_stack "_tunnel_key_t last_key;
+  u32 pkts_decapsulated = 0;
+
+  memset (&last_key, 0xff, sizeof (last_key));
+
+  from = vlib_frame_vector_args (from_frame);
+  n_left_from = from_frame->n_vectors;
+
+  next_index = node->cached_next_index;
+
+  while (n_left_from > 0)
+    {
+      u32 n_left_to_next;
+
+      vlib_get_next_frame (vm, node, next_index,
+			   to_next, n_left_to_next);
+
+#if 0 /* $$$ dual loop when the single loop works */
+      while (n_left_from >= 4 && n_left_to_next >= 2)
+	{
+	  u32 bi0, bi1;
+	  vlib_buffer_t * b0, * b1;
+	  nsh_unicast_header_t * h0, * h1;
+          u32 label0, label1;
+	  u32 next0, next1;
+	  uword * p0, * p1;
+
+	  /* Prefetch next iteration. */
+	  {
+	    vlib_buffer_t * p2, * p3;
+
+	    p2 = vlib_get_buffer (vm, from[2]);
+	    p3 = vlib_get_buffer (vm, from[3]);
+
+	    vlib_prefetch_buffer_header (p2, LOAD);
+	    vlib_prefetch_buffer_header (p3, LOAD);
+
+	    CLIB_PREFETCH (p2->data, 2*CLIB_CACHE_LINE_BYTES, LOAD);
+	    CLIB_PREFETCH (p3->data, 2*CLIB_CACHE_LINE_BYTES, LOAD);
+	  }
+
+	  bi0 = from[0];
+	  bi1 = from[1];
+	  to_next[0] = bi0;
+	  to_next[1] = bi1;
+	  from += 2;
+	  to_next += 2;
+	  n_left_to_next -= 2;
+	  n_left_from -= 2;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+	  b1 = vlib_get_buffer (vm, bi1);
+
+          h0 = vlib_buffer_get_current (b0);
+          h1 = vlib_buffer_get_current (b1);
+          
+          next0 = next1 = " ENCAP_STACK "_INPUT_NEXT_IP4_INPUT;
+
+          label0 = clib_net_to_host_u32 (h0->label_exp_s_ttl);
+          label1 = clib_net_to_host_u32 (h1->label_exp_s_ttl);
+
+	  /* 
+	   * Translate label contents into a fib index.
+	   * This is a decent sanity check, and guarantees
+	   * a sane FIB for the downstream lookup
+	   */
+          label0 = vnet_nsh_uc_get_label (label0);
+          label1 = vnet_nsh_uc_get_label (label1);
+
+          /* If 2xlabels match, and match the 1-wide cache, use it */
+          if (label0 == label1 && rt->last_label == label0)
+            {
+              vnet_buffer(b0)->sw_if_index[VLIB_TX] = rt->last_fib_index;
+              vnet_buffer(b1)->sw_if_index[VLIB_TX] = rt->last_fib_index;
+            }
+          else
+            {
+              p0 = hash_get (rt->mm->fib_index_by_nsh_label, label0);
+              if (PREDICT_FALSE (p0 == 0))
+                {
+                  next0 = " ENCAP_STACK "_INPUT_NEXT_DROP;
+                  b0->error = node->errors[NSH_ERROR_BAD_LABEL];
+                }
+              else
+                vnet_buffer(b0)->sw_if_index[VLIB_TX] = p0[0];
+              
+              p1 = hash_get (rt->mm->fib_index_by_nsh_label, label1);
+              if (PREDICT_FALSE (p1 == 0))
+                {
+                  next1 = " ENCAP_STACK "_INPUT_NEXT_DROP;
+                  b1->error = node->errors[NSH_ERROR_BAD_LABEL];
+                }
+              else
+                {
+                  vnet_buffer(b1)->sw_if_index[VLIB_TX] = p1[0];
+                  rt->last_fib_index = p1[0];
+                  rt->last_label = label1;
+                }
+            }
+
+          if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) 
+            {
+              nsh_rx_trace_t *tr = vlib_add_trace (vm, node, 
+                                                   b0, sizeof (*tr));
+              tr->label_exp_s_ttl = label0;
+            }
+          if (PREDICT_FALSE(b1->flags & VLIB_BUFFER_IS_TRACED)) 
+            {
+              nsh_rx_trace_t *tr = vlib_add_trace (vm, node, 
+                                                   b1, sizeof (*tr));
+              tr->label_exp_s_ttl = label1;
+            }
+
+          vlib_buffer_advance (b0, sizeof (*h0));
+          vlib_buffer_advance (b1, sizeof (*h1));
+
+	  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, bi1, next0, next1);
+	}
+#endif 
+    
+      while (n_left_from > 0 && n_left_to_next > 0)
+	{
+	  u32 bi0;
+	  vlib_buffer_t * b0;
+	  u32 next0;
+          " encap_stack "_header_t * iuX0;
+	  uword * p0;
+          u32 tunnel_index0;
+          " encap_stack "_tunnel_t * t0;
+          " encap_stack "_tunnel_key_t key0;
+          u32 error0;
+
+	  bi0 = from[0];
+	  to_next[0] = bi0;
+	  from += 1;
+	  to_next += 1;
+	  n_left_from -= 1;
+	  n_left_to_next -= 1;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+
+          /* 
+           * udp leaves current_data pointing at the tunnel header
+           * $$$$ FIXME
+           */
+          vlib_buffer_advance 
+            (b0, -(word)(sizeof(udp_header_t)+sizeof(ip4_header_t)));
+
+          iuX0 = vlib_buffer_get_current (b0);
+
+          /* pop (ip, udp, lisp-gpe) */
+          vlib_buffer_advance (b0, sizeof (*iuX0));
+
+          tunnel_index0 = ~0;
+          error0 = 0;
+          next0 = " ENCAP_STACK "_INPUT_NEXT_DROP;
+
+          key0.src = iuX0->ip4.src_address.as_u32;
+          key0.iid = iuX0->lisp.iid;
+
+          /* $$$ validate key comparison */
+          if (PREDICT_FALSE ((key0.as_u64[0] != last_key.as_u64[0])))
+            {
+              p0 = hash_get_mem (ngm->" encap_stack "_tunnel_by_key, &key0);
+
+              if (p0 == 0)
+                {
+                  error0 = " ENCAP_STACK "_ERROR_NO_SUCH_TUNNEL;
+                  goto trace0;
+                }
+
+              last_key.as_u64[0] = key0.as_u64[0];
+              tunnel_index0 = last_tunnel_index = p0[0];
+            }
+          else
+            tunnel_index0 = last_tunnel_index;
+
+          t0 = pool_elt_at_index (ngm->tunnels, tunnel_index0);
+
+          next0 = t0->decap_next_index;
+
+          /* Required to make the l2 tag push / pop code work on l2 subifs */
+          vnet_update_l2_len (b0);
+
+          /* 
+           * ip[46] lookup in the configured FIB
+           * " encap-stack ", here's the encap tunnel sw_if_index
+           */
+          vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->decap_fib_index;
+          pkts_decapsulated ++;
+
+        trace0:
+          b0->error = error0 ? node->errors[error0] : 0;
+
+          if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) 
+            {
+              " encap_stack "_rx_trace_t *tr 
+                = vlib_add_trace (vm, node, b0, sizeof (*tr));
+              tr->next_index = next0;
+              tr->error = error0;
+              tr->tunnel_index = tunnel_index0;
+              tr->h = iuX0->lisp;
+            }
+	  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, next0);
+	}
+
+      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
+    }
+  vlib_node_increment_counter (vm, " encap_stack "_input_node.index,
+                               " ENCAP_STACK "_ERROR_DECAPSULATED, 
+                               pkts_decapsulated);
+  return from_frame->n_vectors;
+}
+
+static char * " encap_stack "_error_strings[] = {
+#define " encap_stack "_error(n,s) s,
+#include <vnet/" encap-stack "/" encap_stack "_error.def>
+#undef " encap_stack "_error
+#undef _
+};
+
+VLIB_REGISTER_NODE (" encap_stack "_input_node) = {
+  .function = \"" encap_stack "_input\",
+  .name = \"" encap-stack "-input\",
+  /* Takes a vector of packets. */
+  .vector_size = sizeof (u32),
+
+  .n_errors = " ENCAP_STACK "_N_ERROR,
+  .error_strings = " encap_stack "_error_strings,
+
+  .n_next_nodes = " ENCAP_STACK "_INPUT_N_NEXT,
+  .next_nodes = {
+#define _(s,n) [" ENCAP_STACK "_INPUT_NEXT_##s] = n,
+    foreach_" encap_stack "_input_next
+#undef _
+  },
+
+  .format_buffer = format_" encap_stack "_header_with_length,
+  .format_trace = format_" encap_stack "_rx_trace,
+  // $$$$ .unformat_buffer = unformat_" encap_stack "_header,
+};
+
+")
diff --git a/build-root/emacs-lisp/tunnel-encap-skel.el b/build-root/emacs-lisp/tunnel-encap-skel.el
new file mode 100644
index 0000000..5933153
--- /dev/null
+++ b/build-root/emacs-lisp/tunnel-encap-skel.el
@@ -0,0 +1,245 @@
+;;; tunnel-encap-skel.el - tunnel interface output skeleton
+
+(require 'skeleton)
+
+(define-skeleton tunnel-encap-skel
+"Insert a tunnel encap implementation"
+nil
+'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): "))
+'(setq ENCAP_STACK (upcase encap_stack))
+'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack))
+'(setq ENCAP-STACK (upcase encap-stack))
+"
+#include <clib/error.h>
+#include <clib/hash.h>
+#include <vnet/vnet.h>
+#include <vnet/ip/ip.h>
+#include <vnet/ethernet/ethernet.h>
+#include <vnet/" encap-stack "/" encap_stack ".h>
+
+/* Statistics (not really errors) */
+#define foreach_" encap_stack "_encap_error    \\
+_(ENCAPSULATED, \"good packets encapsulated\")
+
+static char * " encap_stack "_encap_error_strings[] = {
+#define _(sym,string) string,
+  foreach_" encap_stack "_encap_error
+#undef _
+};
+
+typedef enum {
+#define _(sym,str) " ENCAP_STACK "_ENCAP_ERROR_##sym,
+    foreach_" encap_stack "_encap_error
+#undef _
+    " ENCAP_STACK "_ENCAP_N_ERROR,
+} " encap_stack "_encap_error_t;
+
+typedef enum {
+    " ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP,
+    " ENCAP_STACK "_ENCAP_NEXT_DROP,
+    " ENCAP_STACK "_ENCAP_N_NEXT,
+} " encap_stack "_encap_next_t;
+
+typedef struct {
+  u32 tunnel_index;
+} " encap_stack "_encap_trace_t;
+
+u8 * format_" encap_stack "_encap_trace (u8 * s, va_list * args)
+{
+  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
+  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
+  " encap_stack "_encap_trace_t * t 
+      = va_arg (*args, " encap_stack "_encap_trace_t *);
+
+  s = format (s, \"" ENCAP-STACK ": tunnel %d\", t->tunnel_index);
+  return s;
+}
+
+/* $$$$ FIXME adjust to match the rewrite string */
+#define foreach_fixed_header_offset             \\
+_(0) _(1) _(2) _(3) _(FIXME)
+
+static uword
+" encap_stack "_encap (vlib_main_t * vm,
+               vlib_node_runtime_t * node,
+               vlib_frame_t * from_frame)
+{
+  u32 n_left_from, next_index, * from, * to_next;
+  " encap_stack "_main_t * ngm = &" encap_stack "_main;
+  vnet_main_t * vnm = ngm->vnet_main;
+  u32 pkts_encapsulated = 0;
+  u16 old_l0 = 0, old_l1 = 0;
+
+  from = vlib_frame_vector_args (from_frame);
+  n_left_from = from_frame->n_vectors;
+
+  next_index = node->cached_next_index;
+
+  while (n_left_from > 0)
+    {
+      u32 n_left_to_next;
+
+      vlib_get_next_frame (vm, node, next_index,
+			   to_next, n_left_to_next);
+
+#if 0 /* $$$ dual loop when the single loop works */
+      while (n_left_from >= 4 && n_left_to_next >= 2)
+	{
+	  u32 bi0, bi1;
+	  vlib_buffer_t * b0, * b1;
+	  nsh_unicast_header_t * h0, * h1;
+          u32 label0, label1;
+	  u32 next0, next1;
+	  uword * p0, * p1;
+
+	  /* Prefetch next iteration. */
+	  {
+	    vlib_buffer_t * p2, * p3;
+
+	    p2 = vlib_get_buffer (vm, from[2]);
+	    p3 = vlib_get_buffer (vm, from[3]);
+
+	    vlib_prefetch_buffer_header (p2, LOAD);
+	    vlib_prefetch_buffer_header (p3, LOAD);
+
+	    CLIB_PREFETCH (p2->data, 2*CLIB_CACHE_LINE_BYTES, LOAD);
+	    CLIB_PREFETCH (p3->data, 2*CLIB_CACHE_LINE_BYTES, LOAD);
+	  }
+
+	  bi0 = from[0];
+	  bi1 = from[1];
+	  to_next[0] = bi0;
+	  to_next[1] = bi1;
+	  from += 2;
+	  to_next += 2;
+	  n_left_to_next -= 2;
+	  n_left_from -= 2;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+	  b1 = vlib_get_buffer (vm, bi1);
+
+          h0 = vlib_buffer_get_current (b0);
+          h1 = vlib_buffer_get_current (b1);
+          
+          next0 = next1 = " ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP;
+
+          vlib_buffer_advance (b0, sizeof (*h0));
+          vlib_buffer_advance (b1, sizeof (*h1));
+
+	  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, bi1, next0, next1);
+	}
+#endif 
+    
+      while (n_left_from > 0 && n_left_to_next > 0)
+	{
+	  u32 bi0;
+	  vlib_buffer_t * b0;
+	  u32 next0 = " ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP;
+          vnet_hw_interface_t * hi0;
+          ip4_header_t * ip0;
+          udp_header_t * udp0;
+          u64 * copy_src0, * copy_dst0;
+          u32 * copy_src_last0, * copy_dst_last0;
+          " encap_stack "_tunnel_t * t0;
+          u16 new_l0;
+          ip_csum_t sum0;
+
+	  bi0 = from[0];
+	  to_next[0] = bi0;
+	  from += 1;
+	  to_next += 1;
+	  n_left_from -= 1;
+	  n_left_to_next -= 1;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+
+          /* 1-wide cache? */
+          hi0 = vnet_get_sup_hw_interface 
+            (vnm, vnet_buffer(b0)->sw_if_index[VLIB_TX]);
+
+          t0 = pool_elt_at_index (ngm->tunnels, hi0->dev_instance);
+
+          ASSERT(vec_len(t0->rewrite) >= 24);
+
+          /* Apply the rewrite string. $$$$ vnet_rewrite? */
+          vlib_buffer_advance (b0, -(word)_vec_len(t0->rewrite));
+
+          ip0 = vlib_buffer_get_current(b0);
+          /* Copy the fixed header */
+          copy_dst0 = (u64 *) ip0;
+          copy_src0 = (u64 *) t0->rewrite;
+
+          ASSERT (sizeof (ip4_udp_" encap_stack "_header_t) == FIXME);
+
+          /* Copy first N octets 8-bytes at a time */
+#define _(offs) copy_dst0[offs] = copy_src0[offs];
+          foreach_fixed_header_offset;
+#undef _
+#if 0 /* needed if encap not a multiple of 8 bytes */
+          /* Last 4 octets. Hopefully gcc will be our friend */
+          copy_dst_last0 = (u32 *)(&copy_dst0[FIXME]);
+          copy_src_last0 = (u32 *)(&copy_src0[FIXME]);
+          copy_dst_last0[0] = copy_src_last0[0];
+
+#endif
+          /* fix the <bleep>ing outer-IP checksum */
+          sum0 = ip0->checksum;
+          /* old_l0 always 0, see the rewrite setup */
+          new_l0 = 
+            clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0));
+          
+          sum0 = ip_csum_update (sum0, old_l0, new_l0, ip4_header_t,
+                                 length /* changed member */);
+          ip0->checksum = ip_csum_fold (sum0);
+          ip0->length = new_l0;
+          
+          /* Fix UDP length */
+          udp0 = (udp_header_t *)(ip0+1);
+          new_l0 = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0)
+                                         - sizeof (*ip0));
+          
+          udp0->length = new_l0;
+
+          /* Reset to look up tunnel partner in the configured FIB */
+          vnet_buffer(b0)->sw_if_index[VLIB_TX] = t0->encap_fib_index;
+          pkts_encapsulated ++;
+
+          if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) 
+            {
+              " encap_stack "_encap_trace_t *tr = 
+                vlib_add_trace (vm, node, b0, sizeof (*tr));
+              tr->tunnel_index = t0 - ngm->tunnels;
+            }
+	  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, next0);
+	}
+
+      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
+    }
+  vlib_node_increment_counter (vm, node->node_index, 
+                               " ENCAP_STACK "_ENCAP_ERROR_ENCAPSULATED, 
+                               pkts_encapsulated);
+  return from_frame->n_vectors;
+}
+
+VLIB_REGISTER_NODE (" encap_stack "_encap_node) = {
+  .function = " encap_stack "_encap,
+  .name = \"" encap-stack "-encap\",
+  .vector_size = sizeof (u32),
+  .format_trace = format_" encap_stack "_encap_trace,
+  .type = VLIB_NODE_TYPE_INTERNAL,
+
+  .n_errors = ARRAY_LEN(" encap_stack "_encap_error_strings),
+  .error_strings = " encap_stack "_encap_error_strings,
+
+  .n_next_nodes = " ENCAP_STACK "_ENCAP_N_NEXT,
+
+  .next_nodes = {
+        [" ENCAP_STACK "_ENCAP_NEXT_IP4_LOOKUP] = \"ip4-lookup\",
+        [" ENCAP_STACK "_ENCAP_NEXT_DROP] = \"error-drop\",
+  },
+};
+")
diff --git a/build-root/emacs-lisp/tunnel-h-skel.el b/build-root/emacs-lisp/tunnel-h-skel.el
new file mode 100644
index 0000000..7e33309
--- /dev/null
+++ b/build-root/emacs-lisp/tunnel-h-skel.el
@@ -0,0 +1,128 @@
+;;; tunnel-h-skel.el - tunnel encap header file skeleton
+
+(require 'skeleton)
+
+(define-skeleton tunnel-h-skel
+"Insert a tunnel encap header file"
+nil
+'(setq encap_stack (skeleton-read "encap_stack (e.g ip4_udp_lisp): "))
+'(setq ENCAP_STACK (upcase encap_stack))
+'(setq encap-stack (replace-regexp-in-string "_" "-" encap_stack))
+"
+#ifndef included_vnet_" encap_stack "_h
+#define included_vnet_" encap_stack "_h
+
+#include <clib/error.h>
+#include <clib/hash.h>
+#include <vnet/vnet.h>
+#include <vnet/ip/ip.h>
+#include <vnet/l2/l2_input.h>
+#include <vnet/ethernet/ethernet.h>
+#include <vnet/" encap-stack "/" encap_stack "_packet.h>
+#include <vnet/ip/ip4_packet.h>
+#include <vnet/ip/udp.h>
+
+/* Encap stack built in encap.c */
+typedef CLIB_PACKED (struct {
+  ip4_header_t ip4;             /* 20 bytes */
+  udp_header_t udp;             /* 8 bytes */
+  " encap_stack "_header_t lisp;       /* 8 bytes */
+}) " encap_stack "_header_t;
+
+typedef CLIB_PACKED(struct {
+  /* 
+   * Key fields: 
+   * all fields in NET byte order
+   */
+  union {
+    struct {
+      u32 FIXME_NET_BYTE_ORDER;
+    };
+    u64 as_u64[1];
+  };
+}) " encap_stack "_tunnel_key_t;
+
+typedef struct {
+  /* Rewrite string. $$$$ maybe: embed vnet_rewrite header */
+  u8 * rewrite;
+
+  /* decap next index */
+  u32 decap_next_index;
+
+  /* tunnel src and dst addresses */
+  ip4_address_t src;
+  ip4_address_t dst;
+
+  /* FIB indices */
+  u32 encap_fib_index;          /* tunnel partner lookup here */
+  u32 decap_fib_index;          /* inner IP lookup here */
+
+  /* vnet intfc hw/sw_if_index */
+  u32 hw_if_index;
+
+  /* encap header fields in HOST byte order */
+  u32 FIXME;
+} " encap_stack "_tunnel_t;
+
+#define foreach_" encap_stack "_input_next        \\
+_(DROP, \"error-drop\")                           \\
+_(IP4_INPUT, \"ip4-input\")                       \\
+_(IP6_INPUT, \"ip6-input\")                       \\
+_(ETHERNET_INPUT, \"ethernet-input\")             \\
+_(" ENCAP_STACK "_ENCAP, \"" encap-stack "-encap\")
+
+typedef enum {
+#define _(s,n) " ENCAP_STACK "_INPUT_NEXT_##s,
+  foreach_" encap_stack "_input_next
+#undef _
+  " ENCAP_STACK "_INPUT_N_NEXT,
+} " encap_stack "_input_next_t;
+
+typedef enum {
+#define " encap_stack "_error(n,s) " ENCAP_STACK "_ERROR_##n,
+#include <vnet/" encap-stack "/" encap_stack "_error.def>
+#undef " encap_stack "_error
+  " ENCAP_STACK "_N_ERROR,
+} " encap_stack "_input_error_t;
+
+typedef struct {
+  /* vector of encap tunnel instances */
+  " encap_stack "_tunnel_t *tunnels;
+
+  /* lookup tunnel by key */
+  uword * " encap_stack "_tunnel_by_key;
+
+  /* Free vlib hw_if_indices */
+  u32 * free_" encap_stack "_tunnel_hw_if_indices;
+
+  /* convenience */
+  vlib_main_t * vlib_main;
+  vnet_main_t * vnet_main;
+} " encap_stack "_main_t;
+
+" encap_stack "_main_t " encap_stack "_main;
+
+vlib_node_registration_t " encap_stack "_input_node;
+vlib_node_registration_t " encap_stack "_encap_node;
+
+u8 * format_" encap_stack "_encap_trace (u8 * s, va_list * args);
+u8 * format_" encap_stack "_header_with_length (u8 * s, va_list * args);
+
+typedef struct {
+  u8 is_add;
+  ip4_address_t src, dst;
+  u32 encap_fib_index;
+  u32 decap_fib_index;
+  u32 decap_next_index;
+  /* encap fields in HOST byte order */
+  u8 FIXME_HOST_BYTE_ORDER;
+} vnet_" encap_stack "_add_del_tunnel_args_t;
+
+int vnet_" encap_stack "_add_del_tunnel 
+(vnet_" encap_stack "_add_del_tunnel_args_t *a, u32 * hw_if_indexp);
+
+u8 * format_" encap_stack "_header_with_length (u8 * s, va_list * args);
+
+#endif /* included_vnet_" encap_stack "_h */
+
+")
