1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SOCK_REUSEPORT_H
3 #define _SOCK_REUSEPORT_H
5 #include <linux/filter.h>
6 #include <linux/skbuff.h>
7 #include <linux/types.h>
10 struct sock_reuseport
{
13 u16 max_socks
; /* length of socks */
14 u16 num_socks
; /* elements in socks */
15 struct bpf_prog __rcu
*prog
; /* optional BPF sock selector */
16 struct sock
*socks
[0]; /* array of sock pointers */
19 extern int reuseport_alloc(struct sock
*sk
);
20 extern int reuseport_add_sock(struct sock
*sk
, struct sock
*sk2
);
21 extern void reuseport_detach_sock(struct sock
*sk
);
22 extern struct sock
*reuseport_select_sock(struct sock
*sk
,
26 extern struct bpf_prog
*reuseport_attach_prog(struct sock
*sk
,
27 struct bpf_prog
*prog
);
29 #endif /* _SOCK_REUSEPORT_H */