/**
* \brief Add a "host_link" to the network element list
*/
-static void parse_S_host_link(sg_platf_host_link_cbarg_t host)
+static void parse_S_host(sg_platf_host_link_cbarg_t host)
{
RoutingEdge *info = sg_host_edge(sg_host_by_name(host->id));
xbt_assert(info, "Host '%s' not found!", host->id);
/**
* \brief Add a "host" to the network element list
*/
-static void parse_S_host(sg_platf_host_cbarg_t host)
+void routing_parse_init(sg_platf_host_cbarg_t host)
{
+ if (! current_routing)
+ return;
+
if (current_routing->p_hierarchy == SURF_ROUTING_NULL)
current_routing->p_hierarchy = SURF_ROUTING_BASE;
xbt_assert(!sg_host_by_name(host->id),
void routing_register_callbacks()
{
- sg_platf_host_add_cb(parse_S_host);
sg_platf_router_add_cb(parse_S_router);
- sg_platf_host_link_add_cb(parse_S_host_link);
+ sg_platf_host_link_add_cb(parse_S_host);
sg_platf_route_add_cb(parse_E_route);
sg_platf_ASroute_add_cb(parse_E_ASroute);
sg_platf_bypassRoute_add_cb(parse_E_bypassRoute);