+/**
+ * \brief Return the host by its name
+ *
+ * Finds a smx_host_t using its name.
+ * \param name The name of an host.
+ * \return The corresponding host
+ */
+smx_host_t SIMIX_host_get_by_name(const char *name)
+{
+ xbt_fifo_item_t i = NULL;
+ smx_host_t host = NULL;
+
+ xbt_assert0(((simix_global != NULL)
+ && (simix_global->host != NULL)), "Environment not set yet");
+
+ xbt_fifo_foreach(simix_global->host,i,host,smx_host_t) {
+ if(strcmp(host->name, name) == 0) return host;
+ }
+ return NULL;
+}
+
+/**
+ * \brief Return the state of a workstation
+ *
+ * Return the state of a workstation. Two states are possible, 1 if the host is active or 0 if it has crashed.
+ * \param host The SIMIX host
+ * \return 1 if host is available or 0 if not.
+ */
+int SIMIX_host_get_state(smx_host_t host)
+{
+ xbt_assert0((host!= NULL), "Invalid parameters");
+
+ return(surf_workstation_resource->
+ extension_public->get_state(host->simdata->host));