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 Public Member Functions | |
static ndn_Error | encodeName (const NameLite &name, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
Encode name as NDN-TLV. More... | |
static ndn_Error | decodeName (NameLite &name, const uint8_t *input, size_t inputLength, size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset) |
Decode input as a name in NDN-TLV and set the fields of the name object. More... | |
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... | |
static ndn_Error | encodeControlParameters (const ControlParametersLite &controlParameters, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
Encode controlParameters as an NDN-TLV ControlParameters. More... | |
static ndn_Error | decodeControlParameters (ControlParametersLite &controlParameters, const uint8_t *input, size_t inputLength) |
Decode input as a TLV ControlParameters and set the fields in the controlParameters object. More... | |
static ndn_Error | encodeControlResponse (const ControlResponseLite &controlResponse, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
Encode controlResponse as an NDN-TLV ControlResponse. More... | |
static ndn_Error | decodeControlResponse (ControlResponseLite &controlResponse, const uint8_t *input, size_t inputLength) |
Decode input as a TLV ControlResponse and set the fields in the controlResponse object. More... | |
static ndn_Error | encodeSignatureInfo (const SignatureLite &signature, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
Encode signature as an NDN-TLV SignatureInfo. More... | |
static ndn_Error | encodeSignatureValue (const SignatureLite &signature, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
Encode the signatureValue in the Signature object as an NDN-TLV SignatureValue (the signature bits). More... | |
static ndn_Error | decodeSignatureInfoAndValue (SignatureLite &signature, const uint8_t *signatureInfo, size_t signatureInfoLength, const uint8_t *signatureValue, size_t signatureValueLength) |
Decode signatureInfo as an NDN-TLV signature info and signatureValue as the related SignatureValue, and set the fields in the signature object. More... | |
static ndn_Error | decodeLpPacket (LpPacketLite &lpPacket, const uint8_t *input, size_t inputLength) |
Decode input as a TLV LpPacket and set the fields in the lpPacket object. More... | |
static ndn_Error | encodeDelegationSet_Delegation (const DelegationSetLite::Delegation &delegation, DynamicUInt8ArrayLite &output, size_t offset, size_t *encodingLength) |
Encode delegation as an NDN-TLV Delegation. More... | |
static ndn_Error | decodeDelegationSet_Delegation (DelegationSetLite::Delegation &delegation, const uint8_t *input, size_t inputLength, size_t *encodingLength) |
Decode input as an NDN-TLV Delegation and set the fields in the delegation object. More... | |
static ndn_Error | encodeEncryptedContent (const EncryptedContentLite &encryptedContent, DynamicUInt8ArrayLite &output, size_t *encodingLength) |
Encode encryptedContent as an NDN-TLV EncryptedContent. More... | |
static ndn_Error | decodeEncryptedContent (EncryptedContentLite &encryptedContent, const uint8_t *input, size_t inputLength) |
Decode input as a TLV EncryptedContent and set the fields in the encrypted content object. More... | |
A Tlv0_1_1WireFormatLite implements implement encoding and decoding using NDN-TLV version 0.1.1.
|
static |
Decode input as a TLV ControlParameters and set the fields in the controlParameters object.
controlParameters | The control parameters object whose fields are updated. |
input | A pointer to the input buffer to decode. |
inputLength | The number of bytes in input. |
|
static |
Decode input as a TLV ControlResponse and set the fields in the controlResponse object.
controlResponse | The control parameters object whose fields are updated. |
input | A pointer to the input buffer to decode. |
inputLength | The number of bytes in input. |
|
static |
Decode input as a data packet in NDN-TLV and set the fields in the data object.
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. |
|
static |
Decode input as an NDN-TLV Delegation and set the fields in the delegation object.
delegation | The delegation object whose fields are updated. |
input | A pointer to the input buffer to decode. |
inputLength | The number of bytes in input. |
encodingLength | Set encodingLength to the length of the decoded value. This is provided so that a DelegationSet can be decoded as as series of Delegation. |
|
static |
Decode input as a TLV EncryptedContent and set the fields in the encrypted content object.
encryptedContent | The encrypted content object whose fields are updated. |
input | A pointer to the input buffer to decode. |
inputLength | The number of bytes in input. |
|
static |
Decode input as an interest in NDN-TLV and set the fields of the interest object.
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). |
|
static |
Decode input as a TLV LpPacket and set the fields in the lpPacket object.
lpPacket | The LpPacketLite object whose fields are updated. |
input | A pointer to the input buffer to decode. |
inputLength | The number of bytes in input. |
|
static |
Decode input as a name in NDN-TLV and set the fields of the name object.
name | The name 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). |
|
static |
Decode signatureInfo as an NDN-TLV signature info and signatureValue as the related SignatureValue, and set the fields in the signature object.
signature | The signature object whose fields are updated. |
signatureInfo | A pointer to the signature info input buffer to decode. |
signatureInfoLength | The number of bytes in signatureInfo. |
signatureValue | A pointer to the signature value input buffer to decode. |
signatureValueLength | The number of bytes in signatureValue. |
|
static |
Encode controlParameters as an NDN-TLV ControlParameters.
controlParameters | The control parameters object to encode. |
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. |
|
static |
Encode controlResponse as an NDN-TLV ControlResponse.
controlResponse | The control parameters object to encode. |
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. |
|
static |
Encode the data packet as NDN-TLV.
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. |
|
static |
Encode delegation as an NDN-TLV Delegation.
delegation | The delegation object to encode. |
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. |
offset | The offset into the output buffer to begin encoding. This is provided so that a DelegationSet can be encoded as as series of Delegation. |
encodingLength | Set encodingLength to the length of the encoded output, starting from offset. |
|
static |
Encode encryptedContent as an NDN-TLV EncryptedContent.
encryptedContent | The encrypted content object to encode. |
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. |
|
static |
Encode interest as NDN-TLV.
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. |
|
static |
Encode name as NDN-TLV.
name | The name 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. |
|
static |
Encode signature as an NDN-TLV SignatureInfo.
signature | The signature object to encode. |
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. |
|
static |
Encode the signatureValue in the Signature object as an NDN-TLV SignatureValue (the signature bits).
signature | The signature object with the signature bits. |
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. |