common.h
1 
21 #ifndef NDN_COMMON_H
22 #define NDN_COMMON_H
23 
24 #include "../ndn-cpp-config.h"
25 #include <stdint.h>
26 #include <stddef.h>
27 
28 #if NDN_CPP_HAVE_ATTRIBUTE_DEPRECATED
29  #define DEPRECATED_IN_NDN_CPP __attribute__((deprecated))
30 #else
31  #define DEPRECATED_IN_NDN_CPP
32 #endif
33 
34 #if !NDN_CPP_HAVE_ROUND
35 #define round(x) floor((x) + 0.5)
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
45 typedef double ndn_Milliseconds;
46 
50 typedef double ndn_MillisecondsSince1970;
51 
57 ndn_MillisecondsSince1970
58 ndn_getNowMilliseconds();
59 
67 static const size_t MAX_NDN_PACKET_SIZE = 8800;
68 
73 static const size_t ndn_SHA256_DIGEST_SIZE = 32;
74 
79 static const size_t ndn_AES_128_BLOCK_SIZE = 16;
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif