peek: transform Link into ForwardingHint
refs #4055
Change-Id: I7b06e1882809ec9edde8447d82db2257431504a3
diff --git a/tests/peek/ndnpeek.t.cpp b/tests/peek/ndnpeek.t.cpp
index b05a3e4..a54426b 100644
--- a/tests/peek/ndnpeek.t.cpp
+++ b/tests/peek/ndnpeek.t.cpp
@@ -166,7 +166,7 @@
BOOST_CHECK_EQUAL(face.sentInterests.back().getMaxSuffixComponents(), -1);
BOOST_CHECK_EQUAL(face.sentInterests.back().getMinSuffixComponents(), -1);
BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
- BOOST_CHECK_EQUAL(face.sentInterests.back().hasLink(), false);
+ BOOST_CHECK(face.sentInterests.back().getForwardingHint().empty());
BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), false);
BOOST_CHECK_EQUAL(face.sentInterests.back().getChildSelector(), DEFAULT_CHILD_SELECTOR);
BOOST_CHECK(peek->getResultCode() == ResultCode::DATA);
@@ -199,8 +199,7 @@
BOOST_CHECK_EQUAL(face.sentInterests.back().getMaxSuffixComponents(), 1);
BOOST_CHECK_EQUAL(face.sentInterests.back().getMinSuffixComponents(), 1);
BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), time::milliseconds(200));
- BOOST_CHECK_EQUAL(face.sentInterests.back().hasLink(), true);
- BOOST_CHECK_EQUAL(face.sentInterests.back().getLink(), *options.link);
+ BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint(), options.link->getDelegationList());
BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), true);
BOOST_CHECK_EQUAL(face.sentInterests.back().getChildSelector(), 1);
BOOST_CHECK(peek->getResultCode() == ResultCode::DATA);
diff --git a/tools/peek/ndnpeek/ndnpeek.cpp b/tools/peek/ndnpeek/ndnpeek.cpp
index c9f89b2..372a419 100644
--- a/tools/peek/ndnpeek/ndnpeek.cpp
+++ b/tools/peek/ndnpeek/ndnpeek.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -80,7 +80,7 @@
interest.setInterestLifetime(m_options.interestLifetime);
if (m_options.link != nullptr)
- interest.setLink(m_options.link->wireEncode());
+ interest.setForwardingHint(m_options.link->getDelegationList());
if (m_options.mustBeFresh)
interest.setMustBeFresh(true);
diff --git a/tools/peek/ndnpeek/ndnpeek.hpp b/tools/peek/ndnpeek/ndnpeek.hpp
index 2b0a85e..c8c58b9 100644
--- a/tools/peek/ndnpeek/ndnpeek.hpp
+++ b/tools/peek/ndnpeek/ndnpeek.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,6 +30,7 @@
#define NDN_TOOLS_NDNPEEK_NDNPEEK_HPP
#include "core/common.hpp"
+#include <ndn-cxx/link.hpp>
namespace ndn {
namespace peek {