fw: remove EndpointId from egress APIs
This commit partially reverts c70794810592a90847656a97caf27f0326668240
refs: #4849, #4973
Change-Id: I1063e5de2c0e3c90971c4ae006ce46de386c2ed0
diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index 90e8524..2088a60 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -278,7 +278,7 @@
nfd::pit::Pit& pit = topo.getForwarder(nodeB).getPit();
shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
- topo.getForwarder(nodeB).onOutgoingInterest(pitEntry, FaceEndpoint(linkBC->getFace(nodeB), 0), *interest);
+ topo.getForwarder(nodeB).onOutgoingInterest(pitEntry, linkBC->getFace(nodeB), *interest);
this->advanceClocks(time::milliseconds(100));
interest->refreshNonce();
diff --git a/tests/daemon/fw/dummy-strategy.cpp b/tests/daemon/fw/dummy-strategy.cpp
index 84038c7..3a6e338 100644
--- a/tests/daemon/fw/dummy-strategy.cpp
+++ b/tests/daemon/fw/dummy-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -60,7 +60,7 @@
++afterReceiveInterest_count;
if (interestOutFace != nullptr) {
- this->sendInterest(pitEntry, FaceEndpoint(*interestOutFace, 0), interest);
+ this->sendInterest(pitEntry, *interestOutFace, interest);
}
else {
this->rejectPendingInterest(pitEntry);
diff --git a/tests/daemon/fw/dummy-strategy.hpp b/tests/daemon/fw/dummy-strategy.hpp
index 04a5d9d..aacc1e4 100644
--- a/tests/daemon/fw/dummy-strategy.hpp
+++ b/tests/daemon/fw/dummy-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -31,14 +31,12 @@
namespace nfd {
namespace tests {
-/** \brief strategy for unit testing
+/** \brief Forwarding strategy for unit testing
*
* Triggers are recorded but do nothing.
*
* DummyStrategy registers itself as /dummy-strategy/<max-version>, so that it can be instantiated
- * with any version number. Aliases can be created with \p registerAs function.
- *
- * \note This strategy is not EndpointId-aware.
+ * with any version number. Aliases can be created with the registerAs() function.
*/
class DummyStrategy : public fw::Strategy
{
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index e1b7bd8..5439492 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -165,7 +165,7 @@
pitA->insertOrUpdateInRecord(*face1, *interestA1);
auto interestA2 = makeInterest("/A", false, nullopt, 1698);
- forwarder.onOutgoingInterest(pitA, FaceEndpoint(*face2, 0), *interestA2);
+ forwarder.onOutgoingInterest(pitA, *face2, *interestA2);
auto outA2 = pitA->getOutRecord(*face2);
BOOST_REQUIRE(outA2 != pitA->out_end());
@@ -505,7 +505,7 @@
pit1->insertOrUpdateInRecord(*face1, *interest1);
face2->sentNacks.clear();
- forwarder.onOutgoingNack(pit1, FaceEndpoint(*face2, 0), nackHeader);
+ forwarder.onOutgoingNack(pit1, *face2, nackHeader);
BOOST_CHECK_EQUAL(face2->sentNacks.size(), 0);
// send Nack with correct Nonce
@@ -516,7 +516,7 @@
pit2->insertOrUpdateInRecord(*face2, *interest2b);
face1->sentNacks.clear();
- forwarder.onOutgoingNack(pit2, FaceEndpoint(*face1, 0), nackHeader);
+ forwarder.onOutgoingNack(pit2, *face1, nackHeader);
BOOST_REQUIRE_EQUAL(face1->sentNacks.size(), 1);
BOOST_CHECK_EQUAL(face1->sentNacks.back().getReason(), lp::NackReason::CONGESTION);
BOOST_CHECK_EQUAL(face1->sentNacks.back().getInterest().getNonce(), 152);
@@ -527,7 +527,7 @@
// send Nack with correct Nonce
face2->sentNacks.clear();
- forwarder.onOutgoingNack(pit2, FaceEndpoint(*face2, 0), nackHeader);
+ forwarder.onOutgoingNack(pit2, *face2, nackHeader);
BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::CONGESTION);
BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().getNonce(), 808);
@@ -541,7 +541,7 @@
pit2->insertOrUpdateInRecord(*face3, *interest2c);
face3->sentNacks.clear();
- forwarder.onOutgoingNack(pit1, FaceEndpoint(*face3, 0), nackHeader);
+ forwarder.onOutgoingNack(pit1, *face3, nackHeader);
BOOST_CHECK_EQUAL(face3->sentNacks.size(), 0);
}
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index 16956fc..9b22403 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -104,7 +104,7 @@
setExpiryTimer(pitEntry, 290_ms);
}
- this->sendDataToAll(pitEntry, ingress, data);
+ this->sendDataToAll(pitEntry, ingress.face, data);
}
void
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 519e8db..17806ec 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -108,11 +108,11 @@
protected:
void
- sendInterest(const shared_ptr<pit::Entry>& pitEntry, const FaceEndpoint& egress,
+ sendInterest(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
const Interest& interest) override
{
- sendInterestHistory.push_back({pitEntry->getInterest(), egress.face.getId(), interest});
- pitEntry->insertOrUpdateOutRecord(egress.face, interest);
+ sendInterestHistory.push_back({pitEntry->getInterest(), egress.getId(), interest});
+ pitEntry->insertOrUpdateOutRecord(egress, interest);
afterAction();
}
@@ -124,11 +124,11 @@
}
void
- sendNack(const shared_ptr<pit::Entry>& pitEntry, const FaceEndpoint& egress,
+ sendNack(const shared_ptr<pit::Entry>& pitEntry, Face& egress,
const lp::NackHeader& header) override
{
- sendNackHistory.push_back({pitEntry->getInterest(), egress.face.getId(), header});
- pitEntry->deleteInRecord(egress.face);
+ sendNackHistory.push_back({pitEntry->getInterest(), egress.getId(), header});
+ pitEntry->deleteInRecord(egress);
afterAction();
}
diff --git a/tests/other/fw/congestion-mark-strategy.hpp b/tests/other/fw/congestion-mark-strategy.hpp
index 092f8b7..cf78403 100644
--- a/tests/other/fw/congestion-mark-strategy.hpp
+++ b/tests/other/fw/congestion-mark-strategy.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -39,8 +39,6 @@
* The value of the added CongestionMark can be specified through a strategy parameter (defaults
* to 1). In addition, an optional boolean parameter specifies whether the strategy will preserve
* existing CongestionMarks (default) or replace them.
- *
- * \note This strategy is not EndpointId-aware.
*/
class CongestionMarkStrategy : public BestRouteStrategy2
{