Skip to content

Commit

Permalink
internal/sys: generate kprobe_multi link create attr
Browse files Browse the repository at this point in the history
Co-authored-by: Lorenz Bauer <i@lmb.io>
  • Loading branch information
2 people authored and ti-mo committed Sep 15, 2022
1 parent 6c490f6 commit 91754df
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/cmd/gentypes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,21 @@ import (
flattenAnon,
},
},
{
"LinkCreateKprobeMulti", retFd, "link_create", "BPF_LINK_CREATE",
[]patch{
chooseNth(4, 3),
replace(enumTypes["AttachType"], "attach_type"),
modify(func(m *btf.Member) error {
return rename("flags", "kprobe_multi_flags")(m.Type.(*btf.Struct))
}, "kprobe_multi"),
flattenAnon,
replace(pointer, "cookies"),
replace(pointer, "addrs"),
replace(pointer, "syms"),
rename("cnt", "count"),
},
},
{
"LinkUpdate", retError, "link_update", "BPF_LINK_UPDATE",
nil,
Expand Down
20 changes: 20 additions & 0 deletions internal/sys/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91754df

Please sign in to comment.