58 uint32_t
nonce()
const {
return nonce_; }
103 std::array<FaceId, PIT_MAX_FACES_PER_ENTRY> incomingFaces_{};
104 uint8_t numFaces_ = 0;
214 size_t size()
const {
return size_; }
240 std::array<PitEntry, PIT_MAX_ENTRIES> entries_{};
size_t faceCount() const
Get the number of registered Faces.
bool hasFace(FaceId faceId) const
Check if a given Face is registered.
FaceId face(size_t index) const
Get the Face ID at a given index.
uint32_t nonce() const
Get the Interest nonce.
const Name & name() const
Get the Interest Name.
TimeMs expireTime() const
Get the entry expiration time.
bool addFace(FaceId faceId)
Add a Face.
size_t capacity() const
Get the maximum number of entries.
PitInsertResult insert(const Interest &interest, FaceId incomingFace, PitEntry **outEntry=nullptr)
Insert an Interest.
void processTimeouts(TimeMs now, TimeoutCallback callback=nullptr)
Process timed-out entries.
const Stats & stats() const
Get statistics.
size_t size() const
Get the current number of entries.
std::function< void(const PitEntry &)> TimeoutCallback
Timeout callback.
PitEntry * find(const Name &name)
Find an entry by Name.
void remove(PitEntry *entry)
Remove an entry.
Common definitions for the NDN protocol stack.
uint64_t TimeMs
Timestamp type (milliseconds)
uint16_t FaceId
Face identifier.
PitInsertResult
PIT insertion result.
@ Aggregated
Face added to existing entry (aggregation)
@ Duplicate
Same nonce detected (loop)
constexpr size_t PIT_MAX_FACES_PER_ENTRY
Maximum number of Faces per PIT entry.
constexpr size_t PIT_MAX_ENTRIES
Maximum number of PIT entries.
uint32_t insertions
Number of new insertions.
uint32_t duplicates
Number of duplicate detections (loops)
uint32_t timeouts
Number of timeouts.
uint32_t aggregations
Number of aggregations.