diff options
author | Maciej enczykowski <maze@google.com> | 2019-11-02 01:37:56 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-11-02 01:37:56 -0700 |
commit | 95932d32a16e2963ca8fd64c7de9e0539b74a1ad (patch) | |
tree | a0f915f498fea2dc7aea53eab63828573b379d35 | |
parent | 479f604139575db024f05d76109fe4d9377e8b4b (diff) | |
parent | 7a6acc450e361f3c06d7d5c29edb0da0a9bd0a48 (diff) | |
download | netd-95932d32a16e2963ca8fd64c7de9e0539b74a1ad.tar.gz |
add a comment about bpf_get_socket_cookie()
am: 7a6acc450e
Change-Id: I06f7ec8b862305812b3713c6104a7236d331d2cd
-rw-r--r-- | bpf_progs/bpf_net_helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bpf_progs/bpf_net_helpers.h b/bpf_progs/bpf_net_helpers.h index 239cf318..714b7e6e 100644 --- a/bpf_progs/bpf_net_helpers.h +++ b/bpf_progs/bpf_net_helpers.h @@ -22,7 +22,9 @@ #include <stdbool.h> #include <stdint.h> +// this returns 0 iff skb->sk is NULL static uint64_t (*bpf_get_socket_cookie)(struct __sk_buff* skb) = (void*)BPF_FUNC_get_socket_cookie; + static uint32_t (*bpf_get_socket_uid)(struct __sk_buff* skb) = (void*)BPF_FUNC_get_socket_uid; static int (*bpf_skb_load_bytes)(struct __sk_buff* skb, int off, void* to, int len) = (void*)BPF_FUNC_skb_load_bytes; |