- size_t table_size = xbt_dict_length(routing->generic_routing.to_index);
- xbt_dict_cursor_t c1 = NULL, c2 = NULL;
- char *k1, *d1, *k2, *d2;
- xbt_dict_foreach(routing->generic_routing.to_index, c1, k1, d1) {
- xbt_dict_foreach(routing->generic_routing.to_index, c2, k2, d2) {
- int *src_id = xbt_dict_get_or_null(routing->generic_routing.to_index, k1);
- int *dst_id = xbt_dict_get_or_null(routing->generic_routing.to_index, k2);
- xbt_assert(src_id && dst_id,
- "Ask for route \"from\"(%s) or \"to\"(%s) "
- "no found in the local table", k1, k2);
- route_t route = TO_ROUTE_FULL(*src_id, *dst_id);
+
+ int src,dst;
+ int table_size = xbt_dynar_length(rc->index_network_elm);
+
+ for(src=0; src < table_size; src++) {
+ for(dst=0; dst< table_size; dst++) {
+ route_t route = TO_ROUTE_FULL(src, dst);