[Ndn-interest] Question on Exclude?

Hwang In Chan neogeoss1 at gmail.com
Wed Nov 2 01:52:07 PDT 2016

Dear NDN researchers,

I am studying code on interest.cpp. I am particularly curious on the name
comparison with
exclude() which is specified in


// check Exclude
  // Exclude won't be violated if Interest Name is same as Data full Name
  if (!getExclude().empty() && fullNameLength > interestNameLength) {
    if (interestNameLength == fullNameLength - 1) {
      // component to exclude is the digest
        return false;
      // There's opportunity to inspect the Exclude filter and determine
      // the digest would make a difference.
      // eg. "<NameComponent>AA</NameComponent><Any/>" doesn't exclude any
digest -
      //     fullName not needed;
      //     "<Any/><NameComponent>AA</NameComponent>" and
      //      </ImplicitSha256DigestComponent>"
      //     excludes all digests - fullName not needed;
      //      </ImplicitSha256DigestComponent>"
      //     excludes some digests - fullName required
      // But Interests that contain the exact Data Name before digest and
      // contain Exclude filter is too rare to optimize for, so we request
      // fullName no mater what's in the Exclude filter.
    else {
      // component to exclude is not the digest
      if (getExclude().isExcluded(dataNamePuid.get(interestNameLength)))
        return false;

What does it exactly do>? and Can I delete this code ? If I remove them, is
there any problem happening?

Best wishes,

inchan Hwang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20161102/2ff443cd/attachment.html>

More information about the Ndn-interest mailing list