mptcpd
Multipath TCP Daemon
Loading...
Searching...
No Matches
hash_sockaddr.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
10#ifndef MPTCPD_HASH_SOCKADDR_H
11#define MPTCPD_HASH_SOCKADDR_H
12
13#include <stdint.h>
14
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20struct sockaddr;
21
33
40{
42 struct sockaddr const *sa;
43
45 uint32_t seed;
46};
47
60int mptcpd_hash_sockaddr_compare(void const *a, void const *b);
61
68void *mptcpd_hash_sockaddr_key_copy(void const *p);
69
71void mptcpd_hash_sockaddr_key_free(void *p);
73
74#ifdef __cplusplus
75}
76#endif
77
78
79#endif // MPTCPD_HASH_SOCKADDR_H
80
81/*
82 Local Variables:
83 c-file-style: "linux"
84 End:
85*/
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
void * mptcpd_hash_sockaddr_key_copy(void const *p)
Deep copy the hash map key p.
Definition hash_sockaddr.c:84
Hash key information.
Definition hash_sockaddr.h:40
uint32_t seed
Hash algorithm (MurmurHash3) seed.
Definition hash_sockaddr.h:45
struct sockaddr const * sa
IP address to be hashed.
Definition hash_sockaddr.h:42