Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to sort out the surf headers a bit, if possible
[simgrid.git] / src / surf / surf_routing_private.hpp
1 /* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _SURF_SURF_ROUTING_PRIVATE_H
8 #define _SURF_SURF_ROUTING_PRIVATE_H
9
10 #include <float.h>
11 #include "src/internal_config.h"
12
13 #include "surf_interface.hpp"
14 #include "xbt/base.h"
15 #include "xbt/dynar.h"
16 #include "xbt/str.h"
17 #include "xbt/config.h"
18 #include "xbt/graph.h"
19
20 /* ************************************************************************** */
21 /* ******************************* NO ROUTING ******************************* */
22 /* Only save the AS tree, and forward calls to child ASes */
23 XBT_PRIVATE AS_t model_none_create(void);
24 XBT_PRIVATE AS_t model_none_create_sized(size_t childsize);
25 XBT_PRIVATE void model_none_finalize(AS_t as);
26 /* ************************************************************************** */
27 /* ***************** GENERIC PARSE FUNCTIONS (declarations) ***************** */
28 XBT_PRIVATE AS_t model_generic_create_sized(size_t childsize);
29 XBT_PRIVATE void model_generic_finalize(AS_t as);
30
31 XBT_PRIVATE int generic_parse_PU(AS_t rc, sg_netcard_t elm);
32 XBT_PRIVATE int generic_parse_AS(AS_t rc, sg_netcard_t elm);
33
34 /* ************************************************************************** */
35 /* *************** GENERIC BUSINESS METHODS (declarations) ****************** */
36
37 XBT_PRIVATE xbt_dynar_t generic_get_onelink_routes(AS_t rc);
38
39 /* ************************************************************************** */
40 /* ****************** GENERIC AUX FUNCTIONS (declarations) ****************** */
41
42 /* change a route containing link names into a route containing link entities.
43  * If change_order is true, the links are put in reverse order in the
44  * produced route */
45 XBT_PRIVATE AS_t generic_autonomous_system_exist(AS_t rc, char *element);
46 XBT_PRIVATE AS_t generic_processing_units_exist(AS_t rc, char *element);
47 void generic_src_dst_check(AS_t rc, sg_netcard_t src, sg_netcard_t dst);
48
49 /* ************************************************************************** */
50 /* *************************** FLOYD ROUTING ******************************** */
51 //XBT_PRIVATE void model_floyd_parse_route(AS_t rc, sg_platf_route_cbarg_t route);
52
53 #define HOST_PEER(peername) bprintf("peer_%s", peername)
54 #define ROUTER_PEER(peername) bprintf("router_%s", peername)
55 #define LINK_PEER(peername) bprintf("link_%s", peername)
56
57 /* ************************************************************************** */
58 /* ************************* GRAPH EXPORTING FUNCTIONS ********************** */
59 XBT_PRIVATE xbt_node_t new_xbt_graph_node (xbt_graph_t graph, const char *name, xbt_dict_t nodes);
60 XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges);
61
62
63 #endif                          /* _SURF_SURF_ROUTING_PRIVATE_H */