NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::CommandInterestValidator::Options Class Reference

#include <command-interest-validator.hpp>

Collaboration diagram for ndn::security::CommandInterestValidator::Options:

Public Member Functions

 Options ()
 

Public Attributes

time::nanoseconds gracePeriod = time::seconds(120)
 tolerance of initial timestamp More...
 
ssize_t maxTimestamps = 1000
 max number of distinct public keys to record last timestamp More...
 
time::nanoseconds timestampTtl = time::hours(1)
 max lifetime of a last timestamp record More...
 

Detailed Description

Definition at line 43 of file command-interest-validator.hpp.

Constructor & Destructor Documentation

◆ Options()

ndn::security::CommandInterestValidator::Options::Options ( )
inline

Definition at line 46 of file command-interest-validator.hpp.

Member Data Documentation

◆ gracePeriod

time::nanoseconds ndn::security::CommandInterestValidator::Options::gracePeriod = time::seconds(120)

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 64 of file command-interest-validator.hpp.

Referenced by ndn::security::CommandInterestValidator::checkPolicy(), and ndn::security::CommandInterestValidator::CommandInterestValidator().

◆ maxTimestamps

ssize_t ndn::security::CommandInterestValidator::Options::maxTimestamps = 1000

max number of distinct public keys to record 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 81 of file command-interest-validator.hpp.

Referenced by ndn::security::CommandInterestValidator::checkPolicy().

◆ timestampTtl

time::nanoseconds ndn::security::CommandInterestValidator::Options::timestampTtl = time::hours(1)

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 90 of file command-interest-validator.hpp.

Referenced by ndn::security::CommandInterestValidator::checkPolicy().


The documentation for this class was generated from the following file: