+static int
+gre_tunnel_desc (u32 sw_if_index,
+ ip46_address_t * src, ip46_address_t * dst, u8 * is_l2)
+{
+ gre_main_t *gm = &gre_main;
+ gre_tunnel_t *t;
+ u32 ti;
+
+ ti = gm->tunnel_index_by_sw_if_index[sw_if_index];
+
+ if (~0 == ti)
+ /* not one of ours */
+ return -1;
+
+ t = pool_elt_at_index (gm->tunnels, ti);
+
+ *src = t->tunnel_src;
+ *dst = t->tunnel_dst.fp_addr;
+ *is_l2 = t->type == GRE_TUNNEL_TYPE_TEB;
+
+ return (0);
+}
+