NDN-DPDK
High-Speed Named Data Networking Forwarder
Loading...
Searching...
No Matches
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 __rte_packed_begin GuiderFields GuiderFields

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.

Typedef Documentation

◆ GuiderFields

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