From 2910112e5b4172013e6d536a4951371b4dd8d582 Mon Sep 17 00:00:00 2001 From: navarrop Date: Tue, 28 Sep 2010 08:52:18 +0000 Subject: [PATCH 1/1] add the floyd algorithm for a routing schema L git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8227 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/surf_private.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/surf/surf_private.h b/src/surf/surf_private.h index 5bd20d1f03..c4573b2062 100644 --- a/src/surf/surf_private.h +++ b/src/surf/surf_private.h @@ -114,8 +114,20 @@ struct s_routing { // HERE START THE NEW STRUCTURES //////////////////////////////////////////////////////////////////////////////// +typedef enum { + SURF_NETWORK_ELEMENT_NULL = 0, /* NULL */ + SURF_NETWORK_ELEMENT_HOST, /* host type */ + SURF_NETWORK_ELEMENT_ROUTER, /* router type */ + SURF_NETWORK_ELEMENT_GATEWAY, /* gateway type of the AS */ + SURF_NETWORK_ELEMENT_AS, /* AS type */ + SURF_NETWORK_ELEMENT_AS_GATEWAY, /* gateway type for internals AS */ + SURF_NETWORK_ELEMENT_LINK /* link type */ +} e_surf_network_element_type_t; + typedef struct s_model_type s_model_type_t, *model_type_t; +typedef struct s_network_element s_network_element_t, *network_element_t; typedef struct s_route s_route_t, *route_t; +typedef struct s_route_limits s_route_limits_t, *route_limits_t; typedef struct s_route_extended s_route_extended_t, *route_extended_t; typedef struct s_routing_component s_routing_component_t, *routing_component_t; typedef struct s_routing_global s_routing_global_t, *routing_global_t; @@ -129,10 +141,20 @@ struct s_model_type { void (*end)(); }; +struct s_network_element { + int id; + e_surf_network_element_type_t type; +}; + struct s_route { xbt_dynar_t link_list; }; +struct s_route_limits { + char* src_gateway; + char* dst_gateway; +}; + struct s_route_extended { s_route_t generic_route; char* src_gateway; @@ -145,6 +167,7 @@ struct s_routing_component { struct s_routing_component* routing_father; xbt_dict_t routing_sons; route_extended_t (*get_route)(routing_component_t rc, const char* src, const char* dst); + xbt_dict_t (*get_network_elements)(routing_component_t rc, e_surf_network_element_type_t type); void (*finalize)(routing_component_t rc); }; -- 2.20.1