tlv-0_1_1-wire-format.h
1 
21 #ifndef NDN_TLV_0_1_1_WIRE_FORMAT_H
22 #define NDN_TLV_0_1_1_WIRE_FORMAT_H
23 
24 #include <ndn-cpp/c/common.h>
25 #include <ndn-cpp/c/errors.h>
26 
27 struct ndn_Interest;
28 struct ndn_Data;
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
53 ndn_Error
54 ndn_Tlv0_1_1WireFormat_encodeName
55  (const struct ndn_Name *name, size_t *signedPortionBeginOffset,
56  size_t *signedPortionEndOffset, struct ndn_DynamicUInt8Array *output,
57  size_t *encodingLength);
58 
75 ndn_Error
76 ndn_Tlv0_1_1WireFormat_decodeName
77  (struct ndn_Name *name, const uint8_t *input, size_t inputLength,
78  size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset);
79 
97 ndn_Error
98 ndn_Tlv0_1_1WireFormat_encodeInterest
99  (const struct ndn_Interest *interest, size_t *signedPortionBeginOffset,
100  size_t *signedPortionEndOffset, struct ndn_DynamicUInt8Array *output,
101  size_t *encodingLength);
102 
119 ndn_Error
120 ndn_Tlv0_1_1WireFormat_decodeInterest
121  (struct ndn_Interest *interest, const uint8_t *input, size_t inputLength,
122  size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset);
123 
139 ndn_Error
140 ndn_Tlv0_1_1WireFormat_encodeData
141  (const struct ndn_Data *data, size_t *signedPortionBeginOffset,
142  size_t *signedPortionEndOffset, struct ndn_DynamicUInt8Array *output,
143  size_t *encodingLength);
144 
158 ndn_Error
159 ndn_Tlv0_1_1WireFormat_decodeData
160  (struct ndn_Data *data, const uint8_t *input, size_t inputLength,
161  size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset);
162 
172 ndn_Error
173 ndn_Tlv0_1_1WireFormat_encodeControlParameters
174  (const struct ndn_ControlParameters *controlParameters,
175  struct ndn_DynamicUInt8Array *output, size_t *encodingLength);
176 
186 ndn_Error
187 ndn_Tlv0_1_1WireFormat_decodeControlParameters
188  (struct ndn_ControlParameters *controlParameters, const uint8_t *input,
189  size_t inputLength);
190 
200 ndn_Error
201 ndn_Tlv0_1_1WireFormat_encodeSignatureInfo
202  (const struct ndn_Signature *signature, struct ndn_DynamicUInt8Array *output,
203  size_t *encodingLength);
204 
215 ndn_Error
216 ndn_Tlv0_1_1WireFormat_encodeSignatureValue
217  (const struct ndn_Signature *signature, struct ndn_DynamicUInt8Array *output,
218  size_t *encodingLength);
219 
230 ndn_Error
231 ndn_Tlv0_1_1WireFormat_decodeSignatureInfoAndValue
232  (struct ndn_Signature *signature, const uint8_t *signatureInfo,
233  size_t signatureInfoLength, const uint8_t *signatureValue,
234  size_t signatureValueLength);
235 
236 #ifdef __cplusplus
237 }
238 #endif
239 
240 #endif
Definition: data-types.h:74
An ndn_Interest holds an ndn_Name and other fields for an interest.
Definition: interest-types.h:61
A struct ndn_DynamicUInt8Array holds a pointer to an allocated array, the length of the allocated arr...
Definition: dynamic-uint8-array-types.h:40
An ndn_Name holds an array of ndn_NameComponent.
Definition: name-types.h:40
An ndn_ControlParameters holds fields for a ControlParameters which is used in the command interest s...
Definition: control-parameters-types.h:42
An ndn_Signature struct holds the signature bits and other info representing the signature in a data ...
Definition: data-types.h:58