Static Public Member Functions | List of all members
ndn::Tlv0_1_1WireFormatLite Class Reference

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...
 

Detailed Description

A Tlv0_1_1WireFormatLite implements implement encoding and decoding using NDN-TLV version 0.1.1.

Member Function Documentation

ndn_Error ndn::Tlv0_1_1WireFormatLite::decodeControlParameters ( ControlParametersLite controlParameters,
const uint8_t *  input,
size_t  inputLength 
)
static

Decode input as a TLV ControlParameters and set the fields in the controlParameters object.

Parameters
controlParametersThe control parameters object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::decodeControlResponse ( ControlResponseLite controlResponse,
const uint8_t *  input,
size_t  inputLength 
)
static

Decode input as a TLV ControlResponse and set the fields in the controlResponse object.

Parameters
controlResponseThe control parameters object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
Returns
0 for success, else an error code.
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
dataThe data object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
signedPortionBeginOffsetReturn 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.
signedPortionEndOffsetReturn 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::decodeDelegationSet_Delegation ( DelegationSetLite::Delegation delegation,
const uint8_t *  input,
size_t  inputLength,
size_t *  encodingLength 
)
static

Decode input as an NDN-TLV Delegation and set the fields in the delegation object.

Parameters
delegationThe delegation object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
encodingLengthSet encodingLength to the length of the decoded value. This is provided so that a DelegationSet can be decoded as as series of Delegation.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::decodeEncryptedContent ( EncryptedContentLite encryptedContent,
const uint8_t *  input,
size_t  inputLength 
)
static

Decode input as a TLV EncryptedContent and set the fields in the encrypted content object.

Parameters
encryptedContentThe encrypted content object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
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
interestThe Interest object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
signedPortionBeginOffsetReturn 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).
signedPortionEndOffsetReturn 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::decodeLpPacket ( LpPacketLite lpPacket,
const uint8_t *  input,
size_t  inputLength 
)
static

Decode input as a TLV LpPacket and set the fields in the lpPacket object.

Parameters
lpPacketThe LpPacketLite object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::decodeName ( NameLite name,
const uint8_t *  input,
size_t  inputLength,
size_t *  signedPortionBeginOffset,
size_t *  signedPortionEndOffset 
)
static

Decode input as a name in NDN-TLV and set the fields of the name object.

Parameters
nameThe name object whose fields are updated.
inputA pointer to the input buffer to decode.
inputLengthThe number of bytes in input.
signedPortionBeginOffsetReturn 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).
signedPortionEndOffsetReturn 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::decodeSignatureInfoAndValue ( SignatureLite signature,
const uint8_t *  signatureInfo,
size_t  signatureInfoLength,
const uint8_t *  signatureValue,
size_t  signatureValueLength 
)
static

Decode signatureInfo as an NDN-TLV signature info and signatureValue as the related SignatureValue, and set the fields in the signature object.

Parameters
signatureThe signature object whose fields are updated.
signatureInfoA pointer to the signature info input buffer to decode.
signatureInfoLengthThe number of bytes in signatureInfo.
signatureValueA pointer to the signature value input buffer to decode.
signatureValueLengthThe number of bytes in signatureValue.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeControlParameters ( const ControlParametersLite controlParameters,
DynamicUInt8ArrayLite output,
size_t *  encodingLength 
)
static

Encode controlParameters as an NDN-TLV ControlParameters.

Parameters
controlParametersThe control parameters object to encode.
outputA 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.
encodingLengthSet encodingLength to the length of the encoded output.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeControlResponse ( const ControlResponseLite controlResponse,
DynamicUInt8ArrayLite output,
size_t *  encodingLength 
)
static

Encode controlResponse as an NDN-TLV ControlResponse.

Parameters
controlResponseThe control parameters object to encode.
outputA 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.
encodingLengthSet encodingLength to the length of the encoded output.
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
dataThe data object to encode.
signedPortionBeginOffsetReturn 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.
signedPortionEndOffsetReturn 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.
outputA 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.
encodingLengthSet encodingLength to the length of the encoded output.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeDelegationSet_Delegation ( const DelegationSetLite::Delegation delegation,
DynamicUInt8ArrayLite output,
size_t  offset,
size_t *  encodingLength 
)
static

Encode delegation as an NDN-TLV Delegation.

Parameters
delegationThe delegation object to encode.
outputA 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.
offsetThe offset into the output buffer to begin encoding. This is provided so that a DelegationSet can be encoded as as series of Delegation.
encodingLengthSet encodingLength to the length of the encoded output, starting from offset.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeEncryptedContent ( const EncryptedContentLite encryptedContent,
DynamicUInt8ArrayLite output,
size_t *  encodingLength 
)
static

Encode encryptedContent as an NDN-TLV EncryptedContent.

Parameters
encryptedContentThe encrypted content object to encode.
outputA 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.
encodingLengthSet 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
interestThe interest object to encode.
signedPortionBeginOffsetReturn 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).
signedPortionEndOffsetReturn 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).
outputA 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.
encodingLengthSet encodingLength to the length of the encoded output.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeName ( const NameLite name,
size_t *  signedPortionBeginOffset,
size_t *  signedPortionEndOffset,
DynamicUInt8ArrayLite output,
size_t *  encodingLength 
)
static

Encode name as NDN-TLV.

Parameters
nameThe name object to encode.
signedPortionBeginOffsetReturn 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).
signedPortionEndOffsetReturn 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).
outputA 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.
encodingLengthSet encodingLength to the length of the encoded output.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeSignatureInfo ( const SignatureLite signature,
DynamicUInt8ArrayLite output,
size_t *  encodingLength 
)
static

Encode signature as an NDN-TLV SignatureInfo.

Parameters
signatureThe signature object to encode.
outputA 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.
encodingLengthSet encodingLength to the length of the encoded output.
Returns
0 for success, else an error code.
ndn_Error ndn::Tlv0_1_1WireFormatLite::encodeSignatureValue ( const SignatureLite signature,
DynamicUInt8ArrayLite output,
size_t *  encodingLength 
)
static

Encode the signatureValue in the Signature object as an NDN-TLV SignatureValue (the signature bits).

Parameters
signatureThe signature object with the signature bits.
outputA 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.
encodingLengthSet 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: