bpftool: Support new prog types and attach types

Add recently added prog types to `bpftool prog` and attach types to
`bpftool cgroup`.

Update bpftool documentation and bash completion appropriately.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Andrey Ignatov
2018-04-17 10:28:44 -07:00
committed by Daniel Borkmann
parent a2d481b326
commit 393de512e7
4 changed files with 28 additions and 7 deletions

View File

@@ -372,7 +372,8 @@ _bpftool()
;;
attach|detach)
local ATTACH_TYPES='ingress egress sock_create sock_ops \
device'
device bind4 bind6 post_bind4 post_bind6 connect4 \
connect6'
local ATTACH_FLAGS='multi override'
local PROG_TYPE='id pinned tag'
case $prev in
@@ -380,7 +381,8 @@ _bpftool()
_filedir
return 0
;;
ingress|egress|sock_create|sock_ops|device)
ingress|egress|sock_create|sock_ops|device|bind4|bind6|\
post_bind4|post_bind6|connect4|connect6)
COMPREPLY=( $( compgen -W "$PROG_TYPE" -- \
"$cur" ) )
return 0