diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp
index 9f97413..892dc01 100644
--- a/tests/daemon/fw/topology-tester.hpp
+++ b/tests/daemon/fw/topology-tester.hpp
@@ -54,7 +54,7 @@
 {
 public:
   explicit
-  TopologyLink(const time::nanoseconds& delay);
+  TopologyLink(time::nanoseconds delay);
 
   /** \brief fail the link, cause packets to be dropped silently
    */
@@ -72,11 +72,24 @@
     m_isUp = true;
   }
 
+  /** \brief block transmission from i to j
+   *
+   *  Packets transmitted by i would not be delivered to j. Packets from j to i are unaffected.
+   *  This can be used to simulate a wireless channel.
+   */
+  void
+  block(TopologyNode i, TopologyNode j);
+
+  /** \brief unblock transmission from i to j
+   */
+  void
+  unblock(TopologyNode i, TopologyNode j);
+
   /** \brief change the link delay
    *  \param delay link delay, must be positive
    */
   void
-  setDelay(const time::nanoseconds& delay);
+  setDelay(time::nanoseconds delay);
 
   /** \brief attach a face to the link
    *  \param i forwarder index
@@ -90,15 +103,9 @@
   Face&
   getFace(TopologyNode i)
   {
-    return *m_faces.at(i);
+    return *m_transports.at(i).face;
   }
 
-protected:
-  /** \brief attach a Transport onto this link
-   */
-  void
-  attachTransport(TopologyNode i, face::InternalTransportBase* transport);
-
 private:
   void
   transmit(TopologyNode i, const Block& packet);
@@ -109,8 +116,14 @@
 private:
   bool m_isUp;
   time::nanoseconds m_delay;
-  std::unordered_map<TopologyNode, face::InternalTransportBase*> m_transports;
-  std::unordered_map<TopologyNode, shared_ptr<Face>> m_faces;
+
+  struct NodeTransport
+  {
+    face::InternalTransportBase* transport;
+    shared_ptr<Face> face;
+    std::set<TopologyNode> blockedDestinations;
+  };
+  std::unordered_map<TopologyNode, NodeTransport> m_transports;
 };
 
 /** \brief represents a link to a local application
@@ -203,15 +216,18 @@
   }
 
   /** \brief makes a link that interconnects two or more forwarders
+   *  \brief linkType desired link type; LINK_TYPE_NONE to use point-to-point for two forwarders
+   *                  and multi-access for more than two forwarders; it's an error to specify
+   *                  point-to-point when there are more than two forwarders
    *
    *  A face is created on each of \p forwarders .
    *  When a packet is sent onto one of the faces on this link,
    *  this packet will be received by all other faces on this link after \p delay .
    */
   shared_ptr<TopologyLink>
-  addLink(const std::string& label, const time::nanoseconds& delay,
+  addLink(const std::string& label, time::nanoseconds delay,
           std::initializer_list<TopologyNode> forwarders,
-          bool forceMultiAccessFace = false);
+          ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_NONE);
 
   /** \brief makes a link to local application
    */
@@ -246,10 +262,11 @@
 
   /** \brief creates a consumer application that sends \p n Interests under \p prefix
    *         at \p interval fixed rate.
+   *  \param seq if non-negative, append sequence number instead of timestamp
    */
   void
-  addIntervalConsumer(ndn::Face& face, const Name& prefix,
-                      const time::nanoseconds& interval, size_t n);
+  addIntervalConsumer(ndn::Face& face, const Name& prefix, time::nanoseconds interval,
+                      size_t n, int seq = -1);
 
 private:
   bool m_wantPcap = false;
