- rmp->instance = htonl (t->user_instance);
- rmp->mcast_sw_if_index = htonl (t->mcast_sw_if_index);
- rmp->vni = htonl (t->vni);
- rmp->sclass = htons (t->sclass);
- rmp->decap_next_index = htonl (t->decap_next_index);
- rmp->sw_if_index = htonl (t->sw_if_index);
- rmp->is_ipv6 = is_ipv6;
+ ip_address_encode (&t->src, itype, &rmp->tunnel.src);
+ ip_address_encode (&t->dst, itype, &rmp->tunnel.dst);
+ rmp->tunnel.encap_table_id =
+ fib_table_get_table_id (t->encap_fib_index, fib_proto_from_ip46 (itype));
+
+ rmp->tunnel.instance = htonl (t->user_instance);
+ rmp->tunnel.mcast_sw_if_index = htonl (t->mcast_sw_if_index);
+ rmp->tunnel.vni = htonl (t->vni);
+ rmp->tunnel.decap_next_index = htonl (t->decap_next_index);
+ rmp->tunnel.sw_if_index = htonl (t->sw_if_index);