Remove hints
Change-Id: I537619fefad6ffb6b46c5dc618f0fdcc15884d6e
diff --git a/tools/ndns-daemon.cpp b/tools/ndns-daemon.cpp
index af68abd..65028ea 100644
--- a/tools/ndns-daemon.cpp
+++ b/tools/ndns-daemon.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -50,8 +50,6 @@
config.addSectionHandler("zones",
bind(&NdnsDaemon::processZonesSection, this, _1, _3));
- config.addSectionHandler("hints",
- bind(&NdnsDaemon::processHintsSection, this, _1, _3));
config.parse(configFile, false);
@@ -70,13 +68,6 @@
}
void
- processHintsSection(const ndn::ndns::ConfigSection& section, const std::string& filename)
- {
- // hint is not supported yet
- ;
- }
-
- void
processZonesSection(const ndn::ndns::ConfigSection& section, const std::string& filename)
{
using namespace boost::filesystem;
diff --git a/tools/ndns-dig.cpp b/tools/ndns-dig.cpp
index bbe5ad3..f7f9af0 100644
--- a/tools/ndns-dig.cpp
+++ b/tools/ndns-dig.cpp
@@ -43,11 +43,10 @@
class NdnsDig
{
public:
- NdnsDig(const Name& hint, const Name& dstLabel,
+ NdnsDig(const Name& dstLabel,
const name::Component& rrType, bool shouldValidateIntermediate)
: m_dstLabel(dstLabel)
, m_rrType(rrType)
- , m_hint(hint)
, m_interestLifetime(DEFAULT_INTEREST_LIFETIME)
, m_validator(m_face)
, m_shouldValidateIntermediate(shouldValidateIntermediate)
@@ -199,7 +198,6 @@
Name m_dstLabel;
name::Component m_rrType;
- Name m_hint;
Name m_certName;
time::milliseconds m_interestLifetime;
@@ -305,7 +303,7 @@
}
try {
- ndn::ndns::NdnsDig dig("", dstLabel, ndn::name::Component(rrType), shouldValidateIntermediate);
+ ndn::ndns::NdnsDig dig(dstLabel, ndn::name::Component(rrType), shouldValidateIntermediate);
dig.setInterestLifetime(ndn::time::seconds(ttl));
dig.setDstFile(dstFile);
diff --git a/tools/ndns-update.cpp b/tools/ndns-update.cpp
index 0b56c55..9dbbb2c 100644
--- a/tools/ndns-update.cpp
+++ b/tools/ndns-update.cpp
@@ -48,9 +48,8 @@
class NdnsUpdate : noncopyable
{
public:
- NdnsUpdate(const Name& hint, const Name& zone, const shared_ptr<Data>& update, Face& face)
- : m_hint(hint)
- , m_zone(zone)
+ NdnsUpdate(const Name& zone, const shared_ptr<Data>& update, Face& face)
+ : m_zone(zone)
, m_interestLifetime(DEFAULT_INTEREST_LIFETIME)
, m_face(face)
, m_validator(face)
@@ -136,7 +135,7 @@
Interest
makeUpdateInterest()
{
- Query q(m_hint, m_zone, label::NDNS_ITERATIVE_QUERY);
+ Query q(m_zone, label::NDNS_ITERATIVE_QUERY);
q.setRrLabel(Name().append(m_update->wireEncode()));
q.setRrType(label::NDNS_UPDATE_LABEL);
q.setInterestLifetime(m_interestLifetime);
@@ -183,7 +182,6 @@
}
private:
- Name m_hint;
Name m_zone;
time::milliseconds m_interestLifetime;
@@ -207,7 +205,6 @@
using namespace ndn;
using namespace ndn::ndns;
- Name hint;
Name zone;
int ttl = 4;
Name rrLabel;
@@ -227,7 +224,6 @@
po::options_description config("Configuration");
config.add_options()
- ("hint,H", po::value<Name>(&hint), "forwarding hint")
("ttl,T", po::value<int>(&ttl), "TTL of query. default: 4 sec")
("rrtype,t", po::value<string>(&rrType), "set request RR Type. default: TXT")
("ndnsType,n", po::value<string>(&ndnsTypeStr), "Set the ndnsType of the resource record. "
@@ -255,7 +251,7 @@
config_file_options.add(config).add(hidden);
po::options_description visible("Usage: ndns-update zone rrLabel [-t rrType] [-T TTL] "
- "[-H hint] [-n NdnsType] [-c cert] "
+ "[-n NdnsType] [-c cert] "
"[-f contentFile]|[-o content]\n"
"Allowed options");
@@ -382,7 +378,7 @@
}
Response re;
- re.fromData(hint, zone, *update);
+ re.fromData(zone, *update);
if (vm.count("rrlabel") && rrLabel != re.getRrLabel()) {
std::cerr << "The loaded Data packet is supposed to have rrLabel: " << re.getRrLabel()
@@ -411,7 +407,7 @@
Face face;
try {
- NdnsUpdate updater(hint, zone, update, face);
+ NdnsUpdate updater(zone, update, face);
updater.setInterestLifetime(ndn::time::seconds(ttl));
updater.start();