/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "surf_routing_full.hpp"
-#include "network_interface.hpp"
+#include "src/surf/surf_routing_private.hpp"
+#include "src/surf/surf_routing_full.hpp"
+#include "src/surf/network_interface.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf");
namespace simgrid {
namespace surf {
-AsFull::AsFull(){
- p_routingTable = 0;
-}
-
AsFull::~AsFull(){
if (p_routingTable) {
int table_size = (int)xbt_dynar_length(p_indexNetworkElm);
void *link = *(void **) xbt_dynar_get_ptr(route->link_list, 0);
Onelink *onelink;
if (p_hierarchy == SURF_ROUTING_BASE) {
- NetCard *tmp_src = xbt_dynar_get_as(p_indexNetworkElm, src, sg_netcard_t);
+ NetCard *tmp_src = xbt_dynar_get_as(p_indexNetworkElm, src, sg_netcard_t);
tmp_src->setId(src);
- NetCard *tmp_dst = xbt_dynar_get_as(p_indexNetworkElm, dst, sg_netcard_t);
- tmp_dst->setId(dst);
+ NetCard *tmp_dst = xbt_dynar_get_as(p_indexNetworkElm, dst, sg_netcard_t);
+ tmp_dst->setId(dst);
onelink = new Onelink(link, tmp_src, tmp_dst);
} else if (p_hierarchy == SURF_ROUTING_RECURSIVE)
onelink = new Onelink(link, route->gw_src, route->gw_dst);
char *src = (char*)(route->src);
char *dst = (char*)(route->dst);
NetCard *src_net_elm, *dst_net_elm;
- src_net_elm = sg_routing_edge_by_name_or_null(src);
- dst_net_elm = sg_routing_edge_by_name_or_null(dst);
+ src_net_elm = sg_netcard_by_name_or_null(src);
+ dst_net_elm = sg_netcard_by_name_or_null(dst);
xbt_assert(src_net_elm, "Network elements %s not found", src);
xbt_assert(dst_net_elm, "Network elements %s not found", dst);
XBT_DEBUG("Load ASroute from \"%s\" to \"%s\"", src, dst);
if (!route->gw_src ||
route->gw_src->getRcType() == SURF_NETWORK_ELEMENT_NULL)
- surf_parse_error("The src_gateway \"%s\" does not exist!",
+ surf_parse_error("The src_gateway \"%s\" does not exist!",
route->gw_src ? route->gw_src->getName() : "(null)");
if (!route->gw_dst ||
route->gw_dst->getRcType() == SURF_NETWORK_ELEMENT_NULL)
- surf_parse_error("The dst_gateway \"%s\" does not exist!",
+ surf_parse_error("The dst_gateway \"%s\" does not exist!",
route->gw_dst ? route->gw_dst->getName() : "(null)");
XBT_DEBUG("ASroute goes from \"%s\" to \"%s\"",
route->gw_src->getName(), route->gw_dst->getName());