NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
pit-entry.c File Reference
#include "pit-entry.h"
#include "../core/base16.h"
#include "../core/logger.h"
#include "pit-iterator.h"
#include "pit.h"

Functions

 N_LOG_INIT (PitEntry)
const char * PitEntry_ToDebugString (PitEntry *entry)
 Convert entry to a string for debug purpose.
FibEntryPitEntry_FindFibEntry (PitEntry *entry, Fib *fib)
 Retrieve FIB entry via PIT entry's FIB reference.
void PitEntry_SetExpiryTimer (PitEntry *entry, Pit *pit)
 Set timer to erase PIT entry when its last PitDn expires.
bool PitEntry_SetSgTimer (PitEntry *entry, Pit *pit, TscDuration after)
 Set timer to invoke strategy after after.
void PitEntry_Timeout_ (MinTmr *tmr, uintptr_t pitPtr)
FaceID PitEntry_FindDuplicateNonce (PitEntry *entry, uint32_t nonce, FaceID dnFace)
 Find duplicate nonce among DN records other than rxFace.
PitDnPitEntry_InsertDn (PitEntry *entry, Pit *pit, Packet *npkt)
 Insert new DN record, or update existing DN record.
PitUpPitEntry_FindUp (PitEntry *entry, FaceID face)
 Find existing UP record.
PitUpPitEntry_ReserveUp (PitEntry *entry, FaceID face)
 Find existing UP record, or reserve slot for new UP record.
void PitEntry_GetTxInterestIlHl (PitEntry *entry, TscTime now, uint32_t *lifetime, uint8_t *hopLimit)
 Calculate InterestLifetime and HopLimit for TX Interest.

Function Documentation

◆ N_LOG_INIT()

N_LOG_INIT ( PitEntry )

◆ PitEntry_FindDuplicateNonce()

FaceID PitEntry_FindDuplicateNonce ( PitEntry * entry,
uint32_t nonce,
FaceID rxFace )

Find duplicate nonce among DN records other than rxFace.

Returns
FaceID of PitDn with duplicate nonce, or zero if none.

◆ PitEntry_FindFibEntry()

FibEntry * PitEntry_FindFibEntry ( PitEntry * entry,
Fib * fib )

Retrieve FIB entry via PIT entry's FIB reference.

Precondition
Calling thread holds rcu_read_lock, which must be retained until it stops using the returned entry.

◆ PitEntry_FindUp()

PitUp * PitEntry_FindUp ( PitEntry * entry,
FaceID face )

Find existing UP record.

Parameters
entryPIT entry, must be initialized.
faceupstream face.
Returns
UP record, or NULL if not exist.

◆ PitEntry_GetTxInterestIlHl()

void PitEntry_GetTxInterestIlHl ( PitEntry * entry,
TscTime now,
uint32_t * lifetime,
uint8_t * hopLimit )

Calculate InterestLifetime and HopLimit for TX Interest.

◆ PitEntry_InsertDn()

PitDn * PitEntry_InsertDn ( PitEntry * entry,
Pit * pit,
Packet * npkt )

Insert new DN record, or update existing DN record.

Parameters
entryPIT entry, must be initialized.
npktreceived Interest; will take ownership unless returning NULL.
Returns
DN record, or NULL if no slot is available.

◆ PitEntry_ReserveUp()

PitUp * PitEntry_ReserveUp ( PitEntry * entry,
FaceID face )

Find existing UP record, or reserve slot for new UP record.

Parameters
entryPIT entry, must be initialized.
faceupstream face.
Returns
UP record, or NULL if no slot is available.
Note
If returned UP record is unused (no PitUp_RecordTx invocation), it will be overwritten on the next PitEntry_ReserveUp invocation.

◆ PitEntry_SetExpiryTimer()

void PitEntry_SetExpiryTimer ( PitEntry * entry,
Pit * pit )

Set timer to erase PIT entry when its last PitDn expires.

◆ PitEntry_SetSgTimer()

bool PitEntry_SetSgTimer ( PitEntry * entry,
Pit * pit,
TscDuration after )

Set timer to invoke strategy after after.

Return values
Timerset successfully.
Unableto set timer; reverted to expiry timer.

◆ PitEntry_Timeout_()

void PitEntry_Timeout_ ( MinTmr * tmr,
uintptr_t pitPtr )

◆ PitEntry_ToDebugString()

const char * PitEntry_ToDebugString ( PitEntry * entry)

Convert entry to a string for debug purpose.

Returns
see DebugString_Get