+
+/**
+ * @beginrst
+ * A SplitDuplexLink encapsulates the :cpp:class:`links <simgrid::s4u::Link>` which
+ * compose a Split-Duplex link. Remember that a Split-Duplex link is nothing more than
+ * a pair of up/down links.
+ * @endrst
+ */
+class XBT_PUBLIC SplitDuplexLink : public Link {
+public:
+ explicit SplitDuplexLink(kernel::resource::LinkImplIntf* pimpl) : Link(pimpl) {}
+ /** @brief Get the link direction up*/
+ Link* get_link_up() const;
+ /** @brief Get the link direction down */
+ Link* get_link_down() const;
+
+ /** @brief Retrieve a link from its name */
+ static SplitDuplexLink* by_name(const std::string& name);
+};
+
+/**
+ * @beginrst
+ * Another encapsulation for using links in the :cpp:func:`NetZone::add_route`
+ *
+ * When adding a route with split-duplex links, you need to specify the direction of the link
+ * so SimGrid can know exactly which physical link to insert in the route.
+ *
+ * For shared/fat-pipe links, use the :cpp:enumerator:`Direction::NONE` since they don't have
+ * the concept of UP/DOWN links.
+ * @endrst
+ */
+class XBT_PUBLIC LinkInRoute {
+public:
+ enum class Direction { UP = 2, DOWN = 1, NONE = 0 };
+
+ explicit LinkInRoute(const Link* link) : link_(link) {}
+ LinkInRoute(const Link* link, Direction d) : link_(link), direction_(d) {}
+
+ /** @brief Get direction of this link in the route: UP or DOWN */
+ Direction get_direction() const { return direction_; }
+ /** @brief Get pointer to the link */
+ const Link* get_link() const { return link_; }
+
+private:
+ const Link* link_;
+ Direction direction_ = Direction::NONE;
+};
+