Skip to content

Commit

Permalink
bpf: sync bpf.h to tools/
Browse files Browse the repository at this point in the history
Export new prog type and hook points to the libbpf.

Cc: Andrii Nakryiko <andriin@fb.com>
Cc: Martin Lau <kafai@fb.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Stanislav Fomichev authored and Alexei Starovoitov committed Jun 27, 2019
1 parent 0d01da6 commit aa6ab64
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/include/uapi/linux/bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ enum bpf_prog_type {
BPF_PROG_TYPE_FLOW_DISSECTOR,
BPF_PROG_TYPE_CGROUP_SYSCTL,
BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
BPF_PROG_TYPE_CGROUP_SOCKOPT,
};

enum bpf_attach_type {
Expand All @@ -194,6 +195,8 @@ enum bpf_attach_type {
BPF_CGROUP_SYSCTL,
BPF_CGROUP_UDP4_RECVMSG,
BPF_CGROUP_UDP6_RECVMSG,
BPF_CGROUP_GETSOCKOPT,
BPF_CGROUP_SETSOCKOPT,
__MAX_BPF_ATTACH_TYPE
};

Expand Down Expand Up @@ -3541,4 +3544,15 @@ struct bpf_sysctl {
*/
};

struct bpf_sockopt {
__bpf_md_ptr(struct bpf_sock *, sk);
__bpf_md_ptr(void *, optval);
__bpf_md_ptr(void *, optval_end);

__s32 level;
__s32 optname;
__s32 optlen;
__s32 retval;
};

#endif /* _UAPI__LINUX_BPF_H__ */

0 comments on commit aa6ab64

Please sign in to comment.