interest-types.h
1 
21 #ifndef NDN_INTEREST_TYPES_H
22 #define NDN_INTEREST_TYPES_H
23 
24 #include "name-types.h"
25 #include "publisher-public-key-digest-types.h"
26 #include "key-types.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 typedef enum {
33  ndn_Exclude_COMPONENT = 0,
34  ndn_Exclude_ANY = 1
35 } ndn_ExcludeType;
36 
41  ndn_ExcludeType type;
42  struct ndn_NameComponent component;
43 };
44 
48 struct ndn_Exclude {
50  size_t maxEntries;
51  size_t nEntries;
52 };
53 
54 enum {
55  ndn_Interest_CHILD_SELECTOR_LEFT = 0,
56  ndn_Interest_CHILD_SELECTOR_RIGHT = 1,
57 
58  ndn_Interest_ANSWER_NO_CONTENT_STORE = 0,
59  ndn_Interest_ANSWER_CONTENT_STORE = 1,
60  ndn_Interest_ANSWER_GENERATED = 2,
61  ndn_Interest_ANSWER_STALE = 4, // Stale answer OK
62  ndn_Interest_MARK_STALE = 16, // Must have scope 0. Michael calls this a "hack"
63 
64  ndn_Interest_DEFAULT_ANSWER_ORIGIN_KIND = ndn_Interest_ANSWER_CONTENT_STORE | ndn_Interest_ANSWER_GENERATED
65 };
66 
70 struct ndn_Interest {
71  struct ndn_Name name;
77  struct ndn_KeyLocator keyLocator;
78  struct ndn_Exclude exclude;
81  int scope;
82  ndn_Milliseconds interestLifetimeMilliseconds;
83  struct ndn_Blob nonce;
84 };
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif
An ndn_ExcludeEntry holds an ndn_ExcludeType, and if it is a COMPONENT, it holds a pointer to the com...
Definition: interest-types.h:40
size_t nEntries
the number of entries in the exclude, 0 for no exclude
Definition: interest-types.h:51
int childSelector
-1 for none
Definition: interest-types.h:79
struct ndn_Blob nonce
The blob whose value is a pointer to a pre-allocated buffer.
Definition: interest-types.h:83
ndn_Milliseconds interestLifetimeMilliseconds
-1.0 for none
Definition: interest-types.h:82
struct ndn_ExcludeEntry * entries
pointer to the array of entries.
Definition: interest-types.h:49
An ndn_Interest holds an ndn_Name and other fields for an interest.
Definition: interest-types.h:70
Copyright (C) 2015 Regents of the University of California.
Definition: publisher-public-key-digest-types.h:34
int scope
-1 for none
Definition: interest-types.h:81
struct ndn_PublisherPublicKeyDigest publisherPublicKeyDigest
Definition: interest-types.h:76
An ndn_KeyLocator holds the type of key locator and related data.
Definition: key-types.h:51
int minSuffixComponents
-1 for none
Definition: interest-types.h:72
An ndn_Exclude holds an array of ndn_ExcludeEntry.
Definition: interest-types.h:48
Copyright (C) 2015 Regents of the University of California.
Definition: name-types.h:33
An ndn_Name holds an array of ndn_NameComponent.
Definition: name-types.h:40
Copyright (C) 2015 Regents of the University of California.
Definition: blob-types.h:33
int answerOriginKind
-1 for none.
Definition: interest-types.h:80
size_t maxEntries
the number of elements in the allocated entries array
Definition: interest-types.h:50
int maxSuffixComponents
-1 for none
Definition: interest-types.h:73