The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
hash.h
Go to the documentation of this file.
1 /* This file is part of Netsukuku
2  * (c) Copyright 2005 Andrea Lo Pumo aka AlpT <alpt@freaknet.org>
3  *
4  * This source code is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as published
6  * by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  *
9  * This source code is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * Please refer to the GNU Public License for more details.
13  *
14  * You should have received a copy of the GNU Public License along with
15  * this source code; if not, write to:
16  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef HASH_H
20 #define HASH_H
21 
22 #define FNV_32_PRIME ((u_long)0x01000193)
23 #define FNV1_32_INIT ((u_long)0x811c9dc5)
24 
25 /*\
26  * * * Functions declaration * *
27 \*/
28 u_long fnv_32_buf(void *buf, size_t len, u_long hval);
29 unsigned int inthash(unsigned int key);
30 inline unsigned int dl_elf_hash (const unsigned char *name);
31 char xor_int(int i);
32 int hash_time(int *h_sec, int *h_usec);
33 
34 #endif /*HASH_H*/
unsigned int inthash(unsigned int key)
Definition: hash.c:26
char xor_int(int i)
Definition: misc.c:34
unsigned int dl_elf_hash(const unsigned char *name)
Definition: hash.c:101
u_long fnv_32_buf(void *buf, size_t len, u_long hval)
Definition: hash.c:73
int hash_time(int *h_sec, int *h_usec)
Definition: hash.c:148