1 /* Copyright (c) 2009, 2010, 2011. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "surf_routing_private.h"
10 extern routing_global_t global_routing;
11 extern routing_component_t current_routing;
12 extern model_type_t current_routing_model;
14 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
16 /* Routing model structure */
17 /* Business methods */
18 static xbt_dynar_t none_get_onelink_routes(routing_component_t rc)
23 static route_extended_t none_get_route(routing_component_t rc,
24 const char *src, const char *dst)
29 static route_extended_t none_get_bypass_route(routing_component_t rc,
36 static void none_finalize(routing_component_t rc)
41 static void none_set_processing_unit(routing_component_t rc,
46 static void none_set_autonomous_system(routing_component_t rc,
51 /* Creation routing model functions */
52 routing_component_t model_none_create(void)
54 routing_component_t new_component = xbt_new(s_routing_component_t, 1);
55 new_component->set_processing_unit = none_set_processing_unit;
56 new_component->set_autonomous_system = none_set_autonomous_system;
57 new_component->set_route = NULL;
58 new_component->set_ASroute = NULL;
59 new_component->set_bypassroute = NULL;
60 new_component->get_route = none_get_route;
61 new_component->get_onelink_routes = none_get_onelink_routes;
62 new_component->get_bypass_route = none_get_bypass_route;
63 new_component->finalize = none_finalize;