1 #include "surf_routing_generic.hpp"
4 #ifndef SURF_ROUTING_VIVALDI_HPP_
5 #define SURF_ROUTING_VIVALDI_HPP_
7 /* ************************************************** */
8 /* ************** Vivaldi ROUTING **************** */
9 AS_t model_vivaldi_create(void); /* create structures for vivaldi routing model */
10 #define HOST_PEER(peername) bprintf("peer_%s", peername)
11 #define ROUTER_PEER(peername) bprintf("router_%s", peername)
12 #define LINK_PEER(peername) bprintf("link_%s", peername)
18 typedef AsVivaldi *AsVivaldiPtr;
20 class AsVivaldi: public AsGeneric {
22 sg_platf_route_cbarg_t *p_routingTable;
24 AsVivaldi() : AsGeneric() {};
27 void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t into, double *latency);
28 //void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges);
29 //sg_platf_route_cbarg_t getBypassRoute(RoutingEdgePtr src, RoutingEdgePtr dst, double *lat);
31 /* The parser calls the following functions to inform the routing models
32 * that a new element is added to the AS currently built.
34 * Of course, only the routing model of this AS is informed, not every ones */
35 int parsePU(RoutingEdgePtr elm); /* A host or a router, whatever */
36 //virtual int parseAS( RoutingEdgePtr elm)=0;
38 //virtual void parseBypassroute(sg_platf_route_cbarg_t e_route)=0;
42 #endif /* SURF_ROUTING_VIVALDI_HPP_ */