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

Go to the source code of this file.

Data Structures

struct  PInterest
 Parsed Interest packet. More...
 
struct  InterestGuiders
 Interest guider fields. More...
 
struct  InterestTemplate
 Template for Interest encoding. More...
 

Macros

#define PRI_InterestGuiders   "nonce=%08" PRIx32 " lifetime=%" PRIu32 " hopLimit=%" PRIu8
 printf format string for InterestGuiders. More...
 
#define InterestGuiders_Fmt(g)   (g).nonce, (g).lifetime, (g).hopLimit
 printf arguments for InterestGuiders. More...
 

Typedefs

typedef struct PInterest PInterest
 Parsed Interest packet. More...
 
typedef struct InterestGuiders InterestGuiders
 Interest guider fields. More...
 
typedef struct InterestTemplate InterestTemplate
 Template for Interest encoding. More...
 

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

Macro Definition Documentation

◆ InterestGuiders_Fmt

#define InterestGuiders_Fmt (   g)    (g).nonce, (g).lifetime, (g).hopLimit

printf arguments for InterestGuiders.

Parameters
gInterestGuiders instance.

◆ PRI_InterestGuiders

#define PRI_InterestGuiders   "nonce=%08" PRIx32 " lifetime=%" PRIu32 " hopLimit=%" PRIu8

printf format string for InterestGuiders.

printf("mbuf=%p " PRI_InterestGuiders " suffix", mbuf, InterestGuiders_Fmt(guiders));
#define InterestGuiders_Fmt(g)
printf arguments for InterestGuiders.
Definition: interest.h:71
#define PRI_InterestGuiders
printf format string for InterestGuiders.
Definition: interest.h:65

Typedef Documentation

◆ InterestGuiders

Interest guider fields.

◆ InterestTemplate

Template for Interest encoding.

◆ PInterest

typedef struct PInterest PInterest

Parsed Interest packet.

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.