Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill further globals
[simgrid.git] / src / surf / surf_routing_none.c
1 /* Copyright (c) 2009, 2010, 2011. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #include "surf_routing_private.h"
8
9 /* Global vars */
10 extern routing_global_t global_routing;
11
12 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
13
14 /* Routing model structure */
15 /* Business methods */
16 static xbt_dynar_t none_get_onelink_routes(AS_t rc)
17 {
18   return NULL;
19 }
20
21 static route_extended_t none_get_route(AS_t rc,
22                                        const char *src, const char *dst)
23 {
24   return NULL;
25 }
26
27 static route_extended_t none_get_bypass_route(AS_t rc,
28                                               const char *src,
29                                               const char *dst)
30 {
31   return NULL;
32 }
33
34 static void none_finalize(AS_t rc)
35 {
36   xbt_free(rc);
37 }
38
39 static void none_parse_PU(AS_t rc,
40                                      const char *name)
41 {
42 }
43
44 static void none_parse_AS(AS_t rc,
45                                        const char *name)
46 {
47 }
48
49 /* Creation routing model functions */
50 AS_t model_none_create(void)
51 {
52   AS_t new_component = xbt_new(s_as_t, 1);
53   new_component->parse_PU = none_parse_PU;
54   new_component->parse_AS = none_parse_AS;
55   new_component->parse_route = NULL;
56   new_component->parse_ASroute = NULL;
57   new_component->parse_bypassroute = NULL;
58   new_component->get_route = none_get_route;
59   new_component->get_onelink_routes = none_get_onelink_routes;
60   new_component->get_bypass_route = none_get_bypass_route;
61   new_component->finalize = none_finalize;
62   return new_component;
63 }
64