3 #ifndef NETWORK_ROUTING_HPP_
4 #define NETWORK_ROUTING_HPP_
6 void routing_model_create( void *loopback);
14 class RoutingModelDescription;
15 typedef RoutingModelDescription *RoutingModelDescriptionPtr;
18 typedef RoutingEdge *RoutingEdgePtr;
21 typedef Onelink *OnelinkPtr;
24 typedef RoutingPlatf *RoutingPlatfPtr;
27 /*FIXME:class RoutingModelDescription {
36 xbt_dynar_t p_indexNetworkElm;
37 xbt_dict_t p_bypassRoutes; /* store bypass routes */
38 routing_model_description_t p_modelDesc;
39 e_surf_routing_hierarchy_t p_hierarchy;
41 AsPtr p_routingFather;
42 xbt_dict_t p_routingSons;
43 RoutingEdgePtr p_netElem;
44 xbt_dynar_t p_linkUpDownList;
48 int test(){return 3;};
49 virtual void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t into, double *latency)=0;
50 virtual xbt_dynar_t getOneLinkRoutes()=0;
51 virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0;
52 virtual sg_platf_route_cbarg_t getBypassRoute(RoutingEdgePtr src, RoutingEdgePtr dst, double *lat)=0;
54 /* The parser calls the following functions to inform the routing models
55 * that a new element is added to the AS currently built.
57 * Of course, only the routing model of this AS is informed, not every ones */
58 virtual int parsePU(RoutingEdgePtr elm)=0; /* A host or a router, whatever */
59 virtual int parseAS( RoutingEdgePtr elm)=0;
60 virtual void parseRoute(sg_platf_route_cbarg_t route)=0;
61 virtual void parseASroute(sg_platf_route_cbarg_t route)=0;
62 virtual void parseBypassroute(sg_platf_route_cbarg_t e_route)=0;
68 e_surf_network_element_type_t p_rcType;
74 * Link of lenght 1, alongside with its source and destination. This is mainly usefull in the bindings to gtnets and ns3
87 xbt_dynar_t p_lastRoute;
88 xbt_dynar_t getOneLinkRoutes(void);
89 void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, xbt_dynar_t * links, double *latency);
92 #endif /* NETWORK_ROUTING_HPP_ */