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 */
18 s_routing_component_t generic_routing;
19 } s_routing_component_none_t, *routing_component_none_t;
21 /* Business methods */
22 static xbt_dynar_t none_get_onelink_routes(routing_component_t rc)
27 static route_extended_t none_get_route(routing_component_t rc,
28 const char *src, const char *dst)
33 static route_extended_t none_get_bypass_route(routing_component_t rc,
40 static void none_finalize(routing_component_t rc)
45 static void none_set_processing_unit(routing_component_t rc,
50 static void none_set_autonomous_system(routing_component_t rc,
55 /* Creation routing model functions */
56 void *model_none_create(void)
58 routing_component_none_t new_component =
59 xbt_new0(s_routing_component_none_t, 1);
60 new_component->generic_routing.set_processing_unit =
61 none_set_processing_unit;
62 new_component->generic_routing.set_autonomous_system =
63 none_set_autonomous_system;
64 new_component->generic_routing.set_route = NULL;
65 new_component->generic_routing.set_ASroute = NULL;
66 new_component->generic_routing.set_bypassroute = NULL;
67 new_component->generic_routing.get_route = none_get_route;
68 new_component->generic_routing.get_onelink_routes =
69 none_get_onelink_routes;
70 new_component->generic_routing.get_bypass_route = none_get_bypass_route;
71 new_component->generic_routing.finalize = none_finalize;
75 void model_none_load(void)
79 void model_none_unload(void)
83 void model_none_end(void)