History

bpf: sync bpf.h to tools/

Export new prog type and hook points to the libbpf.

Stanislav Fomichev committed 7 years ago

Commit aa6ab641 parent 0d01da61 file · +14 −0Browse files

Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+14−0
@@ -170,6 +170,7 @@ enum bpf_prog_type { · 169 unmodified lines
170170 BPF_PROG_TYPE_FLOW_DISSECTOR,
171171 BPF_PROG_TYPE_CGROUP_SYSCTL,
172172 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
173+ BPF_PROG_TYPE_CGROUP_SOCKOPT,
173174 };
174175
175176 enum bpf_attach_type {
@@ -194,6 +195,8 @@ enum bpf_attach_type { · 18 unmodified lines
194195 BPF_CGROUP_SYSCTL,
195196 BPF_CGROUP_UDP4_RECVMSG,
196197 BPF_CGROUP_UDP6_RECVMSG,
198+ BPF_CGROUP_GETSOCKOPT,
199+ BPF_CGROUP_SETSOCKOPT,
197200 __MAX_BPF_ATTACH_TYPE
198201 };
199202
@@ -3541,4 +3544,15 @@ struct bpf_sysctl { · 3341 unmodified lines
35413544 */
35423545 };
35433546
3547+struct bpf_sockopt {
3548+ __bpf_md_ptr(struct bpf_sock *, sk);
3549+ __bpf_md_ptr(void *, optval);
3550+ __bpf_md_ptr(void *, optval_end);
3551+
3552+ __s32 level;
3553+ __s32 optname;
3554+ __s32 optlen;
3555+ __s32 retval;
3556+};
3557+
35443558 #endif /* _UAPI__LINUX_BPF_H__ */