Browse Source

Replace remaining uses of BOOST_THROW_EXCEPTION with NDN_THROW

Change-Id: I0c149acbe5607d928cdf9e8d73813d5e74ca45d0
pull/14/head NLSR-0.6.0
Davide Pesavento 5 years ago
parent
commit
d90338d230
  1. 11
      src/adjacency-list.cpp
  2. 7
      src/adjacency-list.hpp
  3. 62
      src/adjacent.cpp
  4. 16
      src/adjacent.hpp
  5. 31
      src/common.hpp
  6. 17
      src/communication/sync-logic-handler.hpp
  7. 8
      src/conf-file-processor.cpp
  8. 4
      src/conf-parameter.cpp
  9. 10
      src/conf-parameter.hpp
  10. 13
      src/lsa/adj-lsa.cpp
  11. 13
      src/lsa/coordinate-lsa.cpp
  12. 8
      src/lsa/lsa.cpp
  13. 9
      src/lsa/lsa.hpp
  14. 11
      src/lsa/name-lsa.cpp
  15. 4
      src/lsdb.cpp
  16. 8
      src/lsdb.hpp
  17. 33
      src/main.cpp
  18. 16
      src/nlsr.cpp
  19. 12
      src/nlsr.hpp
  20. 8
      src/route/name-prefix-table.cpp
  21. 21
      src/route/nexthop.cpp
  22. 5
      src/route/nexthop.hpp
  23. 5
      src/route/routing-table-calculator.hpp
  24. 21
      src/route/routing-table-entry.cpp
  25. 13
      src/route/routing-table.cpp
  26. 8
      src/security/certificate-store.cpp
  27. 3
      src/sequencing-manager.hpp
  28. 26
      src/update/manager-base.hpp
  29. 10
      src/update/nfd-rib-command-processor.cpp
  30. 8
      src/update/prefix-update-processor.cpp
  31. 20
      src/utility/name-helper.hpp
  32. 10
      tests/route/test-name-prefix-table.cpp
  33. 10
      tests/test-common.hpp
  34. 4
      tests/test-lsdb.cpp
  35. 4
      tests/test-nlsr.cpp

11
src/adjacency-list.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2020, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -20,9 +20,6 @@
**/
#include "adjacency-list.hpp"
#include "adjacent.hpp"
#include "common.hpp"
#include "logger.hpp"
#include <algorithm>
@ -32,9 +29,9 @@ namespace nlsr {
INIT_LOGGER(AdjacencyList);
bool
AdjacencyList::insert(Adjacent& adjacent)
AdjacencyList::insert(const Adjacent& adjacent)
{
std::list<Adjacent>::iterator it = find(adjacent.getName());
auto it = find(adjacent.getName());
if (it != m_adjList.end()) {
return false;
}

7
src/adjacency-list.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2020, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -26,7 +26,6 @@
#include "common.hpp"
#include <list>
#include <boost/cstdint.hpp>
namespace nlsr {
@ -37,7 +36,7 @@ public:
typedef std::list<Adjacent>::iterator iterator;
bool
insert(Adjacent& adjacent);
insert(const Adjacent& adjacent);
std::list<Adjacent>&
getAdjList();

62
src/adjacent.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -30,12 +30,12 @@ const double Adjacent::DEFAULT_LINK_COST = 10.0;
const double Adjacent::NON_ADJACENT_COST = -12345;
Adjacent::Adjacent()
: m_name()
, m_faceUri()
, m_linkCost(DEFAULT_LINK_COST)
, m_status(STATUS_INACTIVE)
, m_interestTimedOutNo(0)
, m_faceId(0)
: m_name()
, m_faceUri()
, m_linkCost(DEFAULT_LINK_COST)
, m_status(STATUS_INACTIVE)
, m_interestTimedOutNo(0)
, m_faceId(0)
{
}
@ -45,35 +45,34 @@ Adjacent::Adjacent(const ndn::Block& block)
}
Adjacent::Adjacent(const ndn::Name& an)
: m_name(an)
, m_faceUri()
, m_linkCost(DEFAULT_LINK_COST)
, m_status(STATUS_INACTIVE)
, m_interestTimedOutNo(0)
, m_faceId(0)
{
}
: m_name(an)
, m_faceUri()
, m_linkCost(DEFAULT_LINK_COST)
, m_status(STATUS_INACTIVE)
, m_interestTimedOutNo(0)
, m_faceId(0)
{
}
Adjacent::Adjacent(const ndn::Name& an, const ndn::FaceUri& faceUri, double lc,
Status s, uint32_t iton, uint64_t faceId)
: m_name(an)
, m_faceUri(faceUri)
, m_status(s)
, m_interestTimedOutNo(iton)
, m_faceId(faceId)
{
this->setLinkCost(lc);
}
: m_name(an)
, m_faceUri(faceUri)
, m_status(s)
, m_interestTimedOutNo(iton)
, m_faceId(faceId)
{
this->setLinkCost(lc);
}
void
Adjacent::setLinkCost(double lc)
{
// NON_ADJACENT_COST is a negative value and is used for nodes that aren't direct neighbors.
// But for direct/active neighbors, the cost cannot be negative.
if (lc < 0 && lc != NON_ADJACENT_COST)
{
if (lc < 0 && lc != NON_ADJACENT_COST) {
NLSR_LOG_ERROR(" Neighbor's link-cost cannot be negative");
BOOST_THROW_EXCEPTION(ndn::tlv::Error("Neighbor's link-cost cannot be negative"));
NDN_THROW(ndn::tlv::Error("Neighbor's link-cost cannot be negative"));
}
m_linkCost = lc;
@ -127,20 +126,19 @@ Adjacent::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::Adjacency) {
BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
ndn::to_string(m_wire.type())));
NDN_THROW(Error("Adjacency", m_wire.type()));
}
m_wire.parse();
ndn::Block::element_const_iterator val = m_wire.elements_begin();
auto val = m_wire.elements_begin();
if (val != m_wire.elements_end() && val->type() == ndn::tlv::Name) {
m_name.wireDecode(*val);
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Name field"));
NDN_THROW(Error("Missing required Name field"));
}
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Uri) {
@ -148,7 +146,7 @@ Adjacent::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Uri field"));
NDN_THROW(Error("Missing required Uri field"));
}
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Cost) {
@ -156,7 +154,7 @@ Adjacent::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Cost field"));
NDN_THROW(Error("Missing required Cost field"));
}
}

16
src/adjacent.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2020, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -19,15 +19,15 @@
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
#ifndef NLSR_ADJACENT_HPP
#define NLSR_ADJACENT_HPP
#include <string>
#include <cmath>
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/net/face-uri.hpp>
#ifndef NLSR_ADJACENT_HPP
#define NLSR_ADJACENT_HPP
namespace nlsr {
/*! \brief A neighbor reachable over a Face.
@ -49,11 +49,7 @@ public:
class Error : public ndn::tlv::Error
{
public:
explicit
Error(const std::string& what)
: ndn::tlv::Error(what)
{
}
using ndn::tlv::Error::Error;
};
enum Status

31
src/common.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2018, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -16,33 +16,32 @@
*
* You should have received a copy of the GNU General Public License along with
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*
**/
/*! \file
* Shared include file to provide a single point-of-entry, and
* hopefully improve compile times.
*/
#ifndef NLSR_COMMON_HPP
#define NLSR_COMMON_HPP
#include <ndn-cxx/util/time.hpp>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
#include <memory>
#include <utility>
#include <ndn-cxx/name.hpp>
#include <ndn-cxx/util/exception.hpp>
#include <ndn-cxx/util/time.hpp>
namespace nlsr {
using std::bind;
using std::make_shared;
using std::shared_ptr;
using std::function;
using namespace ndn::time_literals;
const ndn::time::seconds TIME_ALLOWED_FOR_CANONIZATION = ndn::time::seconds(4);
const ndn::time::seconds TIME_ALLOWED_FOR_CANONIZATION = 4_s;
template<typename T, typename = void>
struct is_iterator
{
static constexpr bool value = false;
static constexpr bool value = false;
};
/*! Use C++11 iterator_traits to check if some type is an iterator
@ -52,7 +51,7 @@ struct is_iterator<T, typename std::enable_if<!std::is_same<
typename std::iterator_traits<T>::value_type,
void>::value>::type>
{
static constexpr bool value = true;
static constexpr bool value = true;
};
} // namespace nlsr

17
src/communication/sync-logic-handler.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -30,9 +30,6 @@
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/util/signal.hpp>
#include <boost/throw_exception.hpp>
class InterestManager;
namespace nlsr {
@ -49,19 +46,15 @@ class ConfParameter;
class SyncLogicHandler
{
public:
using IsLsaNew =
std::function<bool(const ndn::Name&, const Lsa::Type& lsaType, const uint64_t&)>;
class Error : public std::runtime_error
{
public:
explicit
Error(const std::string& what)
: std::runtime_error(what)
{
}
using std::runtime_error::runtime_error;
};
using IsLsaNew =
std::function<bool(const ndn::Name&, const Lsa::Type& lsaType, const uint64_t&)>;
SyncLogicHandler(ndn::Face& face, const IsLsaNew& isLsaNew, const ConfParameter& conf);
/*! \brief Instruct ChronoSync to publish an update.

8
src/conf-file-processor.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -451,9 +451,9 @@ ConfFileProcessor::processConfSectionNeighbors(const ConfigSection& section)
// Set the interval between FaceStatus dataset fetch attempts.
ConfigurationVariable<uint32_t> faceDatasetFetchInterval("face-dataset-fetch-interval",
bind(&ConfParameter::setFaceDatasetFetchInterval,
&m_confParam,
_1));
std::bind(&ConfParameter::setFaceDatasetFetchInterval,
&m_confParam,
_1));
faceDatasetFetchInterval.setMinAndMaxValue(FACE_DATASET_FETCH_INTERVAL_MIN,
FACE_DATASET_FETCH_INTERVAL_MAX);

4
src/conf-parameter.cpp

@ -25,8 +25,6 @@ namespace nlsr {
INIT_LOGGER(ConfParameter);
using namespace ndn::time_literals;
// To be changed when breaking changes are made to sync
const uint64_t ConfParameter::SYNC_VERSION = 9;
@ -120,7 +118,7 @@ ConfParameter::loadCertToValidator(const ndn::security::Certificate& cert)
m_prefixUpdateValidator.loadAnchor("Authoritative-Certificate", ndn::security::Certificate(cert));
}
shared_ptr<ndn::security::Certificate>
std::shared_ptr<ndn::security::Certificate>
ConfParameter::initializeKey()
{
NLSR_LOG_DEBUG("Initializing Key ...");

10
src/conf-parameter.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -28,11 +28,9 @@
#include "adjacency-list.hpp"
#include "name-prefix-list.hpp"
#include <boost/cstdint.hpp>
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/security/validator-config.hpp>
#include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
#include <ndn-cxx/util/time.hpp>
namespace nlsr {
@ -128,9 +126,8 @@ enum {
*/
class ConfParameter
{
public:
ConfParameter(ndn::Face& face, ndn::KeyChain& keyChain,
ConfParameter(ndn::Face& face, ndn::KeyChain& keyChain,
const std::string& confFileName = "nlsr.conf");
const std::string&
@ -478,7 +475,7 @@ public:
return m_keyChain;
}
shared_ptr<ndn::security::Certificate>
std::shared_ptr<ndn::security::Certificate>
initializeKey();
void
@ -492,6 +489,7 @@ public:
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
std::string m_confFileName;
std::string m_confFileNameDynamic;
private:
ndn::Name m_routerName;
ndn::Name m_siteName;

13
src/lsa/adj-lsa.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -93,8 +93,7 @@ AdjLsa::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::AdjacencyLsa) {
BOOST_THROW_EXCEPTION(Error("Expected AdjacencyLsa Block, but Block is of a different type: #" +
ndn::to_string(m_wire.type())));
NDN_THROW(Error("AdjacencyLsa", m_wire.type()));
}
m_wire.parse();
@ -106,18 +105,16 @@ AdjLsa::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
NDN_THROW(Error("Missing required Lsa field"));
}
AdjacencyList adl;
for (; val != m_wire.elements_end(); ++val) {
if (val->type() == ndn::tlv::nlsr::Adjacency) {
Adjacent adj = Adjacent(*val);
adl.insert(adj);
adl.insert(Adjacent(*val));
}
else {
BOOST_THROW_EXCEPTION(Error("Expected Adjacency Block, but Block is of a different type: #" +
ndn::to_string(m_wire.type())));
NDN_THROW(Error("Adjacency", val->type()));
}
}
m_adl = adl;

13
src/lsa/coordinate-lsa.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -105,10 +105,7 @@ CoordinateLsa::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::CoordinateLsa) {
std::stringstream error;
error << "Expected CoordinateLsa Block, but Block is of a different type: #"
<< m_wire.type();
BOOST_THROW_EXCEPTION(Error(error.str()));
NDN_THROW(Error("CoordinateLsa", m_wire.type()));
}
m_wire.parse();
@ -120,7 +117,7 @@ CoordinateLsa::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
NDN_THROW(Error("Missing required Lsa field"));
}
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::HyperbolicRadius) {
@ -128,7 +125,7 @@ CoordinateLsa::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required HyperbolicRadius field"));
NDN_THROW(Error("Missing required HyperbolicRadius field"));
}
std::vector<double> angles;
@ -137,7 +134,7 @@ CoordinateLsa::wireDecode(const ndn::Block& wire)
angles.push_back(ndn::encoding::readDouble(*val));
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required HyperbolicAngle field"));
NDN_THROW(Error("Missing required HyperbolicAngle field"));
}
}
m_hyperbolicAngles = angles;

8
src/lsa/lsa.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -73,7 +73,7 @@ Lsa::wireDecode(const ndn::Block& wire)
m_originRouter.wireDecode(*val);
}
else {
BOOST_THROW_EXCEPTION(Error("OriginRouter: Missing required Name field"));
NDN_THROW(Error("OriginRouter: Missing required Name field"));
}
++val;
@ -83,14 +83,14 @@ Lsa::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required SequenceNumber field"));
NDN_THROW(Error("Missing required SequenceNumber field"));
}
if (val != baseWire.elements_end() && val->type() == ndn::tlv::nlsr::ExpirationTime) {
m_expirationTimePoint = ndn::time::fromString(readString(*val));
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required ExpirationTimePoint field"));
NDN_THROW(Error("Missing required ExpirationTime field"));
}
}

9
src/lsa/lsa.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -28,7 +28,6 @@
#include "test-access-control.hpp"
#include <ndn-cxx/util/scheduler.hpp>
#include <ndn-cxx/util/time.hpp>
namespace nlsr {
@ -45,11 +44,7 @@ public:
class Error : public ndn::tlv::Error
{
public:
explicit
Error(const std::string& what)
: ndn::tlv::Error(what)
{
}
using ndn::tlv::Error::Error;
};
enum class Type {

11
src/lsa/name-lsa.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -85,8 +85,7 @@ NameLsa::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::NameLsa) {
BOOST_THROW_EXCEPTION(Error("Expected NameLsa Block, but Block is of a different type: #" +
ndn::to_string(m_wire.type())));
NDN_THROW(Error("NameLsa", m_wire.type()));
}
m_wire.parse();
@ -98,7 +97,7 @@ NameLsa::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Lsa field"));
NDN_THROW(Error("Missing required Lsa field"));
}
NamePrefixList npl;
@ -107,11 +106,9 @@ NameLsa::wireDecode(const ndn::Block& wire)
npl.insert(ndn::Name(*val));
}
else {
BOOST_THROW_EXCEPTION(Error("Expected Name Block, but Block is of a different type: #" +
ndn::to_string(m_wire.type())));
NDN_THROW(Error("Name", val->type()));
}
}
m_npl = npl;
}

4
src/lsdb.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -213,7 +213,7 @@ Lsdb::processInterestForLsa(const ndn::Interest& interest, const ndn::Name& orig
}
void
Lsdb::installLsa(shared_ptr<Lsa> lsa)
Lsdb::installLsa(std::shared_ptr<Lsa> lsa)
{
auto timeToExpire = m_lsaRefreshTime;

8
src/lsdb.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -45,13 +45,9 @@
#include <PSync/segment-publisher.hpp>
#include <utility>
#include <boost/cstdint.hpp>
namespace nlsr {
namespace bmi = boost::multi_index;
using namespace ndn::literals::time_literals;
static constexpr ndn::time::seconds GRACE_PERIOD = 10_s;
@ -232,7 +228,7 @@ PUBLIC_WITH_TESTS_ELSE_PRIVATE:
}
void
installLsa(shared_ptr<Lsa> lsa);
installLsa(std::shared_ptr<Lsa> lsa);
/*! \brief Remove a name LSA from the LSDB.
\param router The name of the router that published the LSA to remove.

33
src/main.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -20,33 +20,12 @@
**/
#include "conf-file-processor.hpp"
#include "security/certificate-store.hpp"
#include "nlsr.hpp"
#include "security/certificate-store.hpp"
#include "version.hpp"
#include <boost/exception/get_error_info.hpp>
#include <sstream>
template<typename E>
static std::string
getExtendedErrorMessage(const E& exception)
{
std::ostringstream errorMessage;
errorMessage << exception.what();
const char* const* file = boost::get_error_info<boost::throw_file>(exception);
const int* line = boost::get_error_info<boost::throw_line>(exception);
const char* const* func = boost::get_error_info<boost::throw_function>(exception);
if (file && line) {
errorMessage << " [from " << *file << ":" << *line;
if (func) {
errorMessage << " in " << *func;
}
errorMessage << "]";
}
return errorMessage.str();
}
#include <boost/exception/diagnostic_information.hpp>
#include <iostream>
static void
printUsage(std::ostream& os, const std::string& programName)
@ -95,6 +74,7 @@ main(int argc, char** argv)
std::cerr << "Error in configuration file processing" << std::endl;
return 2;
}
// Since confParam is already populated, key is initialized here before
// and independent of the NLSR class
auto certificate = confParam.initializeKey();
@ -102,7 +82,6 @@ main(int argc, char** argv)
nlsr::Nlsr nlsr(face, keyChain, confParam);
nlsr::security::CertificateStore certStore(face, confParam, nlsr.getLsdb());
if (certificate) {
certStore.insert(*certificate);
}
@ -112,7 +91,7 @@ main(int argc, char** argv)
}
catch (const std::exception& e) {
nlsr.getFib().clean();
std::cerr << "FATAL: " << getExtendedErrorMessage(e) << std::endl;
std::cerr << "FATAL: " << boost::diagnostic_information(e) << std::endl;
return 1;
}

16
src/nlsr.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -24,11 +24,8 @@
#include "logger.hpp"
#include <cstdlib>
#include <string>
#include <sstream>
#include <cstdio>
#include <unistd.h>
#include <vector>
#include <ndn-cxx/net/face-uri.hpp>
@ -426,8 +423,8 @@ Nlsr::enableIncomingFaceIdIndication()
m_controller.start<ndn::nfd::FaceUpdateCommand>(
ndn::nfd::ControlParameters()
.setFlagBit(ndn::nfd::FaceFlagBit::BIT_LOCAL_FIELDS_ENABLED, true),
bind(&Nlsr::onFaceIdIndicationSuccess, this, _1),
bind(&Nlsr::onFaceIdIndicationFailure, this, _1));
std::bind(&Nlsr::onFaceIdIndicationSuccess, this, _1),
std::bind(&Nlsr::onFaceIdIndicationFailure, this, _1));
}
void
@ -440,11 +437,8 @@ Nlsr::onFaceIdIndicationSuccess(const ndn::nfd::ControlParameters& cp)
void
Nlsr::onFaceIdIndicationFailure(const ndn::nfd::ControlResponse& cr)
{
std::ostringstream os;
os << "Failed to enable incoming face id indication feature: " <<
"(code: " << cr.getCode() << ", reason: " << cr.getText() << ")";
NLSR_LOG_DEBUG(os.str());
NLSR_LOG_DEBUG("Failed to enable incoming face id indication feature: " <<
"(code: " << cr.getCode() << ", reason: " << cr.getText() << ")");
}
} // namespace nlsr

12
src/nlsr.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -38,10 +38,6 @@
#include "utility/name-helper.hpp"
#include "stats-collector.hpp"
#include <boost/cstdint.hpp>
#include <stdexcept>
#include <boost/throw_exception.hpp>
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/security/key-chain.hpp>
#include <ndn-cxx/security/certificate-fetcher-direct-fetch.hpp>
@ -69,11 +65,7 @@ public:
class Error : public std::runtime_error
{
public:
explicit
Error(const std::string& what)
: std::runtime_error(what)
{
}
using std::runtime_error::runtime_error;
};
Nlsr(ndn::Face& face, ndn::KeyChain& keyChain, ConfParameter& confParam);

8
src/route/name-prefix-table.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -94,11 +94,12 @@ NamePrefixTable::addEntry(const ndn::Name& name, const ndn::Name& destRouter)
// Either we have to make a new NPT entry or there already was one.
if (nameItr == m_table.end()) {
NLSR_LOG_DEBUG("Adding origin: " << rtpePtr->getDestination()
<< " to a new name prefix: " << name);
npte = make_shared<NamePrefixTableEntry>(name);
<< " to a new name prefix: " << name);
npte = std::make_shared<NamePrefixTableEntry>(name);
npte->addRoutingTableEntry(rtpePtr);
npte->generateNhlfromRteList();
m_table.push_back(npte);
// If this entry has next hops, we need to inform the FIB
if (npte->getNexthopList().size() > 0) {
NLSR_LOG_TRACE("Updating FIB with next hops for " << npte->getNamePrefix());
@ -131,6 +132,7 @@ NamePrefixTable::addEntry(const ndn::Name& name, const ndn::Name& destRouter)
m_fib.remove(name);
}
}
// Add the reference to this NPT to the RTPE.
rtpePtr->namePrefixTableEntries.emplace(
std::make_pair(npte->getNamePrefix(), std::weak_ptr<NamePrefixTableEntry>(npte)));

21
src/route/nexthop.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -69,25 +69,28 @@ NextHop::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::NextHop) {
std::stringstream error;
error << "Expected NextHop Block, but Block is of a different type: #"
<< m_wire.type();
BOOST_THROW_EXCEPTION(Error(error.str()));
NDN_THROW(Error("NextHop", m_wire.type()));
}
m_wire.parse();
ndn::Block::element_const_iterator val = m_wire.elements_begin();
auto val = m_wire.elements_begin();
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::Uri) {
m_connectingFaceUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
m_connectingFaceUri = ndn::encoding::readString(*val);
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required Uri field"));
NDN_THROW(Error("Missing required Uri field"));
}
m_routeCost = ndn::encoding::readDouble(*val);
if (val != m_wire.elements_end() && val->type() == ndn::tlv::nlsr::CostDouble) {
m_routeCost = ndn::encoding::readDouble(*val);
++val;
}
else {
NDN_THROW(Error("Missing required CostDouble field"));
}
}
bool

5
src/route/nexthop.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -27,9 +27,8 @@
#include <ndn-cxx/encoding/encoding-buffer.hpp>
#include <ndn-cxx/encoding/tlv.hpp>
#include <iostream>
#include <cmath>
#include <boost/cstdint.hpp>
#include <ostream>
namespace nlsr {

5
src/route/routing-table-calculator.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -28,9 +28,6 @@
#include "conf-parameter.hpp"
#include <list>
#include <boost/cstdint.hpp>
#include <ndn-cxx/name.hpp>
namespace nlsr {

21
src/route/routing-table-entry.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -70,14 +70,10 @@ RoutingTableEntry::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::RoutingTableEntry) {
std::stringstream error;
error << "Expected RoutingTable Block, but Block is of a different type: #"
<< m_wire.type();
BOOST_THROW_EXCEPTION(Error(error.str()));
NDN_THROW(Error("RoutingTableEntry", m_wire.type()));
}
m_wire.parse();
auto val = m_wire.elements_begin();
if (val != m_wire.elements_end() && val->type() == ndn::tlv::Name) {
@ -85,7 +81,7 @@ RoutingTableEntry::wireDecode(const ndn::Block& wire)
++val;
}
else {
BOOST_THROW_EXCEPTION(Error("Missing required destination field"));
NDN_THROW(Error("Missing required Name field"));
}
for (; val != m_wire.elements_end(); ++val) {
@ -93,10 +89,7 @@ RoutingTableEntry::wireDecode(const ndn::Block& wire)
m_nexthopList.addNextHop(NextHop(*val));
}
else {
std::stringstream error;
error << "Expected NextHop Block, but Block is of a different type: #"
<< m_wire.type();
BOOST_THROW_EXCEPTION(Error(error.str()));
NDN_THROW(Error("NextHop", val->type()));
}
}
}
@ -104,10 +97,8 @@ RoutingTableEntry::wireDecode(const ndn::Block& wire)
std::ostream&
operator<<(std::ostream& os, const RoutingTableEntry& rte)
{
os << " Destination: " << rte.getDestination() << "\n"
<< rte.getNexthopList() << "\n";
return os;
return os << " Destination: " << rte.getDestination() << "\n"
<< rte.getNexthopList() << "\n";
}
} // namespace nlsr

13
src/route/routing-table.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -273,14 +273,10 @@ RoutingTableStatus::wireDecode(const ndn::Block& wire)
m_wire = wire;
if (m_wire.type() != ndn::tlv::nlsr::RoutingTable) {
std::stringstream error;
error << "Expected RoutingTableStatus Block, but Block is of a different type: #"
<< m_wire.type();
BOOST_THROW_EXCEPTION(Error(error.str()));
NDN_THROW(Error("RoutingTable", m_wire.type()));
}
m_wire.parse();
auto val = m_wire.elements_begin();
std::set<ndn::Name> destinations;
@ -297,10 +293,7 @@ RoutingTableStatus::wireDecode(const ndn::Block& wire)
}
if (val != m_wire.elements_end()) {
std::stringstream error;
error << "Expected the end of elements, but Block is of a different type: #"
<< val->type();
BOOST_THROW_EXCEPTION(Error(error.str()));
NDN_THROW(Error("Unrecognized TLV of type " + ndn::to_string(val->type()) + " in RoutingTable"));
}
}

8
src/security/certificate-store.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -129,14 +129,14 @@ CertificateStore::onKeyInterest(const ndn::Name& name, const ndn::Interest& inte
void
CertificateStore::onKeyPrefixRegSuccess(const ndn::Name& name)
{
NLSR_LOG_DEBUG("KEY prefix: " << name << " registration is successful.");
NLSR_LOG_DEBUG("KEY prefix: " << name << " registration is successful");
}
void
CertificateStore::registrationFailed(const ndn::Name& name)
{
NLSR_LOG_ERROR("ERROR: Failed to register prefix " << name);
BOOST_THROW_EXCEPTION(std::runtime_error("Prefix registration failed"));
NLSR_LOG_ERROR("Failed to register prefix " << name);
NDN_THROW(std::runtime_error("Prefix registration failed"));
}
void

3
src/sequencing-manager.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -30,7 +30,6 @@
#include <list>
#include <string>
#include <boost/cstdint.hpp>
namespace nlsr {

26
src/update/manager-base.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2019, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
*/
#ifndef NLSR_MANAGER_BASE_HPP
#define NLSR_MANAGER_BASE_HPP
@ -37,6 +37,7 @@
#include <ndn-cxx/mgmt/nfd/control-response.hpp>
#include <boost/noncopyable.hpp>
#include <iostream>
namespace nlsr {
@ -52,16 +53,10 @@ public:
class Error : public std::runtime_error
{
public:
explicit
Error(const std::string& what)
: std::runtime_error(what)
{
}
using std::runtime_error::runtime_error;
};
public:
ManagerBase(ndn::mgmt::Dispatcher& m_dispatcher,
const std::string& module);
ManagerBase(ndn::mgmt::Dispatcher& m_dispatcher, const std::string& module);
protected:
/*! \brief generate the relative prefix for a handler by appending the verb name to the module name
@ -76,16 +71,15 @@ PUBLIC_WITH_TESTS_ELSE_PROTECTED:
bool
validateParameters(const ndn::mgmt::ControlParameters& parameters)
{
const ndn::nfd::ControlParameters* castParams =
dynamic_cast<const ndn::nfd::ControlParameters*>(&parameters);
const auto* castParams = dynamic_cast<const ndn::nfd::ControlParameters*>(&parameters);
BOOST_ASSERT(castParams != nullptr);
T command;
try {
command.validateRequest(*castParams);
}
catch (const ndn::nfd::ControlCommand::ArgumentError& ae) {
throw ae;
catch (const ndn::nfd::ControlCommand::ArgumentError&) {
throw;
}
catch (const std::exception& e) {
std::cerr << e.what() << std::endl;

10
src/update/nfd-rib-command-processor.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2018, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
*/
#include "nfd-rib-command-processor.hpp"
@ -32,12 +32,12 @@ NfdRibCommandProcessor::NfdRibCommandProcessor(ndn::mgmt::Dispatcher& dispatcher
m_dispatcher.addControlCommand<ndn::nfd::ControlParameters>(makeRelPrefix("register"),
ndn::mgmt::makeAcceptAllAuthorization(),
std::bind(&NfdRibCommandProcessor::validateParameters<NfdRibRegisterCommand>, this, _1),
bind(&NfdRibCommandProcessor::advertiseAndInsertPrefix, this, _1, _2, _3, _4));
std::bind(&NfdRibCommandProcessor::advertiseAndInsertPrefix, this, _1, _2, _3, _4));
m_dispatcher.addControlCommand<ndn::nfd::ControlParameters>(makeRelPrefix("unregister"),
ndn::mgmt::makeAcceptAllAuthorization(),
std::bind(&NfdRibCommandProcessor::validateParameters<NfdRibUnregisterCommand>, this, _1),
bind(&NfdRibCommandProcessor::withdrawAndRemovePrefix, this, _1, _2, _3, _4));
std::bind(&NfdRibCommandProcessor::withdrawAndRemovePrefix, this, _1, _2, _3, _4));
}
} // namespace update

8
src/update/prefix-update-processor.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -22,8 +22,10 @@
#include "prefix-update-processor.hpp"
#include "lsdb.hpp"
#include "nlsr.hpp"
#include <ndn-cxx/mgmt/nfd/control-response.hpp>
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/mgmt/nfd/control-response.hpp>
#include <boost/algorithm/string.hpp>
#include <algorithm>
@ -41,7 +43,7 @@ using SignerTag = ndn::SimpleTag<ndn::Name, 20>;
static ndn::optional<std::string>
getSignerFromTag(const ndn::Interest& interest)
{
shared_ptr<SignerTag> signerTag = interest.getTag<SignerTag>();
auto signerTag = interest.getTag<SignerTag>();
if (signerTag == nullptr) {
return ndn::nullopt;
}

20
src/utility/name-helper.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2017, The University of Memphis,
/*
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@ -18,17 +18,12 @@
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*
* \author A K M Mahmudul Hoque <ahoque1@memphis.edu>
*
**/
*/
#ifndef NLSR_NAME_HELPER_HPP
#define NLSR_NAME_HELPER_HPP
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/regex_find_format.hpp>
#include <boost/regex.hpp>
#include <boost/cstdint.hpp>
#include <ndn-cxx/name-component.hpp>
#include <ndn-cxx/name.hpp>
#include "common.hpp"
namespace nlsr {
namespace util {
@ -40,7 +35,7 @@ namespace util {
\return -1 if searchString not found else return the position
starting from 0
*/
inline static int32_t
inline int32_t
getNameComponentPosition(const ndn::Name& name, const std::string& searchString)
{
ndn::name::Component component(searchString);
@ -54,7 +49,6 @@ getNameComponentPosition(const ndn::Name& name, const std::string& searchString)
}
} // namespace util
} // namespace nlsr
#endif //NLSR_NAME_HELPER_HPP
#endif // NLSR_NAME_HELPER_HPP

10
tests/route/test-name-prefix-table.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -181,7 +181,7 @@ BOOST_FIXTURE_TEST_CASE(RemoveRoutingEntryFromNptEntry, NamePrefixTableFixture)
RoutingTablePoolEntry rtpe1("/ndn/memphis/rtr1", 0);
NamePrefixTableEntry npte1("/ndn/memphis/rtr2");
npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte1));
npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte1));
npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/rtr1");
npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/altrtr");
@ -204,7 +204,7 @@ BOOST_FIXTURE_TEST_CASE(RemoveRoutingEntryFromNptEntry, NamePrefixTableFixture)
BOOST_FIXTURE_TEST_CASE(AddNptEntryPtrToRoutingEntry, NamePrefixTableFixture)
{
NamePrefixTableEntry npte1("/ndn/memphis/rtr2");
npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte1));
npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte1));
npt.addEntry("/ndn/memphis/rtr2", "/ndn/memphis/rtr1");
@ -232,8 +232,8 @@ BOOST_FIXTURE_TEST_CASE(RemoveNptEntryPtrFromRoutingEntry, NamePrefixTableFixtur
NamePrefixTableEntry npte1("/ndn/memphis/rtr1");
NamePrefixTableEntry npte2("/ndn/memphis/rtr2");
RoutingTableEntry rte1("/ndn/memphis/destination1");
npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte1));
npt.m_table.push_back(make_shared<NamePrefixTableEntry>(npte2));
npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte1));
npt.m_table.push_back(std::make_shared<NamePrefixTableEntry>(npte2));
npt.addEntry(npte1.getNamePrefix(), rte1.getDestination());
// We have to add two entries, otherwise the routing pool entry will be deleted.

10
tests/test-common.hpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -40,8 +40,6 @@
namespace nlsr {
namespace test {
using namespace ndn::time_literals;
ndn::Data&
signData(ndn::Data& data);
@ -50,8 +48,8 @@ checkPrefixRegistered(const ndn::util::DummyClientFace& face, const ndn::Name& p
/** \brief add a fake signature to Data
*/
inline shared_ptr<ndn::Data>
signData(shared_ptr<ndn::Data> data)
inline std::shared_ptr<ndn::Data>
signData(std::shared_ptr<ndn::Data> data)
{
signData(*data);
return data;
@ -158,7 +156,7 @@ public:
" cannot be satisfied by this Data " << name);
}
auto data = make_shared<ndn::Data>(name);
auto data = std::make_shared<ndn::Data>(name);
data->setFreshnessPeriod(1_s);
data->setFinalBlock(name[-1]);
data->setContent(std::forward<ContentArgs>(contentArgs)...);

4
tests/test-lsdb.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -34,8 +34,6 @@
namespace nlsr {
namespace test {
using namespace ndn::time_literals;
class LsdbFixture : public UnitTestTimeFixture
{
public:

4
tests/test-nlsr.cpp

@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2020, The University of Memphis,
* Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@ -29,8 +29,6 @@
namespace nlsr {
namespace test {
using namespace ndn::time_literals;
class NlsrFixture : public MockNfdMgmtFixture
{
public:

Loading…
Cancel
Save