hostmask: export hash_ipv[46]

This commit is contained in:
Ed Kellett 2020-10-29 14:42:32 +00:00
parent 1a16d47edb
commit dc468b5b19
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC
2 changed files with 4 additions and 5 deletions

View file

@ -60,6 +60,8 @@ struct ConfItem *find_dline(struct sockaddr *, int);
void report_auth(struct Client *);
int match_ipv6(struct sockaddr *, struct sockaddr *, int);
int match_ipv4(struct sockaddr *, struct sockaddr *, int);
unsigned long hash_ipv6(struct sockaddr *, int);
unsigned long hash_ipv4(struct sockaddr *, int);
/* Hashtable stuff... */
#define ATABLE_SIZE 0x1000 /* 2^12 */

View file

@ -32,9 +32,6 @@
#include "send.h"
#include "match.h"
static unsigned long hash_ipv6(struct sockaddr *, int);
static unsigned long hash_ipv4(struct sockaddr *, int);
static int
_parse_netmask(const char *text, struct rb_sockaddr_storage *naddr, int *nb, bool strict)
@ -140,7 +137,7 @@ init_host_hash(void)
* Output: A hash value of the IP address.
* Side effects: None
*/
static unsigned long
unsigned long
hash_ipv4(struct sockaddr *saddr, int bits)
{
struct sockaddr_in *addr = (struct sockaddr_in *)(void *)saddr;
@ -159,7 +156,7 @@ hash_ipv4(struct sockaddr *saddr, int bits)
* Output: A hash value of the IP address.
* Side effects: None
*/
static unsigned long
unsigned long
hash_ipv6(struct sockaddr *saddr, int bits)
{
struct sockaddr_in6 *addr = (struct sockaddr_in6 *)(void *)saddr;