Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: variable&fields renaming
[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 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
10
11 /* Routing model structure */
12 /* Business methods */
13 static xbt_dynar_t none_get_onelink_routes(AS_t rc)
14 {
15   return NULL;
16 }
17
18 static route_extended_t none_get_route(AS_t rc,
19                                        const char *src, const char *dst)
20 {
21   return NULL;
22 }
23
24 static route_extended_t none_get_bypass_route(AS_t rc,
25                                               const char *src,
26                                               const char *dst)
27 {
28   return NULL;
29 }
30
31 void model_none_finalize(AS_t as) {
32   xbt_free(as);
33 }
34
35 static void none_parse_PU(AS_t rc,
36                                      const char *name)
37 {
38 }
39
40 static void none_parse_AS(AS_t rc,
41                                        const char *name)
42 {
43 }
44
45 /* Creation routing model functions */
46 AS_t model_none_create() {
47   return model_none_create_sized(sizeof(s_as_t));
48 }
49 AS_t model_none_create_sized(size_t childsize) {
50   AS_t new_component = xbt_malloc0(childsize);
51   new_component->parse_PU = none_parse_PU;
52   new_component->parse_AS = none_parse_AS;
53   new_component->parse_route = NULL;
54   new_component->parse_ASroute = NULL;
55   new_component->parse_bypassroute = NULL;
56   new_component->get_route = none_get_route;
57   new_component->get_onelink_routes = none_get_onelink_routes;
58   new_component->get_bypass_route = none_get_bypass_route;
59   new_component->finalize = model_none_finalize;
60   return new_component;
61 }
62