You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Alessandro Decina b66a73f6c7 Add aya-gen
aya-gen can be used to generate bindings for kernel types, eg:

	aya-gen btf-types ethhdr --probe-read-getters

Will generate:

	// ...

	#[repr(C)]
	#[derive(Debug, Copy, Clone)]
	pub struct ethhdr {
	    pub h_dest: [::aya_bpf_cty::c_uchar; 6usize],
	    pub h_source: [::aya_bpf_cty::c_uchar; 6usize],
	    pub h_proto: __be16,
	}

	impl ethhdr {
	    pub fn h_dest(&self) -> Option<[::aya_bpf_cty::c_uchar; 6usize]> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_dest) }.ok()
	    }
	    pub fn h_source(&self) -> Option<[::aya_bpf_cty::c_uchar; 6usize]> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_source) }.ok()
	    }
	    pub fn h_proto(&self) -> Option<__be16> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_proto) }.ok()
	    }
	}
4 years ago
aya xdp: xdp BPF_LINK_CREATE was added in 5.9 4 years ago
aya-gen Add aya-gen 4 years ago
bpf bpf: add aya-bpf-bindings 4 years ago
xtask bpf: add aya-bpf-bindings 4 years ago
.gitignore Initial commit 4 years ago
Cargo.toml Add aya-gen 4 years ago
LICENSE-APACHE Add license files 4 years ago
LICENSE-MIT Add license files 4 years ago
rustfmt.toml Add rustfmt.toml 4 years ago