mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Minor hashtable refactor
This commit is contained in:
1 parent
d9b1493260
commit
083a70393f
5 files changed
+80
-90
No files matched your search
+19
-13
@@ -756,30 +756,36 @@ struct child {
|
||||
|
||||
#define HASH_SIZE (16)
|
||||
|
||||
struct hashentry {
|
||||
uint8_t hash[HASH_SIZE];
|
||||
time_t expires;
|
||||
uint32_t inext;
|
||||
char value[4];
|
||||
};
|
||||
|
||||
struct hashtable {
|
||||
unsigned hashsize;
|
||||
unsigned poolsize;
|
||||
unsigned tablesize;
|
||||
unsigned growlimit;
|
||||
unsigned recsize;
|
||||
unsigned rnd[4];
|
||||
unsigned hash_size;
|
||||
void (*index2hash)(const void *index, unsigned char *hash);
|
||||
uint32_t * ihashtable;
|
||||
uint8_t * hashvalues;
|
||||
uint32_t ihashempty;
|
||||
void (*index2hash)(const void *index, unsigned char *hash, const unsigned char *rnd);
|
||||
unsigned growlimit;
|
||||
int tablesize;
|
||||
time_t compacted;
|
||||
uint32_t ihashempty;
|
||||
};
|
||||
|
||||
extern struct hashtable dns_table;
|
||||
extern struct hashtable dns6_table;
|
||||
extern struct hashtable auth_table;
|
||||
|
||||
struct authcache {
|
||||
unsigned char username[64];
|
||||
#ifndef NOIPv6
|
||||
uint8_t sincr_addr[16];
|
||||
uint8_t sinsl_addr[16];
|
||||
#else
|
||||
uint8_t sincr_addr[4];
|
||||
uint8_t sinsl_addr[4];
|
||||
#endif
|
||||
uint16_t sincr_family;
|
||||
uint16_t sinsl_family;
|
||||
};
|
||||
|
||||
struct pluginlink {
|
||||
struct symbol symbols;
|
||||
struct extparam *conf;
|
||||
|
||||
Reference in new issue
Block a user