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);
76 /* ************************************************** */
77 /* ************** RULE-BASED ROUTING **************** */
78 void *model_rulebased_create(void); /* create structures for rulebased routing model */
79 void model_rulebased_load(void); /* load parse functions for rulebased routing model */
80 void model_rulebased_unload(void); /* unload parse functions for rulebased routing model */
81 void model_rulebased_end(void); /* finalize the creation of rulebased routing model */
84 /* ************************************************************************** */
85 /* ********** Dijkstra & Dijkstra Cached ROUTING **************************** */
86 void *model_dijkstra_both_create(int cached); /* create by calling dijkstra or dijkstracache */
87 void *model_dijkstra_create(void); /* create structures for dijkstra routing model */
88 void *model_dijkstracache_create(void); /* create structures for dijkstracache routing model */
89 void model_dijkstra_both_load(void); /* load parse functions for dijkstra routing model */
90 void model_dijkstra_both_unload(void); /* unload parse functions for dijkstra routing model */
91 void model_dijkstra_both_end(void); /* finalize the creation of dijkstra routing model */
92 void model_dijkstra_both_set_route (routing_component_t rc, const char *src,
93 const char *dst, name_route_extended_t route);
95 /* ************************************************************************** */
96 /* *************************** FULL ROUTING ********************************* */
97 void *model_full_create(void); /* create structures for full routing model */
98 void model_full_load(void); /* load parse functions for full routing model */
99 void model_full_unload(void); /* unload parse functions for full routing model */
100 void model_full_end(void); /* finalize the creation of full routing model */
101 void model_full_set_route( /* Set the route and ASroute between src and dst */
102 routing_component_t rc, const char *src, const char *dst, name_route_extended_t route);
104 /* ************************************************************************** */
105 /* ******************************* NO ROUTING ******************************* */
106 void *model_none_create(void); /* none routing model */
107 void model_none_load(void); /* none routing model */
108 void model_none_unload(void); /* none routing model */
109 void model_none_end(void); /* none routing model */
111 #endif /* _SURF_SURF_ROUTING_PRIVATE_H */