]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - include/uapi/linux/bpf.h
uapi: update kernel headers to 5.11 pre rc1
[mirror_iproute2.git] / include / uapi / linux / bpf.h
index 0981d0a3e7099283aeecb031c26808a252ece783..bd28bc76d810c8af5bf24ded8858bb066c5199c4 100644 (file)
@@ -3822,6 +3822,14 @@ union bpf_attr {
  *             The **hash_algo** is returned on success,
  *             **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if
  *             invalid arguments are passed.
+ *
+ * struct socket *bpf_sock_from_file(struct file *file)
+ *     Description
+ *             If the given file represents a socket, returns the associated
+ *             socket.
+ *     Return
+ *             A pointer to a struct socket on success or NULL if the file is
+ *             not a socket.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -3986,6 +3994,7 @@ union bpf_attr {
        FN(bprm_opts_set),              \
        FN(ktime_get_coarse_ns),        \
        FN(ima_inode_hash),             \
+       FN(sock_from_file),             \
        /* */
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper