]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/net/sock_reuseport.h
kprobes: Blacklist symbols in arch-defined prohibited area
[mirror_ubuntu-bionic-kernel.git] / include / net / sock_reuseport.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
ef456144
CG
2#ifndef _SOCK_REUSEPORT_H
3#define _SOCK_REUSEPORT_H
4
538950a1
CG
5#include <linux/filter.h>
6#include <linux/skbuff.h>
ef456144
CG
7#include <linux/types.h>
8#include <net/sock.h>
9
10struct sock_reuseport {
11 struct rcu_head rcu;
12
13 u16 max_socks; /* length of socks */
14 u16 num_socks; /* elements in socks */
538950a1 15 struct bpf_prog __rcu *prog; /* optional BPF sock selector */
ef456144
CG
16 struct sock *socks[0]; /* array of sock pointers */
17};
18
19extern int reuseport_alloc(struct sock *sk);
b4ace4f1 20extern int reuseport_add_sock(struct sock *sk, struct sock *sk2);
ef456144 21extern void reuseport_detach_sock(struct sock *sk);
538950a1
CG
22extern struct sock *reuseport_select_sock(struct sock *sk,
23 u32 hash,
24 struct sk_buff *skb,
25 int hdr_len);
26extern struct bpf_prog *reuseport_attach_prog(struct sock *sk,
27 struct bpf_prog *prog);
ef456144
CG
28
29#endif /* _SOCK_REUSEPORT_H */