I don't recall why we used aya-ebpf-cty (a fork of the cty crate).
I assume it's because the ffi types in libcore weren't stablized when
the project first started.
Either way, I've replaced aya-ebpf-cty with core::ffi types and
the tests appear to pass still, which is reassuring.
This is a breaking change since the re-export of aya-ebpf-cty as
aya-ebpf::cty has also been removed. Migration is as simple as
replacing import with core::ffi.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Provide an `arg()` method in `RawTracepointArgs` wrapper of
`bpf_raw_tracepoint_args` and also in `RawTracepointContext`, so
it's directly available in raw tracepoint programs.
The methods and traits implemented here are unsafe. There is no
way to reliably check the number of available arguments, so
requesting a non-existing one leads to undefined behavior.
The const-assert crate doesn't even compile with stable rust, so we
shouldn't depend on it. Instead we replicate its functionality behind
cfg(unstable) which is set at build time based on the toolchain in use.
This API doesn't make sense as the max_entries needs to be set to the
number of online CPUs by the loader.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>