summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp-server-internal.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-04 00:22:41 +0200
committerTom Gundersen <teg@jklm.no>2015-10-05 18:22:10 +0200
commitb826ab586c9e0a9c0d438a75c28cf3a8ab485929 (patch)
tree198d9f30b924468fc7d7dbf5fe9f05ce73809269 /src/libsystemd-network/dhcp-server-internal.h
parent57217c8f2a2dea07b41ecf05000172ce77a90466 (diff)
downloadsystemd-b826ab586c9e0a9c0d438a75c28cf3a8ab485929.tar.gz
hashmap: refactor hash_func
All our hash functions are based on siphash24(), factor out siphash_init() and siphash24_finalize() and pass the siphash state to the hash functions rather than the hash key. This simplifies the hash functions, and in particular makes composition simpler as calling siphash24_compress() repeatedly on separate chunks of input has the same effect as first concatenating the input and then calling siphash23_compress() on the result.
Diffstat (limited to 'src/libsystemd-network/dhcp-server-internal.h')
-rw-r--r--src/libsystemd-network/dhcp-server-internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp-server-internal.h b/src/libsystemd-network/dhcp-server-internal.h
index 5dc3c7aa26..3b88b93d9a 100644
--- a/src/libsystemd-network/dhcp-server-internal.h
+++ b/src/libsystemd-network/dhcp-server-internal.h
@@ -96,5 +96,5 @@ int dhcp_server_send_packet(sd_dhcp_server *server,
DHCPRequest *req, DHCPPacket *packet,
int type, size_t optoffset);
-unsigned long client_id_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]);
+void client_id_hash_func(const void *p, struct siphash *state);
int client_id_compare_func(const void *_a, const void *_b);