NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
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.
#define InterestGuiders_Fmt(g)
 printf arguments for InterestGuiders.

Typedefs

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

Functions

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

Macro Definition Documentation

◆ InterestGuiders_Fmt

#define InterestGuiders_Fmt ( g)
Value:
(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

typedef struct InterestGuiders InterestGuiders

Interest guider fields.

◆ InterestTemplate

typedef struct InterestTemplate InterestTemplate

Template for Interest encoding.

◆ PInterest

typedef struct __rte_packed_begin 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.