2 * surf_routing_private.h
4 * Created on: 14 avr. 2011
8 #ifndef _SURF_SURF_ROUTING_PRIVATE_H
9 #define _SURF_SURF_ROUTING_PRIVATE_H
12 #include "gras_config.h"
14 #include "surf_private.h"
15 #include "xbt/dynar.h"
17 #include "xbt/config.h"
18 #include "xbt/graph.h"
20 #include "surf/surfxml_parse.h"
22 /* ************************************************************************** */
23 /* ***************** GENERIC PARSE FUNCTIONS (declarations) ***************** */
25 void generic_set_processing_unit(routing_component_t rc,
27 void generic_set_autonomous_system(routing_component_t rc,
29 void generic_set_bypassroute(routing_component_t rc,
30 const char *src, const char *dst,
31 route_extended_t e_route);
33 int surf_link_resource_cmp(const void *a, const void *b);
34 int surf_pointer_resource_cmp(const void *a, const void *b);
36 /* ************************************************************************** */
37 /* *************** GENERIC BUSINESS METHODS (declarations) ****************** */
39 double generic_get_link_latency(routing_component_t rc, const char *src, const char *dst,
40 route_extended_t e_route);
41 xbt_dynar_t generic_get_onelink_routes(routing_component_t rc);
42 route_extended_t generic_get_bypassroute(routing_component_t rc,
46 /* ************************************************************************** */
47 /* ****************** GENERIC AUX FUNCTIONS (declarations) ****************** */
50 generic_new_extended_route(e_surf_routing_hierarchy_t hierarchy,
51 void *data, int order);
53 generic_new_route(e_surf_routing_hierarchy_t hierarchy,
54 void *data, int order);
55 void generic_free_route(route_t route);
56 void generic_free_extended_route(route_extended_t e_route);
58 generic_autonomous_system_exist(routing_component_t rc, char *element);
60 generic_processing_units_exist(routing_component_t rc, char *element);
61 void generic_src_dst_check(routing_component_t rc, const char *src,
65 /* ************************************************************************** */
66 /* *************************** FLOYD ROUTING ******************************** */
67 void *model_floyd_create(void); /* create structures for floyd routing model */
68 void model_floyd_load(void); /* load parse functions for floyd routing model */
69 void model_floyd_unload(void); /* unload parse functions for floyd routing model */
70 void model_floyd_end(void); /* finalize the creation of floyd routing model */
71 void model_floyd_set_route(routing_component_t rc, const char *src,
72 const char *dst, name_route_extended_t route);
74 /* ************************************************** */
75 /* ************** RULE-BASED ROUTING **************** */
76 void *model_rulebased_create(void); /* create structures for rulebased routing model */
77 void model_rulebased_load(void); /* load parse functions for rulebased routing model */
78 void model_rulebased_unload(void); /* unload parse functions for rulebased routing model */
79 void model_rulebased_end(void); /* finalize the creation of rulebased routing model */
81 /* ************************************************************************** */
82 /* ********** Dijkstra & Dijkstra Cached ROUTING **************************** */
83 void *model_dijkstra_both_create(int cached); /* create by calling dijkstra or dijkstracache */
84 void *model_dijkstra_create(void); /* create structures for dijkstra routing model */
85 void *model_dijkstracache_create(void); /* create structures for dijkstracache routing model */
86 void model_dijkstra_both_load(void); /* load parse functions for dijkstra routing model */
87 void model_dijkstra_both_unload(void); /* unload parse functions for dijkstra routing model */
88 void model_dijkstra_both_end(void); /* finalize the creation of dijkstra routing model */
89 void model_dijkstra_both_set_route (routing_component_t rc, const char *src,
90 const char *dst, name_route_extended_t route);
92 /* ************************************************************************** */
93 /* *************************** FULL ROUTING ********************************* */
94 void *model_full_create(void); /* create structures for full routing model */
95 void model_full_load(void); /* load parse functions for full routing model */
96 void model_full_unload(void); /* unload parse functions for full routing model */
97 void model_full_end(void); /* finalize the creation of full routing model */
98 void model_full_set_route( /* Set the route and ASroute between src and dst */
99 routing_component_t rc, const char *src, const char *dst, name_route_extended_t route);
101 /* ************************************************************************** */
102 /* ******************************* NO ROUTING ******************************* */
103 void *model_none_create(void); /* none routing model */
104 void model_none_load(void); /* none routing model */
105 void model_none_unload(void); /* none routing model */
106 void model_none_end(void); /* none routing model */
108 #endif /* _SURF_SURF_ROUTING_PRIVATE_H */