NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
pit-entry.h File Reference
#include "../fib/fib.h"
#include "pit-const.h"
#include "pit-dn.h"
#include "pit-struct.h"
#include "pit-up.h"

Go to the source code of this file.

Data Structures

struct  PitEntry
 A PIT entry. More...
struct  PitEntry::__rte_packed_begin
struct  PitEntryExt

Typedefs

typedef struct PitEntryExt PitEntryExt

Enumerations

enum  { PitFibPrefixLenBits_ = 9 }

Functions

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 rxFace)
 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.

Typedef Documentation

◆ PitEntryExt

typedef struct PitEntryExt PitEntryExt

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PitFibPrefixLenBits_ 

Function Documentation

◆ 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