strace/xlat/bpf_commands.in
Quentin Monnet 0a8dd6a68c Update bpf syscall decoding
Implement decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH,
and BPF_PROG_DETACH commands.

* bpf.c: Include "xlat/bpf_attach_type.h".
(bpf_obj_manage, bpf_prog_attach, bpf_prog_detach): New functions.
(SYS_FUNC(bpf)): Use them.
* configure.ac: Check for union bpf_attr.bpf_fd and union
bpf_attr.attach_type.
* xlat/bpf_attach_type.in: New file.
* xlat/bpf_commands.in: Update list of BPF_* command constants.
* xlat/bpf_map_types.in: Update list of BPF_MAP_TYPE_* constants.
* xlat/bpf_prog_types.in: Update list of BPF_PROG_TYPE_* constants.
* tests/bpf.c [HAVE_UNION_BPF_ATTR_BPF_FD] (obj_manage): New function.
[HAVE_UNION_BPF_ATTR_ATTACH_TYPE] (prog_cgroup): Likewise.
(main): Use them.
2017-01-29 21:54:43 +00:00

11 lines
186 B
Plaintext

BPF_MAP_CREATE 0
BPF_MAP_LOOKUP_ELEM 1
BPF_MAP_UPDATE_ELEM 2
BPF_MAP_DELETE_ELEM 3
BPF_MAP_GET_NEXT_KEY 4
BPF_PROG_LOAD 5
BPF_OBJ_PIN 6
BPF_OBJ_GET 7
BPF_PROG_ATTACH 8
BPF_PROG_DETACH 9