Loading...
Searching...
No Matches
hash_sockaddr.h
Go to the documentation of this file.
// SPDX-License-Identifier: BSD-3-Clause
#ifndef MPTCPD_HASH_SOCKADDR_H
#define MPTCPD_HASH_SOCKADDR_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
struct sockaddr;
struct mptcpd_hash_sockaddr_key
{
struct sockaddr const *sa;
uint32_t seed;
};
int mptcpd_hash_sockaddr_compare(void const *a, void const *b);
void *mptcpd_hash_sockaddr_key_copy(void const *p);
void mptcpd_hash_sockaddr_key_free(void *p);
#ifdef __cplusplus
}
#endif
#endif // MPTCPD_HASH_SOCKADDR_H
/*
Local Variables:
c-file-style: "linux"
End:
*/
mptcpd_hash_sockaddr_compare
int mptcpd_hash_sockaddr_compare(void const *a, void const *b)
Compare hash map keys based on IP address alone.
Definition hash_sockaddr.c:61
mptcpd_hash_sockaddr_key_copy
void * mptcpd_hash_sockaddr_key_copy(void const *p)
Deep copy the hash map key p.
Definition hash_sockaddr.c:84
mptcpd_hash_sockaddr_key
Hash key information.
Definition hash_sockaddr.h:40
mptcpd_hash_sockaddr_key::seed
uint32_t seed
Hash algorithm (MurmurHash3) seed.
Definition hash_sockaddr.h:45
mptcpd_hash_sockaddr_key::sa
struct sockaddr const * sa
IP address to be hashed.
Definition hash_sockaddr.h:42