Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
Classes | Typedefs | Functions
pit.h File Reference

The Pending Interest Table interface. More...

#include <hicn/core/forwarder.h>
#include <hicn/core/message.h>
#include <hicn/core/numberSet.h>
#include <hicn/processor/pitEntry.h>
#include <hicn/processor/pitVerdict.h>
Include dependency graph for pit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pit
 

Typedefs

typedef struct pit PIT
 

Functions

void * pit_Closure (const PIT *pit)
 
void pit_Release (PIT **pitPtr)
 
PITVerdict pit_ReceiveInterest (PIT *pit, Message *interestMessage)
 
NumberSet * pit_SatisfyInterest (PIT *pit, const Message *objectMessage)
 
void pit_RemoveInterest (PIT *pit, const Message *interestMessage)
 
PitEntry * pit_GetPitEntry (const PIT *pit, const Message *interestMessage)
 

Detailed Description

The Pending Interest Table interface.

Interface for implementing a PIT table

Function Documentation

◆ pit_GetPitEntry()

PitEntry* pit_GetPitEntry ( const PIT pit,
const Message *  interestMessage 
)

@function pit_GetPitEntry @abstract Retrieve the best matching PIT entry for the message. @discussion Returns a reference counted copy of the entry, must call pitEntry_Destory() on it.

Returns
NULL if not in table, otherwise a reference counted copy of the entry

◆ pit_ReceiveInterest()

PITVerdict pit_ReceiveInterest ( PIT pit,
Message *  interestMessage 
)

@function pit_ReceiveInterest @abstract Receives an interest and adds to PIT table @discussion If not present, adds entry to the PIT table and returns PIT_VERDICT_NEW_ENTRY. If present and aggregated, returns PIT_VERDICT_EXISTING_ENTRY.

Some aggregated interests may return PIT_VERDICT_NEW_ENTRY if the interest needs to be forwarded again (e.g. the lifetime is extended).

If the PIT stores the message in its table, it will store a reference counted copy.

Returns
Verdict of receiving the interest

◆ pit_Release()

void pit_Release ( PIT **  pitPtr)

Destroys the PIT table and all entries contained in it.

PIT entries are reference counted, so if the user has stored one outside the PIT table it will still be valid.

Parameters
[in,out]pitPtrDouble pointer to PIT table, will be NULLed

◆ pit_RemoveInterest()

void pit_RemoveInterest ( PIT pit,
const Message *  interestMessage 
)

@function pit_RemoveInterest @abstract Unconditionally remove the interest from the PIT @discussion The PIT may store a specific name in several tables. This function will remove the interest from the specific table it lives it. It will not remove PIT entries in different tables with the same name.

The different tables index interests based on their matching criteria, such as by name, by name and keyid, etc.

◆ pit_SatisfyInterest()

NumberSet* pit_SatisfyInterest ( PIT pit,
const Message *  objectMessage 
)

@function pit_SatisfyInterest @abstract Tries to satisfy PIT entries based on the message, returning where to send message @discussion If matching interests are in the PIT, will return the set of reverse paths to use to forward the content object.

The return value is allocated and must be destroyed.
Returns
Set of ConnectionTable id's to forward the message, may be empty or NULL. Must be destroyed.