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