Skip to content
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

aya-bpf: Set skb_buff visbility to pub #255

Merged
merged 1 commit into from
May 11, 2022
Merged

aya-bpf: Set skb_buff visbility to pub #255

merged 1 commit into from
May 11, 2022

Conversation

NoneTirex
Copy link
Contributor

It is possible to access the skb pointer with as_ptr method of BpfContext, but direct access to skb is better, because as_ptr requires a cast.
Accessing skb is necessary to write missing functions or to access skb_buff properties such as ifindex, data, data_end, hash, etc

You can implement missing methods directly into SkBuffContext implementation, but in the future a new method may suddenly appear.
So I think that solution is good.

Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alessandrod alessandrod merged commit b9a5448 into aya-rs:main May 11, 2022
@dave-tucker dave-tucker added fix A PR that is a small change or fixes a bug aya-bpf This is about aya-bpf (kernel) labels May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya-bpf This is about aya-bpf (kernel) fix A PR that is a small change or fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants