+ xbt_dict_t as_dict = xbt_dict_new_homogeneous(xbt_free_f);
+ std::map<std::string, std::string>* props = host->getProperties();
+ if (props == nullptr)
+ return nullptr;
+ for (auto elm : *props) {
+ xbt_dict_set(as_dict, elm.first.c_str(), xbt_strdup(elm.second.c_str()), nullptr);
+ }
+ return as_dict;
+}
+
+/** \ingroup m_host_management
+ * \brief Returns the value of a given host property
+ *
+ * \param host a host
+ * \param name a property name
+ * \return value of a property (or nullptr if property not set)
+*/
+const char *sg_host_get_property_value(sg_host_t host, const char *name)
+{
+ return host->getProperty(name);
+}
+
+void sg_host_set_property_value(sg_host_t host, const char* name, const char* value)
+{
+ host->setProperty(name, value);
+}
+
+/**
+ * \brief Find a route between two hosts
+ *
+ * \param from where from
+ * \param to where to
+ * \param links [OUT] where to store the list of links (must exist, cannot be nullptr).
+ */
+void sg_host_route(sg_host_t from, sg_host_t to, xbt_dynar_t links)
+{
+ std::vector<simgrid::s4u::Link*> vlinks;
+ from->routeTo(to, &vlinks, nullptr);
+ for (auto link : vlinks)
+ xbt_dynar_push(links, &link);
+}
+/**
+ * \brief Find the latency of the route between two hosts
+ *
+ * \param from where from
+ * \param to where to
+ */
+double sg_host_route_latency(sg_host_t from, sg_host_t to)
+{
+ std::vector<simgrid::s4u::Link*> vlinks;
+ double res = 0;
+ from->routeTo(to, &vlinks, &res);
+ return res;
+}
+/**
+ * \brief Find the bandwitdh of the route between two hosts
+ *
+ * \param from where from
+ * \param to where to
+ */
+double sg_host_route_bandwidth(sg_host_t from, sg_host_t to)
+{
+ double min_bandwidth = -1.0;
+
+ std::vector<simgrid::s4u::Link*> vlinks;
+ from->routeTo(to, &vlinks, nullptr);
+ for (auto link : vlinks) {
+ double bandwidth = link->bandwidth();
+ if (bandwidth < min_bandwidth || min_bandwidth < 0.0)
+ min_bandwidth = bandwidth;
+ }
+ return min_bandwidth;
+}
+
+/** @brief Displays debugging information about a host */
+void sg_host_dump(sg_host_t host)
+{
+ XBT_INFO("Displaying host %s", host->getCname());
+ XBT_INFO(" - speed: %.0f", host->getSpeed());
+ XBT_INFO(" - available speed: %.2f", sg_host_get_available_speed(host));
+ std::map<std::string, std::string>* props = host->getProperties();
+
+ if (not props->empty()) {
+ XBT_INFO(" - properties:");
+ for (auto elm : *props) {
+ XBT_INFO(" %s->%s", elm.first.c_str(), elm.second.c_str());
+ }
+ }