blob: 67d1eb8fd7af08b7f12868f91d268e8a9cf93422 [file] [log] [blame]
Craig Gallekef456142016-01-04 17:41:45 -05001#ifndef _SOCK_REUSEPORT_H
2#define _SOCK_REUSEPORT_H
3
4#include <linux/types.h>
5#include <net/sock.h>
6
7struct sock_reuseport {
8 struct rcu_head rcu;
9
10 u16 max_socks; /* length of socks */
11 u16 num_socks; /* elements in socks */
12 struct sock *socks[0]; /* array of sock pointers */
13};
14
15extern int reuseport_alloc(struct sock *sk);
16extern int reuseport_add_sock(struct sock *sk, const struct sock *sk2);
17extern void reuseport_detach_sock(struct sock *sk);
18extern struct sock *reuseport_select_sock(struct sock *sk, u32 hash);
19
20#endif /* _SOCK_REUSEPORT_H */