9 #ifndef NDN_ENCODING_INTEREST_H 10 #define NDN_ENCODING_INTEREST_H 14 #include "../security/ndn-lite-crypto-key.h" 97 interest->
name = *name;
163 const uint8_t* params_value, uint32_t params_size)
197 const uint8_t* rhs_block_value, uint32_t rhs_block_size);
203 #endif // NDN_ENCODING_INTEREST_H uint8_t value[NDN_INTEREST_PARAMS_BUFFER_SIZE]
Definition: interest.h:24
The structure to represent an NDN Interest packet.
Definition: interest.h:31
struct interest_params interest_params_t
The structure to represent the Interest parameters element.
uint8_t hop_limit
The HopLimit of the Interest.
Definition: interest.h:57
static void ndn_interest_set_MustBeFresh(ndn_interest_t *interest, uint8_t must_be_fresh)
Set MustBeFresh flag of the Interest.
Definition: interest.h:137
The structure to represent the Name.
Definition: name.h:24
int ndn_interest_tlv_encode(ndn_encoder_t *encoder, ndn_interest_t *interest)
Encode the Interest into wire format (TLV block).
Definition: interest.c:142
uint8_t is_SignedInterest
Definition: interest.h:60
interest_params_t parameters
The Parameters of the Interest.
Definition: interest.h:51
static int ndn_interest_set_Parameters(ndn_interest_t *interest, const uint8_t *params_value, uint32_t params_size)
Set Parameters element of the Interest.
Definition: interest.h:162
The structure to represent the Signature.
Definition: signature.h:38
uint64_t lifetime
The lifetime of the Interest.
Definition: interest.h:43
#define NDN_DEFAULT_INTEREST_LIFETIME
Definition: ndn-constants.h:30
static void ndn_interest_init(ndn_interest_t *interest)
Init an Interest packet.
Definition: interest.h:74
int ndn_interest_name_compare_block(const uint8_t *lhs_block_value, uint32_t lhs_block_size, const uint8_t *rhs_block_value, uint32_t rhs_block_size)
Compare two encoded Interests' names.
Definition: interest.c:236
static void ndn_interest_from_name(ndn_interest_t *interest, const ndn_name_t *name)
Init an Interest packet from a.
Definition: interest.h:95
struct ndn_interest ndn_interest_t
The structure to represent an NDN Interest packet.
uint8_t enable_MustBeFresh
Definition: interest.h:46
uint32_t size
Definition: interest.h:25
static void ndn_interest_set_CanBePrefix(ndn_interest_t *interest, uint8_t can_be_prefix)
Set CanBePrefix flag of the Interest.
Definition: interest.h:126
ndn_signature_t signature
The signature structure.
Definition: interest.h:64
static void ndn_interest_set_HopLimit(ndn_interest_t *interest, uint8_t hop)
Set HopLimit element of the Interest.
Definition: interest.h:148
#define NDN_INTEREST_PARAMS_BUFFER_SIZE
Definition: ndn-constants.h:27
uint8_t enable_CanBePrefix
Definition: interest.h:45
uint8_t enable_HopLimit
Definition: interest.h:58
#define NDN_OVERSIZE
The object given is larger than expected.
Definition: ndn-error-code.h:33
The structure to keep the state when doing NDN TLV encoding.
Definition: encoder.h:31
The structure to represent the Interest parameters element.
Definition: interest.h:23
int ndn_interest_from_block(ndn_interest_t *interest, const uint8_t *block_value, uint32_t block_size)
Decode an Interest TLV block into an ndn_interest_t.
Definition: interest.c:51
uint8_t enable_Parameters
Definition: interest.h:52
ndn_name_t name
The name of the Interest.
Definition: interest.h:35
uint32_t nonce
The nonce of the Interest.
Definition: interest.h:39