All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
data-types.h
1 
21 #ifndef NDN_DATA_TYPES_H
22 #define NDN_DATA_TYPES_H
23 
24 #include "key-types.h"
25 #include "security/validity-period-types.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
39 typedef enum {
40  ndn_ContentType_BLOB = 0,
41  ndn_ContentType_LINK = 1,
42  ndn_ContentType_KEY = 2,
43  ndn_ContentType_NACK = 3,
44  ndn_ContentType_OTHER_CODE = 0x7fff
45 } ndn_ContentType;
46 
51 typedef enum {
52  ndn_SignatureType_DigestSha256Signature = 0,
53  ndn_SignatureType_Sha256WithRsaSignature = 1,
54  ndn_SignatureType_Sha256WithEcdsaSignature = 3,
55  ndn_SignatureType_HmacWithSha256Signature = 4,
56  ndn_SignatureType_Generic = 0x7fff
57 } ndn_SignatureType;
58 
66 struct ndn_Signature {
67  ndn_SignatureType type;
68  struct ndn_Blob signature;
75 };
76 
80 struct ndn_MetaInfo {
81  ndn_MillisecondsSince1970 timestampMilliseconds;
82  ndn_ContentType type;
83  int otherTypeCode;
84  ndn_Milliseconds freshnessPeriod;
86 };
87 
88 struct ndn_Data {
89  struct ndn_Signature signature;
90  struct ndn_Name name;
91  struct ndn_MetaInfo metaInfo;
92  struct ndn_Blob content;
93 };
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif
Copyright (C) 2016-2018 Regents of the University of California.
Definition: validity-period-types.h:34
struct ndn_ValidityPeriod validityPeriod
used with Sha256WithRsaSignature, Sha256WithEcdsaSignature
Definition: data-types.h:73
ndn_MillisecondsSince1970 timestampMilliseconds
milliseconds since 1/1/1970.
Definition: data-types.h:81
int genericTypeCode
used with Generic.
Definition: data-types.h:70
ndn_ContentType type
default is ndn_ContentType_BLOB.
Definition: data-types.h:82
Definition: data-types.h:88
struct ndn_Blob content
A Blob with a pointer to the content.
Definition: data-types.h:92
ndn_SignatureType type
-1 for unspecified
Definition: data-types.h:67
An ndn_KeyLocator holds the type of key locator and related data.
Definition: key-types.h:38
struct ndn_NameComponent finalBlockId
has a pointer to a pre-allocated buffer.
Definition: data-types.h:85
struct ndn_KeyLocator keyLocator
used with Sha256WithRsaSignature, Sha256WithEcdsaSignature, HmacWithSha256Signature ...
Definition: data-types.h:71
An ndn_NameComponent holds a pointer to the component value.
Definition: name-types.h:47
An ndn_MetaInfo struct holds the meta info which is signed inside the data packet.
Definition: data-types.h:80
An ndn_Name holds an array of ndn_NameComponent.
Definition: name-types.h:56
Copyright (C) 2015-2018 Regents of the University of California.
Definition: blob-types.h:33
ndn_Milliseconds freshnessPeriod
-1 for none
Definition: data-types.h:84
An ndn_Signature struct holds the signature bits and other info representing the signature in a data ...
Definition: data-types.h:66
struct ndn_Blob signatureInfoEncoding
used with Generic
Definition: data-types.h:69