summaryrefslogtreecommitdiff
path: root/node/Utils.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-09 22:24:50 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-09 22:24:50 -0400
commit47f611e7b8d2ff95a3ff795574798b4e24a6719d (patch)
tree2fef0b0d92e9c0e30b2f1c71f87d6b0a55d33f6f /node/Utils.hpp
parentb14856da50c4814e3ca224d9e31a393108b9c7b9 (diff)
downloadinfinitytier-47f611e7b8d2ff95a3ff795574798b4e24a6719d.tar.gz
infinitytier-47f611e7b8d2ff95a3ff795574798b4e24a6719d.zip
Add bloom filter as separate code, work in progress factoring out multicast algorithm from the bloated Switch class.
Diffstat (limited to 'node/Utils.hpp')
-rw-r--r--node/Utils.hpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/node/Utils.hpp b/node/Utils.hpp
index 5cdf10de..4b7d6be8 100644
--- a/node/Utils.hpp
+++ b/node/Utils.hpp
@@ -461,38 +461,6 @@ public:
}
/**
- * Add a value to a bloom filter
- *
- * Note that bloom filter methods depend on n being evenly distributed, so
- * it's the job of the caller to implement any hashing.
- *
- * @param bits Bloom filter data (must be filterSize / 8 bytes in length)
- * @param filterSize Size of bloom filter in BITS
- * @param n Number to add
- */
- static inline void bloomAdd(void *bits,unsigned int filterSize,unsigned int n)
- throw()
- {
- n %= filterSize;
- ((unsigned char *)bits)[n / 8] |= (0x80 >> (n % 8));
- }
-
- /**
- * Test for a value in a bloom filter
- *
- * @param bits Bloom filter data (must be filterSize / 8 bytes in length)
- * @param filterSize Size of bloom filter in BITS
- * @param n Number to test
- * @return True if number might be in filter
- */
- static inline bool bloomContains(const void *bits,unsigned int filterSize,unsigned int n)
- throw()
- {
- n %= filterSize;
- return ((((const unsigned char *)bits)[n / 8] & (0x80 >> (n % 8))));
- }
-
- /**
* Compute CRC64
*
* @param crc Previous CRC (0 to start)