31 #ifdef CONF_REDUNDANCE_SIZE
32 #define REDUNDANCE_SIZE CONF_REDUNDANCE_SIZE
34 #define REDUNDANCE_SIZE 128
40 #ifdef CONF_REDUNDANCE_NUMBER
41 #define REDUNDANCE_NUMBER CONF_REDUNDANCE_NUMBER
43 #define REDUNDANCE_NUMBER 2
49 #ifdef CONF_REDUNDANCE_LIMIT
50 #define REDUNDANCE_LIMIT CONF_REDUNDANCE_LIMIT
52 #define REDUNDANCE_LIMIT 100
55 #define REDUNDANCE_PER_FILTER ((REDUNDANCE_SIZE / REDUNDANCE_NUMBER) * 8)
100 char * bloomfilter =
NULL;
102 bit = bit % REDUNDANCE_PER_FILTER;
113 if( bloomfilter ==
NULL ) {
118 *(bloomfilter + offset) |= 1 << bit;
129 char * bloomfilter =
NULL;
131 bit = bit % REDUNDANCE_PER_FILTER;
142 if( bloomfilter ==
NULL ) {
146 if( *(bloomfilter + offset) & (1 << bit) ) {
173 hash1 = (bundle_number & 0x0000FFFF) >> 0;
174 hash2 = (bundle_number & 0xFFFF0000) >> 16;
198 hash1 = (bundle_number & 0x0000FFFF) >> 0;
199 hash2 = (bundle_number & 0xFFFF0000) >> 16;
223 LOG(LOGD_DTN, LOG_AGENT, LOGL_DBG,
"REDUNDANCE: starting");
232 "REDUNDANCE_BLOOMFILTER",