namespace s4u {
/** @ingroup s4u_api
- *
+ *
* An actor is an independent stream of execution in your distributed application.
*
* You can think of an actor as a process in your distributed application, or as a thread in a multithreaded program.
- * This is the only component in SimGrid that actually does something on its own, executing its own code.
- * A resource will not get used if you don't schedule activities on them. This is the code of Actors that create and schedule these activities.
- *
+ * This is the only component in SimGrid that actually does something on its own, executing its own code.
+ * A resource will not get used if you don't schedule activities on them. This is the code of Actors that create and
+ * schedule these activities.
+ *
* An actor is located on a (simulated) host, but it can interact
* with the whole simulated platform.
- *
+ *
* The s4u::Actor API is strongly inspired from the C++11 threads.
- * The <a href="http://en.cppreference.com/w/cpp/thread">documentation
+ * The <a href="http://en.cppreference.com/w/cpp/thread">documentation
* of this standard</a> may help to understand the philosophy of the S4U
- * Actors.
- *
+ * Actors.
+ *
* @section s4u_actor_def Defining the skeleton of an Actor
- *
- * %As in the <a href="http://en.cppreference.com/w/cpp/thread">C++11
+ *
+ * As in the <a href="http://en.cppreference.com/w/cpp/thread">C++11
* standard</a>, you can declare the code of your actor either as a
* pure function or as an object. It is very simple with functions:
- *
+ *
* @code{.cpp}
* #include "s4u/actor.hpp"
- *
+ *
* // Declare the code of your worker
* void worker() {
* printf("Hello s4u");
* simgrid::s4u::this_actor::execute(5*1024*1024); // Get the worker executing a task of 5 MFlops
* };
- *
+ *
* // From your main or from another actor, create your actor on the host Jupiter
- * // The following line actually creates a new actor, even if there is no "new".
+ * // The following line actually creates a new actor, even if there is no "new".
* Actor("Alice", simgrid::s4u::Host::by_name("Jupiter"), worker);
* @endcode
- *
+ *
* But some people prefer to encapsulate their actors in classes and
* objects to save the actor state in a cleanly dedicated location.
* The syntax is slightly more complicated, but not much.
- *
+ *
* @code{.cpp}
* #include "s4u/actor.hpp"
- *
+ *
* // Declare the class representing your actors
* class Worker {
* public:
* simgrid::s4u::this_actor::execute(5*1024*1024); // Get the worker executing a task of 5 MFlops
* }
* };
- *
+ *
* // From your main or from another actor, create your actor. Note the () after Worker
* Actor("Bob", simgrid::s4u::Host::by_name("Jupiter"), Worker());
* @endcode
- *
+ *
* @section s4u_actor_flesh Fleshing your actor
- *
+ *
* The body of your actor can use the functions of the
* simgrid::s4u::this_actor namespace to interact with the world.
* This namespace contains the methods to start new activities
* (executions, communications, etc), and to get informations about
* the currently running thread (its location, etc).
- *
+ *
* Please refer to the @link simgrid::s4u::this_actor full API @endlink.
*
- *
+ *
* @section s4u_actor_deploy Using a deployment file
- *
+ *
* @warning This is currently not working with S4U. Sorry about that.
- *
+ *
* The best practice is to use an external deployment file as
* follows, because it makes it easier to test your application in
* differing settings. Load this file with
- * s4u::Engine::loadDeployment() before the simulation starts.
+ * s4u::Engine::loadDeployment() before the simulation starts.
* Refer to the @ref deployment section for more information.
- *
+ *
* @code{.xml}
* <?xml version='1.0'?>
* <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
* <platform version="4">
- *
+ *
* <!-- Start a process called 'master' on the host called 'Tremblay' -->
* <process host="Tremblay" function="master">
* <!-- Here come the parameter that you want to feed to this instance of master -->
* <argument value="1000000"/> <!-- argv[3] -->
* <argument value="5"/> <!-- argv[4] -->
* </process>
- *
+ *
* <!-- Start a process called 'worker' on the host called 'Jupiter' -->
* <process host="Jupiter" function="worker"/> <!-- Don't provide any parameter ->>
- *
+ *
* </platform>
* @endcode
- *
+ *
* @{
*/
/* 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. */
-#ifndef SIMGRID_S4U_AS_HPP
-#define SIMGRID_S4U_AS_HPP
+#ifndef SIMGRID_S4U_NETZONE_HPP
+#define SIMGRID_S4U_NETZONE_HPP
#include <map>
#include <string>
}
namespace s4u {
-/** @brief Autonomous Systems
+/** @brief Networking Zones
*
- * An AS is a network container, in charge of routing information between elements (hosts) and to the nearby ASes.
- * In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine).
+ * A netzone is a network container, in charge of routing information between elements (hosts) and to the nearby
+ * netzones. In SimGrid, there is a hierarchy of netzones, with a unique root zone (that you can retrieve from the
+ * s4u::Engine).
*/
XBT_PUBLIC_CLASS NetZone
{
virtual ~NetZone();
public:
- /** @brief Seal your AS once you're done adding content, and before routing stuff through it */
+ /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
virtual void seal();
char* name();
NetZone* father();
;
- xbt_dict_t children(); // Sub AS
+ xbt_dict_t children(); // Sub netzones
xbt_dynar_t hosts(); // my content as a dynar
public:
- /* Add content to the AS, at parsing time. It should be sealed afterward. */
- virtual int addComponent(kernel::routing::NetCard * elm); /* A host, a router or an AS, whatever */
+ /* Add content to the netzone, at parsing time. It should be sealed afterward. */
+ virtual int addComponent(kernel::routing::NetCard * elm); /* A host, a router or a netzone, whatever */
virtual void addRoute(sg_platf_route_cbarg_t route);
virtual void addBypassRoute(sg_platf_route_cbarg_t e_route) = 0;
bool sealed_ = false; // We cannot add more content when sealed
- xbt_dict_t children_ = xbt_dict_new_homogeneous(nullptr); // sub-ASes
+ xbt_dict_t children_ = xbt_dict_new_homogeneous(nullptr); // sub-netzones
};
}
}; // Namespace simgrid::s4u
-#endif /* SIMGRID_S4U_AS_HPP */
+#endif /* SIMGRID_S4U_NETZONE_HPP */
static s4u::Engine *instance();
/** @brief Retrieve the root AS, containing all others */
- simgrid::s4u::NetZone* rootAs();
+ simgrid::s4u::NetZone* netRoot();
/** @brief Retrieve the AS of the given name (or nullptr if not found) */
- simgrid::s4u::NetZone* asByNameOrNull(const char* name);
+ simgrid::s4u::NetZone* netzoneByNameOrNull(const char* name);
template<class F>
void registerFunction(const char* name)
}
EngineImpl::~EngineImpl()
{
- delete rootAs_;
+ delete netRoot_;
}
}
}
public:
EngineImpl();
virtual ~EngineImpl();
- kernel::routing::NetZoneImpl* rootAs_ = nullptr;
+ kernel::routing::NetZoneImpl* netRoot_ = nullptr;
protected:
friend simgrid::s4u::Engine;
routingTable_ = xbt_new0(sg_platf_route_cbarg_t, table_size * table_size);
/* Check that the route does not already exist */
- if (route->gw_dst) // AS route (to adapt the error message, if any)
+ if (route->gw_dst) // inter-zone route (to adapt the error message, if any)
xbt_assert(nullptr == TO_ROUTE_FULL(src->id(), dst->id()),
"The route between %s@%s and %s@%s already exists (Rq: routes are symmetrical by default).",
src->cname(), route->gw_src->cname(), dst->cname(), route->gw_dst->cname());
route->gw_src = route->gw_dst;
route->gw_dst = gw_tmp;
}
- if (route->gw_dst) // AS route (to adapt the error message, if any)
+ if (route->gw_dst) // inter-zone route (to adapt the error message, if any)
xbt_assert(
nullptr == TO_ROUTE_FULL(dst->id(), src->id()),
"The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.",
class NetCard : public simgrid::xbt::Extendable<NetCard> {
public:
- enum class Type { Host, Router, As };
+ enum class Type { Host, Router, NetZone };
- NetCard(std::string name, NetCard::Type componentType, NetZoneImpl* containingAS)
- : name_(name), componentType_(componentType), containingAS_(containingAS)
+ NetCard(std::string name, NetCard::Type componentType, NetZoneImpl* netzone_p)
+ : name_(name), componentType_(componentType), netzone_(netzone_p)
{
- if (containingAS != nullptr)
- id_ = containingAS->addComponent(this);
+ if (netzone_p != nullptr)
+ id_ = netzone_p->addComponent(this);
simgrid::kernel::routing::NetCard::onCreation(this);
}
~NetCard() = default;
unsigned int id() { return id_; }
std::string name() { return name_; }
const char* cname() { return name_.c_str(); }
- // This is the AS in which I am
- NetZoneImpl* containingAS() { return containingAS_; }
+ /** @brief the NetZone in which this netcard is included */
+ NetZoneImpl* netzone() { return netzone_; }
- bool isAS() { return componentType_ == Type::As; }
+ bool isNetZone() { return componentType_ == Type::NetZone; }
bool isHost() { return componentType_ == Type::Host; }
bool isRouter() { return componentType_ == Type::Router; }
unsigned int id_;
std::string name_;
NetCard::Type componentType_;
- NetZoneImpl* containingAS_;
+ NetZoneImpl* netzone_;
};
}
}
NetZoneImpl::NetZoneImpl(NetZone* father, const char* name) : NetZone(father, name)
{
xbt_assert(nullptr == xbt_lib_get_or_null(as_router_lib, name, ROUTING_ASR_LEVEL),
- "Refusing to create a second AS called '%s'.", name);
+ "Refusing to create a second NetZone called '%s'.", name);
- netcard_ = new NetCard(name, NetCard::Type::As, static_cast<NetZoneImpl*>(father));
+ netcard_ = new NetCard(name, NetCard::Type::NetZone, static_cast<NetZoneImpl*>(father));
xbt_lib_set(as_router_lib, name, ROUTING_ASR_LEVEL, static_cast<void*>(netcard_));
- XBT_DEBUG("AS '%s' created with the id '%d'", name, netcard_->id());
+ XBT_DEBUG("NetZone '%s' created with the id '%d'", name, netcard_->id());
}
NetZoneImpl::~NetZoneImpl()
{
* / \
* src_ancestor dst_ancestor <- must be different in the recursive case
* | |
- * ... ... <-- possibly long pathes (one hop or more)
+ * ... ... <-- possibly long paths (one hop or more)
* | |
* src dst
* @endverbatim
NetZoneImpl** dst_ancestor)
{
/* Deal with the easy base case */
- if (src->containingAS() == dst->containingAS()) {
- *common_ancestor = src->containingAS();
+ if (src->netzone() == dst->netzone()) {
+ *common_ancestor = src->netzone();
*src_ancestor = *common_ancestor;
*dst_ancestor = *common_ancestor;
return;
/* engage the full recursive search */
/* (1) find the path to root of src and dst*/
- NetZoneImpl* src_as = src->containingAS();
- NetZoneImpl* dst_as = dst->containingAS();
+ NetZoneImpl* src_as = src->netzone();
+ NetZoneImpl* dst_as = dst->netzone();
xbt_assert(src_as, "Host %s must be in an AS", src->cname());
xbt_assert(dst_as, "Host %s must be in an AS", dst->cname());
/* (2) find the path to the root routing component */
std::vector<NetZoneImpl*> path_src;
- NetZoneImpl* current = src->containingAS();
+ NetZoneImpl* current = src->netzone();
while (current != nullptr) {
path_src.push_back(current);
current = static_cast<NetZoneImpl*>(current->father());
}
std::vector<NetZoneImpl*> path_dst;
- current = dst->containingAS();
+ current = dst->netzone();
while (current != nullptr) {
path_dst.push_back(current);
current = static_cast<NetZoneImpl*>(current->father());
return false;
/* Base case, no recursion is needed */
- if (dst->containingAS() == this && src->containingAS() == this) {
+ if (dst->netzone() == this && src->netzone() == this) {
if (bypassRoutes_.find({src, dst}) != bypassRoutes_.end()) {
BypassRoute* bypassedRoute = bypassRoutes_.at({src, dst});
for (surf::Link* link : bypassedRoute->links) {
/* (1) find the path to the root routing component */
std::vector<NetZoneImpl*> path_src;
- NetZone* current = src->containingAS();
+ NetZone* current = src->netzone();
while (current != nullptr) {
path_src.push_back(static_cast<NetZoneImpl*>(current));
current = current->father_;
}
std::vector<NetZoneImpl*> path_dst;
- current = dst->containingAS();
+ current = dst->netzone();
while (current != nullptr) {
path_dst.push_back(static_cast<NetZoneImpl*>(current));
current = current->father_;
/* 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. */
-#ifndef SIMGRID_SURF_AS_HPP
-#define SIMGRID_SURF_AS_HPP
+#ifndef SIMGRID_ROUTING_NETZONEIMPL_HPP
+#define SIMGRID_ROUTING_NETZONEIMPL_HPP
#include "xbt/graph.h"
namespace routing {
class BypassRoute;
-/** @brief Autonomous Systems
+/** @brief Networking Zones
*
- * An AS is a network container, in charge of routing information between elements (hosts) and to the nearby ASes.
- * In SimGrid, there is a hierarchy of ASes, ie a tree with a unique root AS, that you can retrieve from the
- * s4u::Engine.
+ * A netzone is a network container, in charge of routing information between elements (hosts) and to the nearby
+ * netzones. In SimGrid, there is a hierarchy of netzones, ie a tree with a unique root NetZone, that you can retrieve
+ * from the s4u::Engine.
*
* The purpose of the kernel::routing module is to retrieve the routing path between two points in a time- and
- * space-efficient manner. This is done by AsImpl::getGlobalRoute(), called when creating a communication to
+ * space-efficient manner. This is done by NetZoneImpl::getGlobalRoute(), called when creating a communication to
* retrieve both the list of links that the create communication will use, and the summed latency that these
* links represent.
*
* set traversal. This operation being on the critical path of SimGrid, the routing computes the latency on the
* behalf of the network.
*
- * Finding the path between two nodes is rather complex because we navigate a hierarchy of ASes, each of them
- * being a full network. In addition, the routing can declare shortcuts (called bypasses), either within an AS
- * at the route level or directly between ASes. Also, each AS can use a differing routing algorithm, depending
- * on its class. @ref{AsFull} have a full matrix giving explicitly the path between any pair of their
- * contained nodes, while @ref{AsDijkstra} or @ref{AsFloyd} rely on a shortest path algorithm. @ref{AsVivaldi}
+ * Finding the path between two nodes is rather complex because we navigate a hierarchy of netzones, each of them
+ * being a full network. In addition, the routing can declare shortcuts (called bypasses), either within a NetZone
+ * at the route level or directly between NetZones. Also, each NetZone can use a differing routing algorithm, depending
+ * on its class. @ref{FullZone} have a full matrix giving explicitly the path between any pair of their
+ * contained nodes, while @ref{DijkstraZone} or @ref{FloydZone} rely on a shortest path algorithm. @ref{VivaldiZone}
* does not even have any link but only use only coordinate information to compute the latency.
*
- * So AsImpl::getGlobalRoute builds the path recursively asking its specific information to each traversed AS with
- * AsImpl::getLocalRoute, that is redefined in each sub-class.
- * The algorithm for that is explained in http://hal.inria.fr/hal-00650233/
+ * So NetZoneImpl::getGlobalRoute builds the path recursively asking its specific information to each traversed NetZone
+ * with NetZoneImpl::getLocalRoute, that is redefined in each sub-class.
+ * The algorithm for that is explained in http://hal.inria.fr/hal-00650233/ (but for historical reasons, NetZones are
+ * called Autonomous Systems in this article).
*
*/
XBT_PUBLIC_CLASS NetZoneImpl : public s4u::NetZone
{
- friend simgrid::kernel::EngineImpl; // it destroys rootAs_
+ friend simgrid::kernel::EngineImpl; // it destroys netRoot_
protected:
explicit NetZoneImpl(NetZone * father, const char* name);
virtual ~NetZoneImpl();
public:
- /** @brief Make an host within that AS */
+ /** @brief Make an host within that NetZone */
simgrid::s4u::Host* createHost(const char* name, std::vector<double>* speedPerPstate, int coreAmount);
- /** @brief Creates a new route in this AS */
+ /** @brief Creates a new route in this NetZone */
void addBypassRoute(sg_platf_route_cbarg_t e_route) override;
protected:
/**
- * @brief Probe the routing path between two points that are local to the called AS.
+ * @brief Probe the routing path between two points that are local to the called NetZone.
*
* @param src where from
* @param dst where to
private:
std::map<std::pair<NetCard*, NetCard*>, BypassRoute*> bypassRoutes_; // src x dst -> route
- routing::NetCard* netcard_ = nullptr; // Our representative in the father AS
+ routing::NetCard* netcard_ = nullptr; // Our representative in the father NetZone
};
}
}
}; // Namespace simgrid::kernel::routing
-#endif /* SIMGRID_SURF_AS_HPP */
+#endif /* SIMGRID_ROUTING_NETZONEIMPL_HPP */
xbt_assert(src, "Cannot find a route from nullptr to %s", dst->cname());
xbt_assert(dst, "Cannot find a route from %s to nullptr", src->cname());
- NetZone* src_as = src->containingAS();
- NetZone* dst_as = dst->containingAS();
+ NetZone* src_as = src->netzone();
+ NetZone* dst_as = dst->netzone();
xbt_assert(src_as == dst_as,
"Internal error: %s@%s and %s@%s are not in the same AS as expected. Please report that bug.",
xbt_assert(src, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, srcName);
xbt_assert(dst, "Cannot add a route from %s to %s: %s does not exist.", srcName, dstName, dstName);
xbt_assert(!route->link_list->empty(), "Empty route (between %s and %s) forbidden.", srcName, dstName);
- xbt_assert(!src->isAS(),
+ xbt_assert(!src->isNetZone(),
"When defining a route, src cannot be an AS such as '%s'. Did you meant to have an ASroute?", srcName);
- xbt_assert(!dst->isAS(),
+ xbt_assert(!dst->isNetZone(),
"When defining a route, dst cannot be an AS such as '%s'. Did you meant to have an ASroute?", dstName);
} else {
XBT_DEBUG("Load ASroute from %s@%s to %s@%s", srcName, route->gw_src->cname(), dstName, route->gw_dst->cname());
- xbt_assert(src->isAS(), "When defining an ASroute, src must be an AS but '%s' is not", srcName);
- xbt_assert(dst->isAS(), "When defining an ASroute, dst must be an AS but '%s' is not", dstName);
+ xbt_assert(src->isNetZone(), "When defining an ASroute, src must be an AS but '%s' is not", srcName);
+ xbt_assert(dst->isNetZone(), "When defining an ASroute, dst must be an AS but '%s' is not", dstName);
xbt_assert(route->gw_src->isHost() || route->gw_src->isRouter(),
"When defining an ASroute, gw_src must be an host or a router but '%s' is not.", srcName);
{
simgrid::kernel::routing::vivaldi::Coords* coords = nc->extension<simgrid::kernel::routing::vivaldi::Coords>();
xbt_assert(coords, "Please specify the Vivaldi coordinates of %s %s (%p)",
- (nc->isAS() ? "AS" : (nc->isHost() ? "Host" : "Router")), nc->cname(), nc);
+ (nc->isNetZone() ? "AS" : (nc->isHost() ? "Host" : "Router")), nc->cname(), nc);
return &coords->coords;
}
VivaldiZone::VivaldiZone(NetZone* father, const char* name) : ClusterZone(father, name)
void VivaldiZone::setPeerLink(NetCard* netcard, double bw_in, double bw_out, double latency, const char* coord)
{
- xbt_assert(netcard->containingAS() == this, "Cannot add a peer link to a netcard that is not in this AS");
+ xbt_assert(netcard->netzone() == this, "Cannot add a peer link to a netcard that is not in this AS");
new simgrid::kernel::routing::vivaldi::Coords(netcard, coord);
{
XBT_DEBUG("vivaldi getLocalRoute from '%s'[%d] '%s'[%d]", src->cname(), src->id(), dst->cname(), dst->id());
- if (src->isAS()) {
+ if (src->isNetZone()) {
char* srcName = bprintf("router_%s", src->cname());
char* dstName = bprintf("router_%s", dst->cname());
route->gw_src = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib, srcName, ROUTING_ASR_LEVEL);
}
msg_as_t MSG_environment_get_routing_root() {
- return simgrid::s4u::Engine::instance()->rootAs();
+ return simgrid::s4u::Engine::instance()->netRoot();
}
const char *MSG_environment_as_get_name(msg_as_t as) {
}
msg_as_t MSG_environment_as_get_by_name(const char * name) {
- return simgrid::s4u::Engine::instance()->asByNameOrNull(name);
+ return simgrid::s4u::Engine::instance()->netzoneByNameOrNull(name);
}
xbt_dict_t MSG_environment_as_get_routing_sons(msg_as_t as) {
}
}
-s4u::NetZone* Engine::rootAs()
+s4u::NetZone* Engine::netRoot()
{
- return pimpl->rootAs_;
+ return pimpl->netRoot_;
}
-static s4u::NetZone* asByNameRecursive(s4u::NetZone* current, const char* name)
+static s4u::NetZone* netzoneByNameRecursive(s4u::NetZone* current, const char* name)
{
if(!strcmp(current->name(), name))
return current;
char *key;
NetZone_t elem;
xbt_dict_foreach(current->children(), cursor, key, elem) {
- simgrid::s4u::NetZone* tmp = asByNameRecursive(elem, name);
+ simgrid::s4u::NetZone* tmp = netzoneByNameRecursive(elem, name);
if (tmp != nullptr )
return tmp;
}
return nullptr;
}
-/** @brief Retrieve the AS of the given name (or nullptr if not found) */
-NetZone* Engine::asByNameOrNull(const char* name)
+/** @brief Retrieve the NetZone of the given name (or nullptr if not found) */
+NetZone* Engine::netzoneByNameOrNull(const char* name)
{
- return asByNameRecursive(rootAs(),name);
+ return netzoneByNameRecursive(netRoot(), name);
}
}
#include "src/surf/network_interface.hpp" // Link FIXME: move to proper header
#include "src/surf/surf_routing.hpp"
-XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_as, "S4U autonomous systems");
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_netzone, "S4U Networking Zones");
namespace simgrid {
namespace s4u {
currentContainer.clear();
xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f);
XBT_DEBUG ("Starting graph extraction.");
- recursiveGraphExtraction (simgrid::s4u::Engine::instance()->rootAs(), PJ_container_get_root(), filter);
+ recursiveGraphExtraction(simgrid::s4u::Engine::instance()->netRoot(), PJ_container_get_root(), filter);
XBT_DEBUG ("Graph extraction finished.");
xbt_dict_free(&filter);
platform_created = 1;
xbt_graph_t ret = xbt_graph_new_graph (0, nullptr);
xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr);
xbt_dict_t edges = xbt_dict_new_homogeneous(nullptr);
- recursiveXBTGraphExtraction (ret, nodes, edges, simgrid::s4u::Engine::instance()->rootAs(), PJ_container_get_root());
+ recursiveXBTGraphExtraction(ret, nodes, edges, simgrid::s4u::Engine::instance()->netRoot(), PJ_container_get_root());
xbt_dict_free (&nodes);
xbt_dict_free (&edges);
return ret;
}
if (current_routing == nullptr) { /* it is the first one */
- xbt_assert(simgrid::s4u::Engine::instance()->pimpl->rootAs_ == nullptr,
+ xbt_assert(simgrid::s4u::Engine::instance()->pimpl->netRoot_ == nullptr,
"All defined components must belong to a AS");
- simgrid::s4u::Engine::instance()->pimpl->rootAs_ = new_as;
+ simgrid::s4u::Engine::instance()->pimpl->netRoot_ = new_as;
} else {
/* set the father behavior */
XBT_LOG_CONNECT(s4u);
XBT_LOG_CONNECT(s4u_activity);
XBT_LOG_CONNECT(s4u_actor);
- XBT_LOG_CONNECT(s4u_as);
+ XBT_LOG_CONNECT(s4u_netzone);
XBT_LOG_CONNECT(s4u_channel);
XBT_LOG_CONNECT(s4u_comm);
XBT_LOG_CONNECT(s4u_file);
sg_host_t host;
xbt_dynar_foreach(hosts, it, host) {
simgrid::kernel::routing::NetCard * nc = host->pimpl_netcard;
- printf(" - Seen: \"%s\". Type: %s\n", host->cname(), nc->isRouter() ? "router" : (nc->isAS() ? "AS" : "host"));
+ printf(" - Seen: \"%s\". Type: %s\n", host->cname(),
+ nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : "host"));
}
xbt_dynar_free(&hosts);
void *ignored;
xbt_lib_foreach(as_router_lib, cursor, key, ignored) {
simgrid::kernel::routing::NetCard * nc = sg_netcard_by_name_or_null(key);
- printf(" - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isAS()?"AS":"host"));
+ printf(" - Seen: \"%s\". Type: %s\n", key, nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : "host"));
}
SD_exit();
> - Seen: "router3". Type: router
> - Seen: "router4". Type: router
> - Seen: "router5". Type: router
-> - Seen: "AS0". Type: AS
-> - Seen: "AS1". Type: AS
-> - Seen: "AS2". Type: AS
-> - Seen: "AS3". Type: AS
-> - Seen: "AS4". Type: AS
-> - Seen: "AS". Type: AS
+> - Seen: "AS0". Type: netzone
+> - Seen: "AS1". Type: netzone
+> - Seen: "AS2". Type: netzone
+> - Seen: "AS3". Type: netzone
+> - Seen: "AS4". Type: netzone
+> - Seen: "AS". Type: netzone