blob: 8e4f831d2e52e59a12aa3acab43c0de85b39d6c7 [file] [log] [blame]
Martin KaFai Lau6ac99e82019-04-26 16:39:39 -07001/* SPDX-License-Identifier: GPL-2.0 */
2/* Copyright (c) 2019 Facebook */
3#ifndef _BPF_SK_STORAGE_H
4#define _BPF_SK_STORAGE_H
5
6struct sock;
7
8void bpf_sk_storage_free(struct sock *sk);
9
10extern const struct bpf_func_proto bpf_sk_storage_get_proto;
11extern const struct bpf_func_proto bpf_sk_storage_delete_proto;
12
Stanislav Fomichev8f51dfc2019-08-14 10:37:49 -070013#ifdef CONFIG_BPF_SYSCALL
14int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk);
15#else
16static inline int bpf_sk_storage_clone(const struct sock *sk,
17 struct sock *newsk)
18{
19 return 0;
20}
21#endif
22
Martin KaFai Lau6ac99e82019-04-26 16:39:39 -070023#endif /* _BPF_SK_STORAGE_H */