NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
pit.h File Reference
#include "pcct.h"
#include "pit-result.h"

Go to the source code of this file.

Macros

#define PIT_MAX_LIFETIME   120000
 Maximum PIT entry lifetime (millis).

Functions

void Pit_Init (Pit *pit)
 Constructor.
void Pit_SetSgTimerCb (Pit *pit, Pit_SgTimerCb cb, uintptr_t ctx)
 Set callback when strategy timer expires.
PitInsertResult Pit_Insert (Pit *pit, Packet *npkt, const FibEntry *fibEntry)
 Insert or find a PIT entry for the given Interest.
void Pit_Erase (Pit *pit, PitEntry *entry)
 Erase a PIT entry.
void Pit_EraseSatisfied (Pit *pit, PitFindResult res)
 Erase satisfied PIT entries but retain the PccEntry.
PitFindResult Pit_FindByData (Pit *pit, Packet *npkt, uint64_t token)
 Find PIT entries matching a Data.
PitEntryPit_FindByNack (Pit *pit, Packet *npkt, uint64_t token)
 Find PIT entry matching a Nack.

Macro Definition Documentation

◆ PIT_MAX_LIFETIME

#define PIT_MAX_LIFETIME   120000

Maximum PIT entry lifetime (millis).

Function Documentation

◆ Pit_Erase()

void Pit_Erase ( Pit * pit,
PitEntry * entry )

Erase a PIT entry.

Postcondition
entry is no longer valid.

◆ Pit_EraseSatisfied()

void Pit_EraseSatisfied ( Pit * pit,
PitFindResult res )

Erase satisfied PIT entries but retain the PccEntry.

Parameters
resfind result, must not have PIT_FIND_NEED_DIGEST.

◆ Pit_FindByData()

PitFindResult Pit_FindByData ( Pit * pit,
Packet * npkt,
uint64_t token )

Find PIT entries matching a Data.

Parameters
npktData packet.
tokenPCC token of the packet.

◆ Pit_FindByNack()

PitEntry * Pit_FindByNack ( Pit * pit,
Packet * npkt,
uint64_t token )

Find PIT entry matching a Nack.

Parameters
npktNack packet.
tokenPCC token of the packet.

◆ Pit_Init()

void Pit_Init ( Pit * pit)

Constructor.

◆ Pit_Insert()

PitInsertResult Pit_Insert ( Pit * pit,
Packet * npkt,
const FibEntry * fibEntry )

Insert or find a PIT entry for the given Interest.

Parameters
npktInterest packet.

The PIT-CS lookup includes forwarding hint. PInterest's activeFh field indicates which fwhint is in use, and setting it to -1 disables fwhint.

If there is a CS match, return the CS entry. If there is a PIT match, return the PIT entry. Otherwise, unless the PCCT is full, insert and initialize a PIT entry.

When a new PIT entry is inserted, the PIT entry owns npkt but does not free it, so the caller may continue using it until PitEntry_InsertDn.

◆ Pit_SetSgTimerCb()

void Pit_SetSgTimerCb ( Pit * pit,
Pit_SgTimerCb cb,
uintptr_t ctx )

Set callback when strategy timer expires.