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;
30 struct ndn_ControlResponse;
31 struct ndn_LpPacket;
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
57 ndn_Error
58 ndn_Tlv0_1_1WireFormat_encodeName
59  (const struct ndn_Name *name, size_t *signedPortionBeginOffset,
60  size_t *signedPortionEndOffset, struct ndn_DynamicUInt8Array *output,
61  size_t *encodingLength);
62 
79 ndn_Error
80 ndn_Tlv0_1_1WireFormat_decodeName
81  (struct ndn_Name *name, const uint8_t *input, size_t inputLength,
82  size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset);
83 
101 ndn_Error
102 ndn_Tlv0_1_1WireFormat_encodeInterest
103  (const struct ndn_Interest *interest, size_t *signedPortionBeginOffset,
104  size_t *signedPortionEndOffset, struct ndn_DynamicUInt8Array *output,
105  size_t *encodingLength);
106 
123 ndn_Error
124 ndn_Tlv0_1_1WireFormat_decodeInterest
125  (struct ndn_Interest *interest, const uint8_t *input, size_t inputLength,
126  size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset);
127 
143 ndn_Error
144 ndn_Tlv0_1_1WireFormat_encodeData
145  (const struct ndn_Data *data, size_t *signedPortionBeginOffset,
146  size_t *signedPortionEndOffset, struct ndn_DynamicUInt8Array *output,
147  size_t *encodingLength);
148 
162 ndn_Error
163 ndn_Tlv0_1_1WireFormat_decodeData
164  (struct ndn_Data *data, const uint8_t *input, size_t inputLength,
165  size_t *signedPortionBeginOffset, size_t *signedPortionEndOffset);
166 
176 ndn_Error
177 ndn_Tlv0_1_1WireFormat_encodeControlParameters
178  (const struct ndn_ControlParameters *controlParameters,
179  struct ndn_DynamicUInt8Array *output, size_t *encodingLength);
180 
190 ndn_Error
191 ndn_Tlv0_1_1WireFormat_decodeControlParameters
192  (struct ndn_ControlParameters *controlParameters, const uint8_t *input,
193  size_t inputLength);
194 
204 ndn_Error
205 ndn_Tlv0_1_1WireFormat_encodeControlResponse
206  (const struct ndn_ControlResponse *controlResponse,
207  struct ndn_DynamicUInt8Array *output, size_t *encodingLength);
208 
218 ndn_Error
219 ndn_Tlv0_1_1WireFormat_decodeControlResponse
220  (struct ndn_ControlResponse *controlResponse, const uint8_t *input,
221  size_t inputLength);
222 
232 ndn_Error
233 ndn_Tlv0_1_1WireFormat_encodeSignatureInfo
234  (const struct ndn_Signature *signature, struct ndn_DynamicUInt8Array *output,
235  size_t *encodingLength);
236 
247 ndn_Error
248 ndn_Tlv0_1_1WireFormat_encodeSignatureValue
249  (const struct ndn_Signature *signature, struct ndn_DynamicUInt8Array *output,
250  size_t *encodingLength);
251 
262 ndn_Error
263 ndn_Tlv0_1_1WireFormat_decodeSignatureInfoAndValue
264  (struct ndn_Signature *signature, const uint8_t *signatureInfo,
265  size_t signatureInfoLength, const uint8_t *signatureValue,
266  size_t signatureValueLength);
267 
275 ndn_Error
276 ndn_Tlv0_1_1WireFormat_decodeLpPacket
277  (struct ndn_LpPacket *lpPacket, const uint8_t *input, size_t inputLength);
278 
291 ndn_Error
292 ndn_Tlv0_1_1WireFormat_encodeDelegationSet_Delegation
293  (const struct ndn_DelegationSet_Delegation *delegation,
294  struct ndn_DynamicUInt8Array *output, size_t offset, size_t *encodingLength);
295 
307 ndn_Error
308 ndn_Tlv0_1_1WireFormat_decodeDelegationSet_Delegation
309  (struct ndn_DelegationSet_Delegation *delegation, const uint8_t *input,
310  size_t inputLength, size_t *encodingLength);
311 
322 ndn_Error
323 ndn_Tlv0_1_1WireFormat_encodeEncryptedContent
324  (const struct ndn_EncryptedContent *encryptedContent,
325  struct ndn_DynamicUInt8Array *output, size_t *encodingLength);
326 
336 ndn_Error
337 ndn_Tlv0_1_1WireFormat_decodeEncryptedContent
338  (struct ndn_EncryptedContent *encryptedContent, const uint8_t *input,
339  size_t inputLength);
340 
341 #ifdef __cplusplus
342 }
343 #endif
344 
345 #endif
Copyright (C) 2016 Regents of the University of California.
Definition: control-response-types.h:35
An ndn_LpPacket holds a list of LP packet header fields and an optional fragment wire encoding...
Definition: lp-packet-types.h:57
Definition: data-types.h:78
Copyright (C) 2016 Regents of the University of California.
Definition: encrypted-content-types.h:37
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
Copyright (C) 2016 Regents of the University of California.
Definition: delegation-set-types.h:33
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:59