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

Functions

 N_LOG_INIT (Cs)
uint32_t Cs_GetCapacity (Cs *cs, CsListID l)
 Get capacity in number of entries.
uint32_t Cs_CountEntries (Cs *cs, CsListID l)
 Get number of entries.
void Cs_Insert (Cs *cs, Packet *npkt, PitFindResult pitFound)
 Insert a CS entry.
CsEntryCs_MatchInterest (Cs *cs, CsEntry *entry, Packet *interestNpkt)
 Determine whether the CS entry matches an Interest during PIT insertion.
void Cs_Erase (Cs *cs, CsEntry *entry)
 Erase a CS entry.

Function Documentation

◆ Cs_CountEntries()

uint32_t Cs_CountEntries ( Cs * cs,
CsListID l )

Get number of entries.

◆ Cs_Erase()

void Cs_Erase ( Cs * cs,
CsEntry * entry )

Erase a CS entry.

Postcondition
entry is no longer valid.

◆ Cs_GetCapacity()

uint32_t Cs_GetCapacity ( Cs * cs,
CsListID l )

Get capacity in number of entries.

◆ Cs_Insert()

void Cs_Insert ( Cs * cs,
Packet * npkt,
PitFindResult pitFound )

Insert a CS entry.

Parameters
npktthe Data packet. CS takes ownership.
pitFoundresult of Pit_FindByData that contains PIT entries satisfied by this Data; its kind must not be PIT_FIND_NONE.
Postcondition
PIT entries contained in pitFound are removed.

◆ Cs_MatchInterest()

CsEntry * Cs_MatchInterest ( Cs * cs,
CsEntry * entry,
Packet * interestNpkt )

Determine whether the CS entry matches an Interest during PIT insertion.

Parameters
entrythe CS entry, possibly indirect.
Returns
direct CS entry if matching, NULL if not matching.

◆ N_LOG_INIT()

N_LOG_INIT ( Cs )