Export new prog type and hook points to the libbpf.
Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -170,6 +170,7 @@ enum bpf_prog_type { · 169 unmodified lines | ||
| 170 | 170 | BPF_PROG_TYPE_FLOW_DISSECTOR, |
| 171 | 171 | BPF_PROG_TYPE_CGROUP_SYSCTL, |
| 172 | 172 | BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, |
| 173 | + BPF_PROG_TYPE_CGROUP_SOCKOPT, | |
| 173 | 174 | }; |
| 174 | 175 | |
| 175 | 176 | enum bpf_attach_type { |
| @@ -194,6 +195,8 @@ enum bpf_attach_type { · 18 unmodified lines | ||
| 194 | 195 | BPF_CGROUP_SYSCTL, |
| 195 | 196 | BPF_CGROUP_UDP4_RECVMSG, |
| 196 | 197 | BPF_CGROUP_UDP6_RECVMSG, |
| 198 | + BPF_CGROUP_GETSOCKOPT, | |
| 199 | + BPF_CGROUP_SETSOCKOPT, | |
| 197 | 200 | __MAX_BPF_ATTACH_TYPE |
| 198 | 201 | }; |
| 199 | 202 | |
| @@ -3541,4 +3544,15 @@ struct bpf_sysctl { · 3341 unmodified lines | ||
| 3541 | 3544 | */ |
| 3542 | 3545 | }; |
| 3543 | 3546 | |
| 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 | + | |
| 3544 | 3558 | #endif /* _UAPI__LINUX_BPF_H__ */ |