-
-/**
- * \brief Set the end points for a route
- */
-static void routing_parse_S_route(void)
-{
- src = A_surfxml_route_src;
- dst = A_surfxml_route_dst;
- xbt_assert(strlen(src) > 0 || strlen(dst) > 0,
- "Missing end-points while defining route \"%s\"->\"%s\"",
- src, dst);
- parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-}
-
-/**
- * \brief Set the end points and gateways for a ASroute
- */
-static void routing_parse_S_ASroute(void)
-{
- src = A_surfxml_ASroute_src;
- dst = A_surfxml_ASroute_dst;
- gw_src = A_surfxml_ASroute_gw_src;
- gw_dst = A_surfxml_ASroute_gw_dst;
- xbt_assert(strlen(src) > 0 || strlen(dst) > 0 || strlen(gw_src) > 0 || strlen(gw_dst) > 0,
- "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
- src, dst,gw_src,gw_dst);
- parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-}
-
-/**
- * \brief Set the end points for a bypassRoute
- */
-static void routing_parse_S_bypassRoute(void)
-{
- src = A_surfxml_bypassRoute_src;
- dst = A_surfxml_bypassRoute_dst;
- gw_src = NULL;
- gw_dst = NULL;
- xbt_assert(strlen(src) > 0 || strlen(dst) > 0 || strlen(gw_src) > 0 || strlen(gw_dst) > 0,
- "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
- src, dst,gw_src,gw_dst);
- parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-}
-
-/**
- * \brief Set the end points for a bypassASroute
- */
-static void routing_parse_S_bypassASroute(void)
-{
- src = A_surfxml_bypassASroute_src;
- dst = A_surfxml_bypassASroute_dst;
- gw_src = A_surfxml_bypassASroute_gw_src;
- gw_dst = A_surfxml_bypassASroute_gw_dst;
- xbt_assert(strlen(src) > 0 || strlen(dst) > 0 || strlen(gw_src) > 0 || strlen(gw_dst) > 0,
- "Missing end-points while defining route \"%s\"->\"%s\" (with %s and %s as gateways)",
- src, dst,gw_src,gw_dst);
- parsed_link_list = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-}
-/**
- * \brief Set a new link on the actual list of link for a route or ASroute from XML
- */
-
-static void routing_parse_link_ctn(void)
-{
- char *link_id;
- switch (A_surfxml_link_ctn_direction) {
- case AU_surfxml_link_ctn_direction:
- case A_surfxml_link_ctn_direction_NONE:
- link_id = xbt_strdup(A_surfxml_link_ctn_id);
- break;
- case A_surfxml_link_ctn_direction_UP:
- link_id = bprintf("%s_UP", A_surfxml_link_ctn_id);
- break;
- case A_surfxml_link_ctn_direction_DOWN:
- link_id = bprintf("%s_DOWN", A_surfxml_link_ctn_id);
- break;
- }
- xbt_dynar_push(parsed_link_list, &link_id);
-}
-