NDN-DPDK
High-Speed Named Data Networking Forwarder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
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). More...
 

Functions

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

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.