xbt_dict_t dict_autonomous_systems;
xbt_dynar_t list_route;
xbt_dynar_t list_ASroute;
-} s_routing_component_rulebased_t, *routing_component_rulebased_t;
+} s_AS_rulebased_t, *AS_rulebased_t;
typedef struct s_rule_route s_rule_route_t, *rule_route_t;
typedef struct s_rule_route_extended s_rule_route_extended_t,
/* Parse routing model functions */
-static void model_rulebased_parse_PU(AS_t rc,
- const char *name)
+static void model_rulebased_parse_PU(AS_t rc, const char *name)
{
- routing_component_rulebased_t routing =
- (routing_component_rulebased_t) rc;
+ AS_rulebased_t routing = (AS_rulebased_t) rc;
xbt_dict_set(routing->dict_processing_units, name, (void *) (-1), NULL);
}
-static void model_rulebased_parse_AS(AS_t rc,
- const char *name)
+static void model_rulebased_parse_AS(AS_t rc, const char *name)
{
- routing_component_rulebased_t routing =
- (routing_component_rulebased_t) rc;
+ AS_rulebased_t routing = (AS_rulebased_t) rc;
xbt_dict_set(routing->dict_autonomous_systems, name, (void *) (-1),
NULL);
}
const char *src, const char *dst,
route_t route)
{
- routing_component_rulebased_t routing =
- (routing_component_rulebased_t) rc;
+ AS_rulebased_t routing = (AS_rulebased_t) rc;
rule_route_t ruleroute = xbt_new0(s_rule_route_t, 1);
const char *error;
int erroffset;
const char *src, const char *dst,
route_t route)
{
- routing_component_rulebased_t routing =
- (routing_component_rulebased_t) rc;
+ AS_rulebased_t routing = (AS_rulebased_t) rc;
rule_route_extended_t ruleroute_e = xbt_new0(s_rule_route_extended_t, 1);
const char *error;
int erroffset;
if(!strcmp(surf_network_model->name,"network NS3"))
return ret;
- routing_component_rulebased_t routing = (routing_component_rulebased_t)rc;
+ AS_rulebased_t routing = (AS_rulebased_t)rc;
xbt_dict_cursor_t c1 = NULL;
char *k1, *d1;
rc->name);
/* set utils vars */
- routing_component_rulebased_t routing =
- (routing_component_rulebased_t) rc;
+ AS_rulebased_t routing =
+ (AS_rulebased_t) rc;
int are_processing_units=0;
xbt_dynar_t rule_list;
static void rulebased_finalize(AS_t rc)
{
- routing_component_rulebased_t routing =
- (routing_component_rulebased_t) rc;
+ AS_rulebased_t routing =
+ (AS_rulebased_t) rc;
if (routing) {
xbt_dict_free(&routing->dict_processing_units);
xbt_dict_free(&routing->dict_autonomous_systems);
/* Creation routing model functions */
AS_t model_rulebased_create(void) {
- routing_component_rulebased_t new_component = (routing_component_rulebased_t)
- model_generic_create_sized(sizeof(s_routing_component_rulebased_t));
+ AS_rulebased_t new_component = (AS_rulebased_t)
+ model_generic_create_sized(sizeof(s_AS_rulebased_t));
new_component->generic_routing.parse_PU = model_rulebased_parse_PU;
new_component->generic_routing.parse_AS = model_rulebased_parse_AS;