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: Add loaded_programs() API to list all loaded programs #524

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

dave-tucker
Copy link
Member

This uses a Programs iterator to yield all loaded bpf programs using bpf_prog_get_next_id.

Example program here

Signed-off-by: Dave Tucker dave@dtucker.co.uk

@netlify
Copy link

netlify bot commented Feb 13, 2023

Deploy Preview for aya-rs-docs ready!

Name Link
🔨 Latest commit de4905a
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/63f72a7db23ca40007262557
😎 Deploy Preview https://deploy-preview-524--aya-rs-docs.netlify.app/user/src/aya/programs/mod.rs
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@dave-tucker dave-tucker force-pushed the prog_list branch 2 times, most recently from 8d8729d to cd1a2a2 Compare February 14, 2023 00:01
@dave-tucker dave-tucker changed the title aya: Add programs() API to list all loaded programs aya: Add iter_programs() API to list all loaded programs Feb 14, 2023
@dave-tucker
Copy link
Member Author

I went with iter_programs() and re-exported at the root of the crate for convenience.
Docs have been added also... and hopefully all missing punctuation has been added 😆

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.

Just a few nits otherwise looks good

@dave-tucker dave-tucker force-pushed the prog_list branch 2 times, most recently from 684ac5f to 7def65a Compare February 23, 2023 08:56
This uses a Programs iterator to yield all loaded bpf programs using
bpf_prog_get_next_id.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
@dave-tucker dave-tucker added the api/needs-review Makes an API change that needs review label Feb 23, 2023
@dave-tucker dave-tucker changed the title aya: Add iter_programs() API to list all loaded programs aya: Add loaded_programs() API to list all loaded programs Feb 23, 2023
@dave-tucker dave-tucker added api/approved API design has been approved. feature A PR that implements a new feature or enhancement aya This is about aya (userspace) and removed api/needs-review Makes an API change that needs review labels Feb 23, 2023
@dave-tucker
Copy link
Member Author

Nits fixed. Merging

@dave-tucker dave-tucker merged commit d9878a6 into aya-rs:main Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/approved API design has been approved. aya This is about aya (userspace) feature A PR that implements a new feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants