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.
aya/test/integration-ebpf/src/simple_prog.rs

20 lines
425 B
Rust

// Socket Filter program for testing with an arbitrary program.
// This is mainly used in tests with consideration for old kernels.
#![no_std]
#![no_main]
use aya_ebpf::{macros::socket_filter, programs::SkBuffContext};
// Introduced in kernel v3.19.
#[socket_filter]
pub fn simple_prog(_ctx: SkBuffContext) -> i64 {
0
}
#[cfg(not(test))]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}