Tamir Duberstein
bb6c27b83a
programs: `ProgramFd` is borrowed from the program
...
`ProgramData::fd` is now owned. This means that `ProgramData` now closes
the file descriptor on drop.
Updates #612 .
2 years ago
Andrés Medina
8ebf0ac327
aya: Use OwnedFd in FdLink.
2 years ago
Tamir Duberstein
de8519a380
sys: extract common SyscallError
...
We currently have 4 copies of this.
2 years ago
Tamir Duberstein
cc2bc0acc1
Remove procfs dependency
2 years ago
Tamir Duberstein
b611038d5b
Use procfs crate for kernel version parsing
...
This allows the logic to be shared between aya and the integration tests
without exposing additional public API surface.
2 years ago
Tamir Duberstein
27120b328a
aya: don't allocate static strings
2 years ago
ajwerner
65d10f9ffc
aya: replace os::unix::prelude with os::fd
2 years ago
Alessandro Decina
b3ae7786d3
aya: fix detaching links on drop
...
https://github.com/aya-rs/aya/pull/366 broke detaching links on drop for
everything but FdLink. This restores detach on drop for all links.
2 years ago
Dave Tucker
4826bf7f74
Merge pull request #366 from dave-tucker/pin-redux-2
...
aya: Fix Link Pinning
3 years ago
Dave Tucker
4c1d645aa6
aya: Fix Link Pinning
...
1. Removes OwnedLink
2. Allows Links to be converted into FdLink
3. Introduces a PinnedLink type to handle wrap FdLink when pinned and
support un-pinning
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Michal Rostecki
944d6b8a16
Change from Rust edition 2018 to 2021
...
Rust 2021 adds more core prelude imports, including `TryFrom` and
`TryInto`.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
3 years ago
Dave Tucker
b2a6f00212
aya: Rename forget_link to take_link
...
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker
824baf9d64
aya: Export program modules
...
This allows access to XdpLink, XdpLinkId etc... which is currently
unavailable since these modules are private
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Kenjiro Nakayama
f721021a0a
Add support for BPF_PROG_TYPE_CGROUP_SYSCTL ( #256 )
...
* Add support for BPF_PROG_TYPE_CGROUP_SYSCTL
This patch adds support for `BPF_PROG_TYPE_CGROUP_SYSCTL`.
* Parse unnamed macro
* Fix docs
3 years ago