ping: set CanBePrefix=false
This commit also sets CanBePrefix in ndndump and ndnpoke tests.
refs #4581
Change-Id: Ie91839426acc02f1879495312ad7ef131e8dac57
diff --git a/tools/ping/README.md b/tools/ping/README.md
index 8c0c513..8df5adc 100644
--- a/tools/ping/README.md
+++ b/tools/ping/README.md
@@ -67,8 +67,10 @@
one or more printable characters only, to make it easier for a human operator to read the logs.
A client implementation MAY restrict this field to be non-empty and have printable characters only.
-The probe Interest SHOULD carry MustBeFresh selector by default.
-A client implementation MAY allow the operator to turn off MustBeFresh selector.
+The probe Interest SHOULD NOT carry CanBePrefix element.
+
+The probe Interest SHOULD carry MustBeFresh element.
+A client implementation MAY allow the operator to remove MustBeFresh element.
### Reply Data
diff --git a/tools/ping/client/ping.cpp b/tools/ping/client/ping.cpp
index c6290b0..7f2e2a4 100644
--- a/tools/ping/client/ping.cpp
+++ b/tools/ping/client/ping.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, Arizona Board of Regents.
+/*
+ * Copyright (c) 2014-2018, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -62,6 +62,7 @@
Name pingPacketName = makePingName(m_nextSeq);
Interest interest(pingPacketName);
+ interest.setCanBePrefix(false);
interest.setMustBeFresh(!m_options.shouldAllowStaleData);
interest.setInterestLifetime(m_options.timeout);