summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-07-30 17:42:29 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-07-31 09:33:48 +0200
commita40b712e4c4d09f6fa234872384da9705443d4e9 (patch)
treebebd5f44294fc2da591b11006bfeceb7b4d172c3 /tools/include
parentd692f1138a4bac2efd2c8656ca15556b63479e82 (diff)
downloadop-kernel-dev-a40b712e4c4d09f6fa234872384da9705443d4e9.zip
op-kernel-dev-a40b712e4c4d09f6fa234872384da9705443d4e9.tar.gz
bpf: Sync bpf.h to tools/
Sync bpf_get_socket_cookie() related bpf UAPI changes to tools/. Signed-off-by: Andrey Ignatov <rdna@fb.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/bpf.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 8701139..0ebaaf7 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1371,6 +1371,20 @@ union bpf_attr {
* A 8-byte long non-decreasing number on success, or 0 if the
* socket field is missing inside *skb*.
*
+ * u64 bpf_get_socket_cookie(struct bpf_sock_addr *ctx)
+ * Description
+ * Equivalent to bpf_get_socket_cookie() helper that accepts
+ * *skb*, but gets socket from **struct bpf_sock_addr** contex.
+ * Return
+ * A 8-byte long non-decreasing number.
+ *
+ * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)
+ * Description
+ * Equivalent to bpf_get_socket_cookie() helper that accepts
+ * *skb*, but gets socket from **struct bpf_sock_ops** contex.
+ * Return
+ * A 8-byte long non-decreasing number.
+ *
* u32 bpf_get_socket_uid(struct sk_buff *skb)
* Return
* The owner UID of the socket associated to *skb*. If the socket
OpenPOWER on IntegriCloud