+static u8 *
+format_decap_next (u8 * s, va_list * args)
+{
+ vxlan_gpe_tunnel_t *t = va_arg (*args, vxlan_gpe_tunnel_t *);
+
+ switch (t->protocol)
+ {
+ case VXLAN_GPE_PROTOCOL_IP4:
+ s = format (s, "protocol ip4 fib-idx %d", t->decap_fib_index);
+ break;
+ case VXLAN_GPE_PROTOCOL_IP6:
+ s = format (s, "protocol ip6 fib-idx %d", t->decap_fib_index);
+ break;
+ case VXLAN_GPE_PROTOCOL_ETHERNET:
+ s = format (s, "protocol ethernet");
+ break;
+ case VXLAN_GPE_PROTOCOL_NSH:
+ s = format (s, "protocol nsh");
+ break;
+ default:
+ s = format (s, "protocol unknown %d", t->protocol);
+ }
+
+ return s;
+}
+