On Sat, May 12, 2012 at 01:48:52 +0200, Sven Eckelmann wrote:
hash_ipv4 is only used in distributed-arp-table.c and therefore can be placed inside this file instead of the header.
Signed-off-by: Sven Eckelmann sven@narfation.org
distributed-arp-table.c | 24 +++++++++++++++++++++++- distributed-arp-table.h | 22 ---------------------- 2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/distributed-arp-table.c b/distributed-arp-table.c index e678ec4..4894a85 100644 --- a/distributed-arp-table.c +++ b/distributed-arp-table.c @@ -32,6 +32,28 @@ #include "translation-table.h" #include "unicast.h"
+/* hash function to choose an entry in a hash table of given size.
- hash algorithm from http://en.wikipedia.org/wiki/Hash_table
- */
+static uint32_t batadv_hash_ipv4(const void *data, uint32_t size)
since the function is static, why do we want to use the batadv prefix? would this create confusion?
Cheers,