ndn::security::v2::ValidationPolicyCommandInterest::Options Class Reference

#include <ndn-cxx/security/v2/validation-policy-command-interest.hpp>

+ Collaboration diagram for ndn::security::v2::ValidationPolicyCommandInterest::Options:

Public Member Functions

 Options ()
 

Public Attributes

time::nanoseconds gracePeriod = 2_min
 tolerance of initial timestamp More...
 
ssize_t maxRecords = 1000
 max number of distinct public keys of which to record the last timestamp More...
 
time::nanoseconds recordLifetime = 1_h
 max lifetime of a last timestamp record More...
 

Detailed Description

Definition at line 45 of file validation-policy-command-interest.hpp.

Constructor & Destructor Documentation

ndn::security::v2::ValidationPolicyCommandInterest::Options::Options ( )
inline

Definition at line 48 of file validation-policy-command-interest.hpp.

Member Data Documentation

time::nanoseconds ndn::security::v2::ValidationPolicyCommandInterest::Options::gracePeriod = 2_min

tolerance of initial timestamp

A stop-and-wait command Interest is considered "initial" if the validator has not recorded the last timestamp from the same public key, or when such knowledge has been erased. For an initial command Interest, its timestamp is compared to the current system clock, and the command Interest is rejected if the absolute difference is greater than the grace interval.

This should be positive. Setting this option to 0 or negative causes the validator to require exactly same timestamp as the system clock, which most likely rejects all command Interests.

Definition at line 66 of file validation-policy-command-interest.hpp.

ssize_t ndn::security::v2::ValidationPolicyCommandInterest::Options::maxRecords = 1000

max number of distinct public keys of which to record the last timestamp

The validator records last timestamps for every public key. For a subsequent command Interest using the same public key, its timestamp is compared to the last timestamp from that public key, and the command Interest is rejected if its timestamp is less than or equal to the recorded timestamp.

This option limits the number of distinct public keys being tracked. If the limit is exceeded, the oldest record is deleted.

Setting this option to -1 allows tracking unlimited public keys. Setting this option to 0 disables last timestamp records and causes every command Interest to be processed as initial.

Definition at line 83 of file validation-policy-command-interest.hpp.

time::nanoseconds ndn::security::v2::ValidationPolicyCommandInterest::Options::recordLifetime = 1_h

max lifetime of a last timestamp record

A last timestamp record expires and can be deleted if it has not been refreshed within this duration. Setting this option to 0 or negative makes last timestamp records expire immediately and causes every command Interest to be processed as initial.

Definition at line 92 of file validation-policy-command-interest.hpp.