Go to the source code of this file.
|
bool | PData_Parse (PData *data, struct rte_mbuf *pkt, ParseFor parseFor) |
| Parse Data. More...
|
|
DataSatisfyResult | PData_CanSatisfy (PData *data, PInterest *interest) |
| Determine whether Data can satisfy Interest. More...
|
|
struct rte_crypto_op * | DataDigest_Prepare (CryptoQueuePair *cqp, Packet *npkt) |
| Prepare a crypto_op for Data digest computation. More...
|
|
uint16_t | DataDigest_Enqueue (CryptoQueuePair *cqp, struct rte_crypto_op **ops, uint16_t count) |
| Enqueue crypto_ops for Data digest computation. More...
|
|
bool | DataDigest_Finish (struct rte_crypto_op *op, Packet **npkt) |
| Finish Data digest computation. More...
|
|
void | DataEnc_PrepareMetaInfo (uint8_t *room, ContentType ct, uint32_t freshness, LName finalBlock) |
| Prepare Data MetaInfo. More...
|
|
struct rte_mbuf * | DataEnc_EncodeTpl (LName prefix, LName suffix, const uint8_t *meta, struct rte_mbuf *tplV, struct iovec *tplIov, int tplIovcnt, PacketMempools *mp, PacketTxAlign align) |
| Encode Data with Content from template. More...
|
|
struct rte_mbuf * | DataEnc_EncodeRoom (LName prefix, LName suffix, const uint8_t *meta, uint32_t roomL, struct iovec *roomIov, int *roomIovcnt, PacketMempools *mp, PacketTxAlign align) |
| Encode Data with unfilled Content room. More...
|
|
Packet * | DataEnc_Sign (struct rte_mbuf *pkt, PacketMempools *mp, PacketTxAlign align) |
| Append Null signature to Data. More...
|
|
◆ DataGen
Data encoder optimized for traffic generator.
◆ PData
◆ DataDigest_Enqueue()
uint16_t DataDigest_Enqueue |
( |
CryptoQueuePair * |
cqp, |
|
|
struct rte_crypto_op ** |
ops, |
|
|
uint16_t |
count |
|
) |
| |
Enqueue crypto_ops for Data digest computation.
- Returns
- number of rejected packets; they should be freed by caller.
◆ DataDigest_Finish()
bool DataDigest_Finish |
( |
struct rte_crypto_op * |
op, |
|
|
Packet ** |
npkt |
|
) |
| |
Finish Data digest computation.
- Parameters
-
| op | a dequeued crypto_op; will be freed. |
[out] | npkt | the Data packet; DataDigest releases ownership. |
- Returns
- whether success.
◆ DataDigest_Prepare()
Prepare a crypto_op for Data digest computation.
- Parameters
-
- Returns
- rte_crypto_op placed in PData.helperScratch.
◆ DataEnc_EncodeRoom()
struct rte_mbuf* DataEnc_EncodeRoom |
( |
LName |
prefix, |
|
|
LName |
suffix, |
|
|
const uint8_t * |
meta, |
|
|
uint32_t |
roomL, |
|
|
struct iovec * |
roomIov, |
|
|
int * |
roomIovcnt, |
|
|
PacketMempools * |
mp, |
|
|
PacketTxAlign |
align |
|
) |
| |
Encode Data with unfilled Content room.
- Parameters
-
| prefix | name prefix. |
| suffix | name suffix. |
| meta | prepared MetaInfo buffer. |
| roomL | Content TLV-LENGTH. |
[out] | roomIov | Content iov, must be filled/zeroed by caller. |
[out] | roomIovcnt | Content iov count. |
- Returns
- encoded packet, or NULL upon failure.
◆ DataEnc_EncodeTpl()
struct rte_mbuf* DataEnc_EncodeTpl |
( |
LName |
prefix, |
|
|
LName |
suffix, |
|
|
const uint8_t * |
meta, |
|
|
struct rte_mbuf * |
tplV, |
|
|
struct iovec * |
tplIov, |
|
|
int |
tplIovcnt, |
|
|
PacketMempools * |
mp, |
|
|
PacketTxAlign |
align |
|
) |
| |
Encode Data with Content from template.
- Parameters
-
prefix | name prefix. |
suffix | name suffix. |
meta | prepared MetaInfo buffer. |
tplV | Content template. |
tplIov | Content iov, must match tplV . |
- Returns
- encoded packet, or NULL upon failure.
◆ DataEnc_PrepareMetaInfo()
void DataEnc_PrepareMetaInfo |
( |
uint8_t * |
room, |
|
|
ContentType |
ct, |
|
|
uint32_t |
freshness, |
|
|
LName |
finalBlock |
|
) |
| |
Prepare Data MetaInfo.
- Parameters
-
room | output buffer; must have enough capacity. |
ct | ContentType numeric value. |
freshness | FreshnessPeriod numeric value. |
finalBlock | FinalBlockId TLV-VALUE. |
- Postcondition
room
contains MetaInfo TLV.
Required room
capacity is the sum of:
- MetaInfo TLV-TYPE and TLV-LENGTH, 2 octets
- ContentType TLV, 3 octets.
- FreshnessPeriod TLV, 6 octets.
- FinalBlockId TLV, 2 octets +
finalBlock.length
.
◆ DataEnc_Sign()
Append Null signature to Data.
- Parameters
-
pkt | result of DataEnc_EncodeTpl or DataEnc_EncodeRoom . |
- Returns
- encoded packet, or NUL upon failure.
- Postcondition
- If failure,
pkt
is freed.
◆ PData_CanSatisfy()
Determine whether Data can satisfy Interest.
◆ PData_Parse()
bool PData_Parse |
( |
PData * |
data, |
|
|
struct rte_mbuf * |
pkt, |
|
|
ParseFor |
parseFor |
|
) |
| |
Parse Data.
- Parameters
-
pkt | a uniquely owned, possibly segmented, direct mbuf that contains Data TLV. |
parseFor | if set to ParseForFw , skip FinalBlock and set data->isFinalBlock to false. |
- Returns
- whether success.
◆ DataEnc_NoMetaInfo
uint8_t DataEnc_NoMetaInfo[] |
|
extern |
Indicate that Data MetaInfo field should be omitted.