-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: wrapper creation for libbpf_probe_bpf_helper #446
Conversation
4299289
to
558440f
Compare
With this PR #445 isn't completely true. |
libbpfgo.go
Outdated
@@ -96,6 +98,15 @@ func BPFMapTypeIsSupported(mapType MapType) (bool, error) { | |||
return supportedC == 1, nil | |||
} | |||
|
|||
func BPFFuncTypeIsSupported(progType BPFProgType, funcId helpers.BPFFunc) (bool, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, I suggest renaming to BPFHelperIsSupported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Please check https://github.com/aquasecurity/libbpfgo/pull/446/files#r1661926644. 👍🏼
558440f
to
866aefe
Compare
Create the wrapper
BPFFuncTypeIsSupported
aroundlibbpf_probe_bpf_helper
in order to check if bpf helper is available.It's necessary to give the bpf type and the function ID in order to know if it's supported.