Public Member Functions | |
| Options (Milliseconds gracePeriod=2 *60 *1000.0, int maxRecords=1000, Milliseconds recordLifetime=3600 *1000.0) | |
| Create a ValidationPolicyCommandInterest::Options with the optional values. More... | |
Public Attributes | |
| Milliseconds | gracePeriod_ |
| gracePeriod is the tolerance of the initial timestamp in milliseconds. More... | |
| int | maxRecords_ |
| maxRecords is the maximum number of distinct public keys of which to record the last timestamp. More... | |
| Milliseconds | recordLifetime_ |
| recordLifetime is the maximum lifetime of a last timestamp record in milliseconds. More... | |
|
inline |
Create a ValidationPolicyCommandInterest::Options with the optional values.
| gracePeriod | (optional) See below for description. If omitted, use 2 minutes. |
| maxRecords | (optional) See below for description. If omitted, use 1000 records. |
| recordLifetime | (optional) See below for description. If omitted, use 1 hour. |
| Milliseconds ndn::ValidationPolicyCommandInterest::Options::gracePeriod_ |
gracePeriod is the tolerance of the initial timestamp in milliseconds.
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 the same timestamp as the system clock, which most likely rejects all command Interests.
| int ndn::ValidationPolicyCommandInterest::Options::maxRecords_ |
maxRecords is the maximum number of distinct public keys of which to record the last timestamp.
The validator records the 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, then the oldest record is deleted.
Setting this option to -1 allows tracking unlimited public keys. Setting this option to 0 disables using last timestamp records and causes every command Interest to be processed as initial.
| Milliseconds ndn::ValidationPolicyCommandInterest::Options::recordLifetime_ |
recordLifetime is the maximum lifetime of a last timestamp record in milliseconds.
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.
1.8.6