ddn.net.dtls.replay

DTLS anti-replay protection.

Implements the sliding window algorithm specified in RFC 6347 §4.1.2.6 to detect duplicate or replayed DTLS records.

Types 1

DTLS anti-replay window (RFC 6347 §4.1.2.6).

Uses a 64-bit sliding window to detect duplicate or old records. Sequence numbers are 48-bit values (top 16 bits of ulong unused).

Fields
private ulong left_
private ulong bitmap_
Methods
bool checkAndMark(ulong seq) @safe pure nothrow @nogcCheck if a sequence number is acceptable and mark it as seen.
void reset() @safe pure nothrow @nogcReset the window (e.g., on epoch change).
ulong left() const @safe pure nothrow @nogcReturns the left edge of the current window.
ulong bitmap() const @safe pure nothrow @nogcReturns the current bitmap state.