Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
useless simplification
[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 extern routing_component_t current_routing;
12 extern model_type_t current_routing_model;
13
14 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
15
16 /* Routing model structure */
17 typedef struct {
18   s_routing_component_t generic_routing;
19 } s_routing_component_none_t, *routing_component_none_t;
20
21 /* Business methods */
22 static xbt_dynar_t none_get_onelink_routes(routing_component_t rc)
23 {
24   return NULL;
25 }
26
27 static route_extended_t none_get_route(routing_component_t rc,
28                                        const char *src, const char *dst)
29 {
30   return NULL;
31 }
32
33 static route_extended_t none_get_bypass_route(routing_component_t rc,
34                                               const char *src,
35                                               const char *dst)
36 {
37   return NULL;
38 }
39
40 static void none_finalize(routing_component_t rc)
41 {
42   xbt_free(rc);
43 }
44
45 static void none_set_processing_unit(routing_component_t rc,
46                                      const char *name)
47 {
48 }
49
50 static void none_set_autonomous_system(routing_component_t rc,
51                                        const char *name)
52 {
53 }
54
55 /* Creation routing model functions */
56 void *model_none_create(void)
57 {
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;
72   return new_component;
73 }
74
75 void model_none_load(void)
76 {
77 }
78
79 void model_none_unload(void)
80 {
81 }
82
83 void model_none_end(void)
84 {
85 }