From 4404826b6a3baa886cace4a173ff61d72ccc20c2 Mon Sep 17 00:00:00 2001 From: kcwu Date: Wed, 22 Mar 2006 17:58:52 +0000 Subject: support DETECT_CLIENT, hash telnet sequence. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3298 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/bbs.h | 1 + include/fnv_hash.h | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/bbs.h b/include/bbs.h index 4931ef99..43352242 100644 --- a/include/bbs.h +++ b/include/bbs.h @@ -53,6 +53,7 @@ typedef time_t time4_t; #include "modes.h" #include "chess.h" #include "proto.h" +#include "fnv_hash.h" #ifdef ASSESS #include "assess.h" diff --git a/include/fnv_hash.h b/include/fnv_hash.h index 9d8851bd..837fd66c 100644 --- a/include/fnv_hash.h +++ b/include/fnv_hash.h @@ -1,3 +1,5 @@ +#ifndef _FNV_HASH_H_ +#define _FNV_HASH_H_ /* * Fowler / Noll / Vo Hash (FNV Hash) * http://www.isthe.com/chongo/tech/comp/fnv/ @@ -105,3 +107,6 @@ fnv1a_64_strcase(const char *str, Fnv64_t hval) } return hval; } + +#define FNV1A_CHAR(c,hval) do { hval^=(unsigned char)c; hval*=FNV_32_PRIME; } while(0) +#endif -- cgit v1.2.3