]> jfr.im git - solanum.git/blobdiff - include/hash.h
modules: warning cleanups
[solanum.git] / include / hash.h
index 9766022152728d0a85b349ce2857f36d13936692..1a5a66ba15be233935fceaf0c204b584d27b0dfb 100644 (file)
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
- *
- *  $Id: hash.h 3177 2007-02-01 00:19:14Z jilles $
  */
 
 #ifndef INCLUDED_hash_h
 #define INCLUDED_hash_h
 
 struct Dictionary;
-
-extern rb_dlink_list *clientTable;
-extern rb_dlink_list *channelTable;
-extern rb_dlink_list *idTable;
-extern rb_dlink_list *resvTable;
-extern rb_dlink_list *hostTable;
-extern rb_dlink_list *helpTable;
+struct rb_radixtree;
 
 extern struct Dictionary *nd_dict;
+extern struct rb_radixtree *resv_tree;
+extern struct rb_radixtree *channel_tree;
 
 /* Magic value for FNV hash functions */
 #define FNV1_32_INIT 0x811c9dc5UL
@@ -45,6 +39,9 @@ extern struct Dictionary *nd_dict;
 #define U_MAX_BITS 17
 #define U_MAX 131072 /* 2^17 */
 
+/* Client connid hash table size, used in hash.c */
+#define CLI_CONNID_MAX 4096
+
 /* Channel hash table size, hash.c/s_debug.c */
 #define CH_MAX_BITS 16
 #define CH_MAX 65536 /* 2^16 */
@@ -98,6 +95,11 @@ extern void del_from_resv_hash(const char *name, struct ConfItem *aconf);
 extern struct ConfItem *hash_find_resv(const char *name);
 extern void clear_resv_hash(void);
 
-extern void hash_stats(struct Client *);
+void add_to_cli_connid_hash(struct Client *client_p);
+void del_from_cli_connid_hash(struct Client *client_p);
+struct Client *find_cli_connid_hash(uint32_t connid);
+
+void add_to_zconnid_hash(struct Client *client_p);
+void del_from_zconnid_hash(struct Client *client_p);
 
 #endif /* INCLUDED_hash_h */