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

The embodiment of a PIT entry. More...

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

Go to the source code of this file.

Typedefs

typedef struct pit_entry PitEntry
 

Functions

PitEntry * pitEntry_Create (Message *message, Ticks expiryTime, Ticks CreationTime)
 
void pitEntry_Release (PitEntry **pitEntryPtr)
 
PitEntry * pitEntry_Acquire (PitEntry *original)
 
void pitEntry_AddIngressId (PitEntry *pitEntry, unsigned ingressId)
 
void pitEntry_AddEgressId (PitEntry *pitEntry, unsigned egressId)
 
void pitEntry_AddFibEntry (PitEntry *pitEntry, FibEntry *fibEntry)
 
FibEntry * pitEntry_GetFibEntry (PitEntry *pitEntry)
 
const NumberSet * pitEntry_GetIngressSet (const PitEntry *pitEntry)
 
const NumberSet * pitEntry_GetEgressSet (const PitEntry *pitEntry)
 
Message * pitEntry_GetMessage (const PitEntry *pitEntry)
 
Ticks pitEntry_GetExpiryTime (const PitEntry *pitEntry)
 
Ticks pitEntry_GetCreationTime (const PitEntry *pitEntry)
 
void pitEntry_SetExpiryTime (PitEntry *pitEntry, Ticks expiryTime)
 

Detailed Description

The embodiment of a PIT entry.

Embodies a PIT entry

Function Documentation

◆ pitEntry_Acquire()

PitEntry* pitEntry_Acquire ( PitEntry *  original)

@function pitEntry_Acquire @abstract Returns a reference counted copy @discussion A reference counted copy that shares the same state as the original. Caller must use pitEntry_Release() on it when done.

Returns
A reference counted copy, use Destroy on it.

◆ pitEntry_AddEgressId()

void pitEntry_AddEgressId ( PitEntry *  pitEntry,
unsigned  egressId 
)

@function pitEntry_AddEgressId @abstract Add an egress connection id to the list of attempted paths @discussion A PitEntry has two NumberSets. The first is the set of ingress ports, which make up the reverse path. The second is the set of egress ports, which make up its forward path.

This function tracks which forward paths we've tried for the interest.

Parameters
egressIdthe forwarded path

◆ pitEntry_AddIngressId()

void pitEntry_AddIngressId ( PitEntry *  pitEntry,
unsigned  ingressId 
)

@function pitEntry_AddIngressId @abstract Add an ingress connection id to the list of reverse paths @discussion A PitEntry has two NumberSets. The first is the set of ingress ports, which make up the reverse path. The second is the set of egress ports, which make up its forward path.

This function tracks which reverse paths have sent us the interest.

Parameters
ingressIdthe reverse path

◆ pitEntry_Create()

PitEntry* pitEntry_Create ( Message *  message,
Ticks  expiryTime,
Ticks  CreationTime 
)

@function pitEntry_Create @abstract Takes ownership of the message inside the PitEntry @discussion When the PIT entry is destroyed, will call message_Release() on the message.

◆ pitEntry_GetEgressSet()

const NumberSet* pitEntry_GetEgressSet ( const PitEntry *  pitEntry)

@function pitEntry_GetEgressSet @abstract The Egress connection id set @discussion You must acquire a copy of the number set if you will store the result. This is the internal reference.

Parameters
<param1::>
Returns
May be empty, will not be null. Must be destroyed.

◆ pitEntry_GetExpiryTime()

Ticks pitEntry_GetExpiryTime ( const PitEntry *  pitEntry)

Returns the time (in ticks) at which the PIT entry is no longer valid

The ExpiryTime is computed when the PIT entry is added (or via pitEntry_SetExpiryTime). It is the aboslute time (in Ticks) at which the Pit entry is no longer valid.

Parameters
[in]PitEntryAn allocated PIT entry
Return values
numberThe abosolute time (in Ticks) of the Expiry

◆ pitEntry_GetIngressSet()

const NumberSet* pitEntry_GetIngressSet ( const PitEntry *  pitEntry)

@function pitEntry_GetIngressSet @abstract The Ingress connection id set @discussion You must acquire a copy of the number set if you will store the result. This is the internal reference.

Returns
May be empty, will not be null. Must be destroyed.

◆ pitEntry_GetMessage()

Message* pitEntry_GetMessage ( const PitEntry *  pitEntry)

@function pitEntry_GetMessage @abstract Gets the interest underpinning the PIT entry @discussion A reference counted copy, call Message_Release() on it.

Returns
A reference counted copy, call Message_Release() on it.

◆ pitEntry_Release()

void pitEntry_Release ( PitEntry **  pitEntryPtr)

Release a previously acquired reference to the specified instance, decrementing the reference count for the instance.

The pointer to the instance is set to NULL as a side-effect of this function.

If the invocation causes the last reference to the instance to be released, the instance is deallocated and the instance's implementation will perform additional cleanup and release other privately held references.

Parameters
[in,out]pitEntryPtrA pointer to a PitEntry instance pointer, which will be set to zero on return.

◆ pitEntry_SetExpiryTime()

void pitEntry_SetExpiryTime ( PitEntry *  pitEntry,
Ticks  expiryTime 
)

Sets the ExpriyTime of the PIT entry to the given value

It is probalby an error to set the expiryTime to a smaller value than currently set to, but this is not enforced. PIT entries use lazy delete.

Parameters
[in]pitEntryThe allocated PIT entry to modify
[in]expiryTimeThe new expiryTime (UTC in forwarder Ticks)