mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
util: add function for IP address hashing
Move the hashing function from find_slot() in ntp_sources to make it available to clientlog and improve the hashing a bit.
This commit is contained in:
1
util.h
1
util.h
@@ -82,6 +82,7 @@ extern char *UTI_IPToString(IPAddr *ip);
|
||||
|
||||
extern int UTI_StringToIP(const char *addr, IPAddr *ip);
|
||||
extern uint32_t UTI_IPToRefid(IPAddr *ip);
|
||||
extern uint32_t UTI_IPToHash(IPAddr *ip);
|
||||
extern void UTI_IPHostToNetwork(IPAddr *src, IPAddr *dest);
|
||||
extern void UTI_IPNetworkToHost(IPAddr *src, IPAddr *dest);
|
||||
extern int UTI_CompareIPs(IPAddr *a, IPAddr *b, IPAddr *mask);
|
||||
|
||||
Reference in New Issue
Block a user