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 
58 ndn_MillisecondsSince1970
59 ndn_getNowMilliseconds();
60 
68 static const size_t MAX_NDN_PACKET_SIZE = 8800;
69 
74 static const size_t ndn_SHA256_DIGEST_SIZE = 32;
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif