NDN-DPDK
High-Speed Named Data Networking Forwarder
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Typedefs | Functions
interest.c File Reference
#include "interest.h"
#include "packet.h"
#include "tlv-decoder.h"
#include "tlv-encoder.h"

Data Structures

struct  GuiderFields
 

Typedefs

typedef struct GuiderFields GuiderFields
 

Functions

bool PInterest_Parse (PInterest *interest, struct rte_mbuf *pkt, ParseFor parseFor)
 Parse Interest. More...
 
bool PInterest_SelectFwHint (PInterest *interest, int i)
 Retrieve i-th forwarding hint name. More...
 
PacketInterest_ModifyGuiders (Packet *npkt, InterestGuiders guiders, PacketMempools *mp, PacketTxAlign align)
 Modify Interest guiders. More...
 
PacketInterestTemplate_Encode (const InterestTemplate *tpl, struct rte_mbuf *m, LName suffix, uint32_t nonce)
 Encode Interest with InterestTemplate. More...
 

Typedef Documentation

◆ GuiderFields

typedef struct GuiderFields GuiderFields

Function Documentation

◆ Interest_ModifyGuiders()

Packet* Interest_ModifyGuiders ( Packet npkt,
InterestGuiders  guiders,
PacketMempools mp,
PacketTxAlign  align 
)

Modify Interest guiders.

Parameters
[in]npktoriginal Interest packet.
Returns
cloned and modified Interest packet.
Return values
NULLallocation failure.

◆ InterestTemplate_Encode()

Packet* InterestTemplate_Encode ( const InterestTemplate tpl,
struct rte_mbuf *  m,
LName  suffix,
uint32_t  nonce 
)

Encode Interest with InterestTemplate.

Parameters
ma uniquely owned, unsegmented, direct, empty mbuf. It must have InterestTemplateDataroom buffer size.
Returns
encoded packet, converted from m .

◆ PInterest_Parse()

bool PInterest_Parse ( PInterest interest,
struct rte_mbuf *  pkt,
ParseFor  parseFor 
)

Parse Interest.

Parameters
pkta uniquely owned, possibly segmented, direct mbuf that contains Interest TLV.
parseForif set to ParseForApp , skip FwHints.
Returns
whether success.

◆ PInterest_SelectFwHint()

bool PInterest_SelectFwHint ( PInterest interest,
int  i 
)

Retrieve i-th forwarding hint name.

Returns
whether success.
Precondition
i >= 0 && i < interest->nFwHints
Postcondition
interest->activeFwHint == i
interest->fwHint reflects i-th forwarding hint.