diff options
author | Martin KaFai Lau <kafai@fb.com> | 2019-03-12 10:23:11 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-03-13 12:04:35 -0700 |
commit | 7681e7b2fbe2a78806423810c0d84dd230b96f94 (patch) | |
tree | 31578584bffd05a9c77b22211ec37e648f113a40 /tools/testing/selftests/bpf/bpf_helpers.h | |
parent | b55aa7b04bb42274b4a894020b5b2fa059c3527e (diff) | |
download | linux-7681e7b2fbe2a78806423810c0d84dd230b96f94.tar.gz linux-7681e7b2fbe2a78806423810c0d84dd230b96f94.tar.bz2 linux-7681e7b2fbe2a78806423810c0d84dd230b96f94.zip |
bpf: Add an example for bpf_get_listener_sock
This patch adds an example in using the new helper
bpf_get_listener_sock().
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_helpers.h')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h index c9433a496d54..c81fc350f7ad 100644 --- a/tools/testing/selftests/bpf/bpf_helpers.h +++ b/tools/testing/selftests/bpf/bpf_helpers.h @@ -180,6 +180,8 @@ static struct bpf_sock *(*bpf_sk_fullsock)(struct bpf_sock *sk) = (void *) BPF_FUNC_sk_fullsock; static struct bpf_tcp_sock *(*bpf_tcp_sock)(struct bpf_sock *sk) = (void *) BPF_FUNC_tcp_sock; +static struct bpf_sock *(*bpf_get_listener_sock)(struct bpf_sock *sk) = + (void *) BPF_FUNC_get_listener_sock; static int (*bpf_skb_ecn_set_ce)(void *ctx) = (void *) BPF_FUNC_skb_ecn_set_ce; |