#include <ndn-cxx/security/validation-policy-command-interest.hpp>
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... | |
Definition at line 47 of file validation-policy-command-interest.hpp.
|
inline |
Definition at line 50 of file validation-policy-command-interest.hpp.
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 68 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 85 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 94 of file validation-policy-command-interest.hpp.