-/* Copyright (c) 2006-2011. The SimGrid Team.
+/* Copyright (c) 2006-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/dict.h"
#include "xbt/sysdep.h"
#include "surf/surf.h"
link = xbt_new(s_SD_link_t, 1);
link->surf_link = surf_link;
link->data = data; /* user data */
- if (surf_workstation_model->extension.workstation.link_shared(surf_link))
+ if (surf_network_link_is_shared(surf_link))
link->sharing_policy = SD_LINK_SHARED;
else
link->sharing_policy = SD_LINK_FATPIPE;
i = 0;
xbt_lib_foreach(link_lib, cursor, key, data) {
- sd_global->link_list[i++] = (SD_link_t) data[SD_LINK_LEVEL];
+ sd_global->link_list[i++] = (SD_link_t) data[SD_LINK_LEVEL];
}
}
return sd_global->link_list;
*/
double SD_link_get_current_bandwidth(SD_link_t link)
{
- return surf_workstation_model->extension.workstation.
- get_link_bandwidth(link->surf_link);
+ return surf_network_link_get_bandwidth(link->surf_link);
}
/**
*/
double SD_link_get_current_latency(SD_link_t link)
{
- return surf_workstation_model->extension.workstation.
- get_link_latency(link->surf_link);
+ return surf_network_link_get_latency(link->surf_link);
}
/**
{
return link->sharing_policy;
}
-
-
-/* Destroys a link.
- */
-void __SD_link_destroy(void *link)
-{
- /* link->surf_link is freed by surf_exit and link->data is freed by the user */
- xbt_free(link);
-}