A Tlv0_1_1WireFormatLite implements implement encoding and decoding using NDN-TLV version 0.1.1.
More...
#include <tlv-0_1_1-wire-format-lite.hpp>
|
| static ndn_Error | encodeInterest (const InterestLite &interest, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
| | Encode interest as NDN-TLV. More...
|
| |
| static ndn_Error | decodeInterest (InterestLite &interest, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
| | Decode input as an interest in NDN-TLV and set the fields of the interest object. More...
|
| |
| static ndn_Error | encodeData (const DataLite &data, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
| | Encode the data packet as NDN-TLV. More...
|
| |
| static ndn_Error | decodeData (DataLite &data, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
| | Decode input as a data packet in NDN-TLV and set the fields in the data object. More...
|
| |
A Tlv0_1_1WireFormatLite implements implement encoding and decoding using NDN-TLV version 0.1.1.
| ndn_Error ndn::Tlv0_1_1WireFormatLite::decodeData |
( |
DataLite & |
data, |
|
|
const uint8_t * |
input, |
|
|
size_t |
inputLength, |
|
|
size_t * |
signedPortionBeginOffset, |
|
|
size_t * |
signedPortionEndOffset |
|
) |
| |
|
static |
Decode input as a data packet in NDN-TLV and set the fields in the data object.
- Parameters
-
| data | The data object whose fields are updated. |
| input | A pointer to the input buffer to decode. |
| inputLength | The number of bytes in input. |
| signedPortionBeginOffset | Return the offset in the input buffer of the beginning of the signed portion. If you are not decoding in order to verify, you can ignore this returned value. |
| signedPortionEndOffset | Return the offset in the input buffer of the end of the signed portion. If you are not decoding in order to verify, you can ignore this returned value. |
- Returns
- 0 for success, else an error code.
| ndn_Error ndn::Tlv0_1_1WireFormatLite::decodeInterest |
( |
InterestLite & |
interest, |
|
|
const uint8_t * |
input, |
|
|
size_t |
inputLength, |
|
|
size_t * |
signedPortionBeginOffset, |
|
|
size_t * |
signedPortionEndOffset |
|
) |
| |
|
static |
Decode input as an interest in NDN-TLV and set the fields of the interest object.
- Parameters
-
| interest | The Interest object whose fields are updated. |
| input | A pointer to the input buffer to decode. |
| inputLength | The number of bytes in input. |
| signedPortionBeginOffset | Return the offset in the encoding of the beginning of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). |
| signedPortionEndOffset | Return the offset in the encoding of the end of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). |
- Returns
- 0 for success, else an error code.
| ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeData |
( |
const DataLite & |
data, |
|
|
size_t * |
signedPortionBeginOffset, |
|
|
size_t * |
signedPortionEndOffset, |
|
|
DynamicUInt8ArrayLite & |
output, |
|
|
size_t * |
encodingLength |
|
) |
| |
|
static |
Encode the data packet as NDN-TLV.
- Parameters
-
| data | The data object to encode. |
| signedPortionBeginOffset | Return the offset in the encoding of the beginning of the signed portion. If you are not encoding in order to sign, you can ignore this returned value. |
| signedPortionEndOffset | Return the offset in the encoding of the end of the signed portion. If you are not encoding in order to sign, you can ignore this returned value. |
| output | A DynamicUInt8ArrayLite object which receives the encoded output. If the output's reallocFunction is null, its array must be large enough to receive the entire encoding. |
| encodingLength | Set encodingLength to the length of the encoded output. |
- Returns
- 0 for success, else an error code.
| ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeInterest |
( |
const InterestLite & |
interest, |
|
|
size_t * |
signedPortionBeginOffset, |
|
|
size_t * |
signedPortionEndOffset, |
|
|
DynamicUInt8ArrayLite & |
output, |
|
|
size_t * |
encodingLength |
|
) |
| |
|
static |
Encode interest as NDN-TLV.
- Parameters
-
| interest | The interest object to encode. |
| signedPortionBeginOffset | Return the offset in the encoding of the beginning of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). |
| signedPortionEndOffset | Return the offset in the encoding of the end of the signed portion. The signed portion starts from the first name component and ends just before the final name component (which is assumed to be a signature for a signed interest). |
| output | A DynamicUInt8ArrayLite object which receives the encoded output. If the output's reallocFunction is null, its array must be large enough to receive the entire encoding. |
| encodingLength | Set encodingLength to the length of the encoded output. |
- Returns
- 0 for success, else an error code.
The documentation for this class was generated from the following files: