face: LpFace counters

FaceCounters for LpFace consist of LinkService::Counters and
Transport::Counters. Old FaceCounters class from 2014 face architecture is
renamed as OldFaceCounters, and can be wrapped with new FaceCounters class.
OldFaceCounters is only used in old Face subclasses.

This commit also updates existing face test suites to use new FaceCounters,
updates ForwarderStatus so that it does not rely on FaceCounters,
and moves the logic of copying face properties and counters into management
structs from face system into FaceManager.

refs #3177

Change-Id: I587e8a32fa72bac3af9d750b2c88342740aa08d6
diff --git a/tests/daemon/face/ethernet.t.cpp b/tests/daemon/face/ethernet.t.cpp
index 4d6f053..7d97016 100644
--- a/tests/daemon/face/ethernet.t.cpp
+++ b/tests/daemon/face/ethernet.t.cpp
@@ -34,6 +34,10 @@
 namespace nfd {
 namespace tests {
 
+BOOST_AUTO_TEST_SUITE(Face)
+
+using nfd::Face;
+
 class InterfacesFixture : protected BaseFixture
 {
 protected:
@@ -59,7 +63,7 @@
   std::vector<NetworkInterfaceInfo> m_interfaces;
 };
 
-BOOST_FIXTURE_TEST_SUITE(FaceEthernet, InterfacesFixture)
+BOOST_FIXTURE_TEST_SUITE(TestEthernet, InterfacesFixture)
 
 BOOST_AUTO_TEST_CASE(GetChannels)
 {
@@ -142,8 +146,8 @@
                     "ether://[" + ethernet::getDefaultMulticastAddress().toString() + "]");
   BOOST_CHECK_EQUAL(face->getLocalUri().toString(),
                     "dev://" + m_interfaces.front().name);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 0);
-  BOOST_CHECK_EQUAL(face->getCounters().getNOutBytes(), 0);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 0);
+  BOOST_CHECK_EQUAL(face->getCounters().nOutBytes, 0);
 
   face->onFail.connect([] (const std::string& reason) { BOOST_FAIL(reason); });
 
@@ -157,7 +161,7 @@
   face->sendInterest(*interest2);
   face->sendData    (*data2    );
 
-  BOOST_CHECK_EQUAL(face->getCounters().getNOutBytes(),
+  BOOST_CHECK_EQUAL(face->getCounters().nOutBytes,
                     14 * 4 + // 4 NDNLP headers
                     interest1->wireEncode().size() +
                     data1->wireEncode().size() +
@@ -203,7 +207,7 @@
   // check that packet data is not accessed if pcap didn't capture anything (caplen == 0)
   static const pcap_pkthdr zeroHeader{};
   face->processIncomingPacket(&zeroHeader, nullptr);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 0);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 0);
   BOOST_CHECK_EQUAL(recInterests.size(), 0);
   BOOST_CHECK_EQUAL(recDatas.size(), 0);
 
@@ -212,7 +216,7 @@
   runtHeader.caplen = ethernet::HDR_LEN + 6;
   static const uint8_t packet2[ethernet::HDR_LEN + 6]{};
   face->processIncomingPacket(&runtHeader, packet2);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 0);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 0);
   BOOST_CHECK_EQUAL(recInterests.size(), 0);
   BOOST_CHECK_EQUAL(recDatas.size(), 0);
 
@@ -227,7 +231,7 @@
     0xfd, 0xff, 0xff  // TLV length (invalid because greater than buffer size)
   };
   face->processIncomingPacket(&validHeader, packet3);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 0);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 0);
   BOOST_CHECK_EQUAL(recInterests.size(), 0);
   BOOST_CHECK_EQUAL(recDatas.size(), 0);
 
@@ -240,7 +244,7 @@
     0x00              // TLV length
   };
   face->processIncomingPacket(&validHeader, packet4);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 2);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 2);
   BOOST_CHECK_EQUAL(recInterests.size(), 0);
   BOOST_CHECK_EQUAL(recDatas.size(), 0);
 
@@ -257,7 +261,7 @@
     0x00              // NDN TLV length
   };
   face->processIncomingPacket(&validHeader, packet5);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 18);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 18);
   BOOST_CHECK_EQUAL(recInterests.size(), 0);
   BOOST_CHECK_EQUAL(recDatas.size(), 0);
 
@@ -276,12 +280,13 @@
     0x03, 0xef, 0xe9, 0x7c
   };
   face->processIncomingPacket(&validHeader, packet6);
-  BOOST_CHECK_EQUAL(face->getCounters().getNInBytes(), 56);
+  BOOST_CHECK_EQUAL(face->getCounters().nInBytes, 56);
   BOOST_CHECK_EQUAL(recInterests.size(), 1);
   BOOST_CHECK_EQUAL(recDatas.size(), 0);
 }
 
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestEthernet
+BOOST_AUTO_TEST_SUITE_END() // Face
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/daemon/face/face-counters.t.cpp b/tests/daemon/face/face-counters.t.cpp
deleted file mode 100644
index 949ac5b..0000000
--- a/tests/daemon/face/face-counters.t.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "face/face-counters.hpp"
-#include "dummy-face.hpp"
-
-#include "tests/test-common.hpp"
-
-namespace nfd {
-namespace tests {
-
-BOOST_FIXTURE_TEST_SUITE(FaceFaceCounters, BaseFixture)
-
-BOOST_AUTO_TEST_CASE(Counters)
-{
-  DummyFace face;
-  const FaceCounters& counters = face.getCounters();
-  BOOST_CHECK_EQUAL(counters.getNInInterests() , 0);
-  BOOST_CHECK_EQUAL(counters.getNInDatas()     , 0);
-  BOOST_CHECK_EQUAL(counters.getNOutInterests(), 0);
-  BOOST_CHECK_EQUAL(counters.getNOutDatas()    , 0);
-  BOOST_CHECK_EQUAL(counters.getNInBytes()     , 0);
-  BOOST_CHECK_EQUAL(counters.getNOutBytes()    , 0);
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace tests
-} // namespace nfd
diff --git a/tests/daemon/face/lp-face-wrapper.t.cpp b/tests/daemon/face/lp-face-wrapper.t.cpp
index 182d2fc..8217d77 100644
--- a/tests/daemon/face/lp-face-wrapper.t.cpp
+++ b/tests/daemon/face/lp-face-wrapper.t.cpp
@@ -71,6 +71,14 @@
   BOOST_CHECK_EQUAL(face1w->getPersistency(), ndn::nfd::FACE_PERSISTENCY_PERMANENT);
 }
 
+BOOST_AUTO_TEST_CASE(Counters)
+{
+  auto face1w = make_shared<face::LpFaceWrapper>(make_unique<DummyLpFace>());
+  auto face1 = static_cast<DummyLpFace*>(face1w->getLpFace());
+
+  BOOST_CHECK(&face1->getCounters() == &face1w->getCounters());
+}
+
 BOOST_AUTO_TEST_CASE(FailSignal)
 {
   auto face1w = make_shared<face::LpFaceWrapper>(make_unique<DummyLpFace>());
@@ -108,16 +116,6 @@
   face1w->onReceiveData.connect(bind([&nReceivedData] { ++nReceivedData; }));
   face1w->onReceiveNack.connect(bind([&nReceivedNacks] { ++nReceivedNacks; }));
 
-  BOOST_CHECK_EQUAL(face1->getCounters().getNInInterests(), 0);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNInDatas(), 0);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNOutInterests(), 0);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNOutDatas(), 0);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNInInterests(), 0);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNInDatas(), 0);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNOutInterests(), 0);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNOutDatas(), 0);
-  // There's no counters for NACK for now.
-
   for (size_t i = 0; i < nInInterests; ++i) {
     shared_ptr<Interest> interest = makeInterest("/JSQdqward4");
     face1->receiveInterest(*interest);
@@ -148,15 +146,6 @@
     face1w->sendNack(nack);
   }
 
-  BOOST_CHECK_EQUAL(face1->getCounters().getNInInterests(), nInInterests);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNInDatas(), nInData);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNOutInterests(), nOutInterests);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNOutDatas(), nOutData);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNInInterests(), nInInterests);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNInDatas(), nInData);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNOutInterests(), nOutInterests);
-  BOOST_CHECK_EQUAL(face1w->getCounters().getNOutDatas(), nOutData);
-
   BOOST_CHECK_EQUAL(nReceivedInterests, nInInterests);
   BOOST_CHECK_EQUAL(nReceivedData, nInData);
   BOOST_CHECK_EQUAL(nReceivedNacks, nInNacks);
diff --git a/tests/daemon/face/lp-face.t.cpp b/tests/daemon/face/lp-face.t.cpp
new file mode 100644
index 0000000..92a3755
--- /dev/null
+++ b/tests/daemon/face/lp-face.t.cpp
@@ -0,0 +1,108 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "face/lp-face.hpp"
+
+#include "tests/test-common.hpp"
+#include "dummy-lp-face.hpp"
+
+namespace nfd {
+namespace face {
+namespace tests {
+
+using namespace nfd::tests;
+
+BOOST_AUTO_TEST_SUITE(Face)
+BOOST_FIXTURE_TEST_SUITE(TestLpFace, BaseFixture)
+
+BOOST_AUTO_TEST_CASE(LinkServiceSendReceive)
+{
+  auto face1 = make_shared<DummyLpFace>();
+
+  const size_t nInInterests = 192;
+  const size_t nInData = 91;
+  const size_t nInNacks = 29;
+  const size_t nOutInterests = 202;
+  const size_t nOutData = 128;
+  const size_t nOutNacks = 84;
+
+  size_t nReceivedInterests = 0;
+  size_t nReceivedData = 0;
+  size_t nReceivedNacks = 0;
+  face1->afterReceiveInterest.connect(bind([&nReceivedInterests] { ++nReceivedInterests; }));
+  face1->afterReceiveData.connect(bind([&nReceivedData] { ++nReceivedData; }));
+  face1->afterReceiveNack.connect(bind([&nReceivedNacks] { ++nReceivedNacks; }));
+
+  for (size_t i = 0; i < nInInterests; ++i) {
+    shared_ptr<Interest> interest = makeInterest("/JSQdqward4");
+    face1->receiveInterest(*interest);
+  }
+
+  for (size_t i = 0; i < nInData; ++i) {
+    shared_ptr<Data> data = makeData("/hT8FDigWn1");
+    face1->receiveData(*data);
+  }
+
+  for (size_t i = 0; i < nInNacks; ++i) {
+    lp::Nack nack = makeNack("/StnEVTj4Ex", 561, lp::NackReason::CONGESTION);
+    face1->receiveNack(nack);
+  }
+
+  for (size_t i = 0; i < nOutInterests; ++i) {
+    shared_ptr<Interest> interest = makeInterest("/XyUAFYQDmd");
+    face1->sendInterest(*interest);
+  }
+
+  for (size_t i = 0; i < nOutData; ++i) {
+    shared_ptr<Data> data = makeData("/GigPEtPH6");
+    face1->sendData(*data);
+  }
+
+  for (size_t i = 0; i < nOutNacks; ++i) {
+    lp::Nack nack = makeNack("/9xK6FbwIBM", 365, lp::NackReason::CONGESTION);
+    face1->sendNack(nack);
+  }
+
+  BOOST_CHECK_EQUAL(face1->getCounters().nInInterests, nInInterests);
+  BOOST_CHECK_EQUAL(face1->getCounters().nInData, nInData);
+  BOOST_CHECK_EQUAL(face1->getCounters().nInNacks, nInNacks);
+  BOOST_CHECK_EQUAL(face1->getCounters().nOutInterests, nOutInterests);
+  BOOST_CHECK_EQUAL(face1->getCounters().nOutData, nOutData);
+  BOOST_CHECK_EQUAL(face1->getCounters().nOutNacks, nOutNacks);
+
+  BOOST_CHECK_EQUAL(nReceivedInterests, nInInterests);
+  BOOST_CHECK_EQUAL(nReceivedData, nInData);
+  BOOST_CHECK_EQUAL(nReceivedNacks, nInNacks);
+  BOOST_CHECK_EQUAL(face1->sentInterests.size(), nOutInterests);
+  BOOST_CHECK_EQUAL(face1->sentData.size(), nOutData);
+  BOOST_CHECK_EQUAL(face1->sentNacks.size(), nOutNacks);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace face
+} // namespace nfd
diff --git a/tests/daemon/face/tcp.t.cpp b/tests/daemon/face/tcp.t.cpp
index 2548dcd..6d5fe19 100644
--- a/tests/daemon/face/tcp.t.cpp
+++ b/tests/daemon/face/tcp.t.cpp
@@ -340,19 +340,19 @@
   // needed to ensure NOutBytes counters are accurate
   limitedIo.run(LimitedIo::UNLIMITED_OPS, time::seconds(1));
 
-  const FaceCounters& counters1 = face1->getCounters();
-  BOOST_CHECK_EQUAL(counters1.getNInInterests() , 1);
-  BOOST_CHECK_EQUAL(counters1.getNInDatas()     , 3);
-  BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 3);
-  BOOST_CHECK_EQUAL(counters1.getNOutDatas()    , 1);
-  BOOST_CHECK_EQUAL(counters1.getNOutBytes(), nBytesSent1);
+  const face::FaceCounters& counters1 = face1->getCounters();
+  BOOST_CHECK_EQUAL(counters1.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters1.nInData, 3);
+  BOOST_CHECK_EQUAL(counters1.nOutInterests, 3);
+  BOOST_CHECK_EQUAL(counters1.nOutData, 1);
+  BOOST_CHECK_EQUAL(counters1.nOutBytes, nBytesSent1);
 
-  const FaceCounters& counters2 = face2->getCounters();
-  BOOST_CHECK_EQUAL(counters2.getNInInterests() , 3);
-  BOOST_CHECK_EQUAL(counters2.getNInDatas()     , 1);
-  BOOST_CHECK_EQUAL(counters2.getNOutInterests(), 1);
-  BOOST_CHECK_EQUAL(counters2.getNOutDatas()    , 3);
-  BOOST_CHECK_EQUAL(counters2.getNInBytes(), nBytesSent1);
+  const face::FaceCounters& counters2 = face2->getCounters();
+  BOOST_CHECK_EQUAL(counters2.nInInterests, 3);
+  BOOST_CHECK_EQUAL(counters2.nInData, 1);
+  BOOST_CHECK_EQUAL(counters2.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters2.nOutData, 3);
+  BOOST_CHECK_EQUAL(counters2.nInBytes, nBytesSent1);
 }
 
 BOOST_FIXTURE_TEST_CASE(EndToEnd6, EndToEndFixture)
diff --git a/tests/daemon/face/udp.t.cpp b/tests/daemon/face/udp.t.cpp
index 86c9bfe..d38c908 100644
--- a/tests/daemon/face/udp.t.cpp
+++ b/tests/daemon/face/udp.t.cpp
@@ -380,8 +380,8 @@
   BOOST_CHECK_EQUAL(face1->getRemoteUri(), A::getFaceUri2());
   BOOST_CHECK_EQUAL(face1->getLocalUri(), A::getFaceUri1());
   BOOST_CHECK_EQUAL(face1->isLocal(), false); // UdpFace is never local
-  BOOST_CHECK_EQUAL(face1->getCounters().getNInBytes(), 0);
-  BOOST_CHECK_EQUAL(face1->getCounters().getNOutBytes(), 0);
+  BOOST_CHECK_EQUAL(face1->getCounters().nInBytes, 0);
+  BOOST_CHECK_EQUAL(face1->getCounters().nOutBytes, 0);
 
   // channel2 creation must be after face1 creation,
   // otherwise channel2's endpoint would be prohibited
@@ -417,8 +417,8 @@
   BOOST_CHECK_EQUAL(face2->getRemoteUri(), A::getFaceUri1());
   BOOST_CHECK_EQUAL(face2->getLocalUri(), A::getFaceUri2());
   BOOST_CHECK_EQUAL(face2->isLocal(), false); // UdpFace is never local
-  BOOST_CHECK_EQUAL(face2->getCounters().getNInBytes(), nBytesSent1);
-  BOOST_CHECK_EQUAL(face2->getCounters().getNOutBytes(), 0);
+  BOOST_CHECK_EQUAL(face2->getCounters().nInBytes, nBytesSent1);
+  BOOST_CHECK_EQUAL(face2->getCounters().nOutBytes, 0);
 
   BOOST_REQUIRE_EQUAL(history2->receivedInterests.size(), 1);
   BOOST_CHECK_EQUAL(history2->receivedInterests.front().getName(), interest1->getName());
@@ -440,21 +440,21 @@
   BOOST_CHECK_EQUAL(history1->receivedData.front().getName(), data2->getName());
 
   // counters
-  const FaceCounters& counters1 = face1->getCounters();
-  BOOST_CHECK_EQUAL(counters1.getNInInterests(), 3);
-  BOOST_CHECK_EQUAL(counters1.getNInDatas(), 1);
-  BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 1);
-  BOOST_CHECK_EQUAL(counters1.getNOutDatas(), 3);
-  BOOST_CHECK_EQUAL(counters1.getNInBytes(), nBytesSent2);
-  BOOST_CHECK_EQUAL(counters1.getNOutBytes(), nBytesSent1);
+  const face::FaceCounters& counters1 = face1->getCounters();
+  BOOST_CHECK_EQUAL(counters1.nInInterests, 3);
+  BOOST_CHECK_EQUAL(counters1.nInData, 1);
+  BOOST_CHECK_EQUAL(counters1.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters1.nOutData, 3);
+  BOOST_CHECK_EQUAL(counters1.nInBytes, nBytesSent2);
+  BOOST_CHECK_EQUAL(counters1.nOutBytes, nBytesSent1);
 
-  const FaceCounters& counters2 = face2->getCounters();
-  BOOST_CHECK_EQUAL(counters2.getNInInterests(), 1);
-  BOOST_CHECK_EQUAL(counters2.getNInDatas(), 3);
-  BOOST_CHECK_EQUAL(counters2.getNOutInterests(), 3);
-  BOOST_CHECK_EQUAL(counters2.getNOutDatas(), 1);
-  BOOST_CHECK_EQUAL(counters2.getNInBytes(), nBytesSent1);
-  BOOST_CHECK_EQUAL(counters2.getNOutBytes(), nBytesSent2);
+  const face::FaceCounters& counters2 = face2->getCounters();
+  BOOST_CHECK_EQUAL(counters2.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters2.nInData, 3);
+  BOOST_CHECK_EQUAL(counters2.nOutInterests, 3);
+  BOOST_CHECK_EQUAL(counters2.nOutData, 1);
+  BOOST_CHECK_EQUAL(counters2.nInBytes, nBytesSent1);
+  BOOST_CHECK_EQUAL(counters2.nOutBytes, nBytesSent2);
 }
 
 // channel accepting multiple incoming connections
diff --git a/tests/daemon/face/unix-stream.t.cpp b/tests/daemon/face/unix-stream.t.cpp
index 0af9db2..47610af 100644
--- a/tests/daemon/face/unix-stream.t.cpp
+++ b/tests/daemon/face/unix-stream.t.cpp
@@ -266,19 +266,19 @@
   // needed to ensure NOutBytes counters are accurate
   limitedIo.run(LimitedIo::UNLIMITED_OPS, time::seconds(1));
 
-  const FaceCounters& counters1 = face1->getCounters();
-  BOOST_CHECK_EQUAL(counters1.getNInInterests() , 1);
-  BOOST_CHECK_EQUAL(counters1.getNInDatas()     , 3);
-  BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 3);
-  BOOST_CHECK_EQUAL(counters1.getNOutDatas()    , 1);
-  BOOST_CHECK_EQUAL(counters1.getNInBytes(), nBytesSent2);
-  BOOST_CHECK_EQUAL(counters1.getNOutBytes(), nBytesSent1);
+  const face::FaceCounters& counters1 = face1->getCounters();
+  BOOST_CHECK_EQUAL(counters1.nInInterests, 1);
+  BOOST_CHECK_EQUAL(counters1.nInData, 3);
+  BOOST_CHECK_EQUAL(counters1.nOutInterests, 3);
+  BOOST_CHECK_EQUAL(counters1.nOutData, 1);
+  BOOST_CHECK_EQUAL(counters1.nInBytes, nBytesSent2);
+  BOOST_CHECK_EQUAL(counters1.nOutBytes, nBytesSent1);
 
-  const FaceCounters& counters2 = face2->getCounters();
-  BOOST_CHECK_EQUAL(counters2.getNInInterests() , 3);
-  BOOST_CHECK_EQUAL(counters2.getNInDatas()     , 1);
-  BOOST_CHECK_EQUAL(counters2.getNOutInterests(), 1);
-  BOOST_CHECK_EQUAL(counters2.getNOutDatas()    , 3);
+  const face::FaceCounters& counters2 = face2->getCounters();
+  BOOST_CHECK_EQUAL(counters2.nInInterests, 3);
+  BOOST_CHECK_EQUAL(counters2.nInData, 1);
+  BOOST_CHECK_EQUAL(counters2.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters2.nOutData, 3);
 }
 
 BOOST_FIXTURE_TEST_CASE(MultipleAccepts, EndToEndFixture)
diff --git a/tests/daemon/face/websocket.t.cpp b/tests/daemon/face/websocket.t.cpp
index f790cf4..3811635 100644
--- a/tests/daemon/face/websocket.t.cpp
+++ b/tests/daemon/face/websocket.t.cpp
@@ -287,13 +287,13 @@
   BOOST_CHECK_EQUAL(client1_receivedInterests[0].getName(), interest2->getName());
   BOOST_CHECK_EQUAL(client1_receivedDatas    [0].getName(), data1->getName());
 
-  const FaceCounters& counters1 = face1->getCounters();
-  BOOST_CHECK_EQUAL(counters1.getNInInterests() , 3);
-  BOOST_CHECK_EQUAL(counters1.getNInDatas()     , 3);
-  BOOST_CHECK_EQUAL(counters1.getNOutInterests(), 1);
-  BOOST_CHECK_EQUAL(counters1.getNOutDatas()    , 1);
-  BOOST_CHECK_EQUAL(counters1.getNInBytes(), nBytesReceived);
-  BOOST_CHECK_EQUAL(counters1.getNOutBytes(), nBytesSent);
+  const face::FaceCounters& counters1 = face1->getCounters();
+  BOOST_CHECK_EQUAL(counters1.nInInterests, 3);
+  BOOST_CHECK_EQUAL(counters1.nInData, 3);
+  BOOST_CHECK_EQUAL(counters1.nOutInterests, 1);
+  BOOST_CHECK_EQUAL(counters1.nOutData, 1);
+  BOOST_CHECK_EQUAL(counters1.nInBytes, nBytesReceived);
+  BOOST_CHECK_EQUAL(counters1.nOutBytes, nBytesSent);
 
   limitedIo.run(LimitedIo::UNLIMITED_OPS, time::seconds(8));
   BOOST_CHECK_EQUAL(channel1->size(), 0);