- xbt_lib_cursor_t cursor = nullptr;
- char* key;
- void *ignored;
- xbt_dict_foreach (netcards_dict, cursor, key, ignored) {
- simgrid::kernel::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
- printf(" - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : "host"));
- }
+ printf("NetCards count: %d\n", xbt_dict_length(netcards_dict));
+ for (auto nc : netcardList)
+ printf(" - Seen: \"%s\". Type: %s\n", nc->cname(),
+ nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : "host"));