NDN-DPDK
High-Speed Named Data Networking Forwarder
|
#include "tlv-decoder.h"
Functions | |
void | TlvDecoder_Truncate (TlvDecoder *d) |
Truncate mbuf to the remaining bytes. More... | |
void | TlvDecoder_Copy_ (TlvDecoder *d, uint8_t *output, uint16_t count) |
struct rte_mbuf * | TlvDecoder_Clone (TlvDecoder *d, uint32_t count, struct rte_mempool *indirectMp) |
Clone next count octets to indirect mbufs. More... | |
void | TlvDecoder_Fragment (TlvDecoder *d, uint32_t count, struct rte_mbuf *frames[], uint32_t *fragIndex, uint32_t fragCount, uint16_t fragSize, uint16_t headroom) |
Copy next count octets to fragments. More... | |
const uint8_t * | TlvDecoder_Linearize_NonContiguous_ (TlvDecoder *d, uint16_t count) |
struct rte_mbuf* TlvDecoder_Clone | ( | TlvDecoder * | d, |
uint32_t | count, | ||
struct rte_mempool * | indirectMp | ||
) |
Clone next count
octets to indirect mbufs.
NULL | allocation failure. |
count
remaining octets. count
octets. void TlvDecoder_Copy_ | ( | TlvDecoder * | d, |
uint8_t * | output, | ||
uint16_t | count | ||
) |
void TlvDecoder_Fragment | ( | TlvDecoder * | d, |
uint32_t | count, | ||
struct rte_mbuf * | frames[], | ||
uint32_t * | fragIndex, | ||
uint32_t | fragCount, | ||
uint16_t | fragSize, | ||
uint16_t | headroom | ||
) |
Copy next count
octets to fragments.
frames | vector of fragments. They should not be chained. | |
[in,out] | fragIndex | pointer to first FragIndex, updated as last FragIndex. |
fragCount | correctly calculated FragCount. | |
fragSize | maximum fragment payload size. | |
headroom | headroom for subsequent fragments. |
headroom+fragSize
dataroom. frames
[*fragIndex] has initialized headroom and may contain payload. headroom+fragSize
offset. const uint8_t* TlvDecoder_Linearize_NonContiguous_ | ( | TlvDecoder * | d, |
uint16_t | count | ||
) |
void TlvDecoder_Truncate | ( | TlvDecoder * | d | ) |
Truncate mbuf to the remaining bytes.
d | decoder. It shall have a uniquely owned, possibly segmented, direct mbuf. Its remaining length shall be non-zero. |
d
cannot be further used.