mirror of https://github.com/aya-rs/aya
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.
17 lines
442 B
Rust
17 lines
442 B
Rust
// Socket Filter program for testing with an arbitrary program.
|
|
// This is mainly used in tests with consideration for old kernels.
|
|
|
|
#![cfg_attr(target_arch = "bpf", no_std)]
|
|
#![cfg_attr(target_arch = "bpf", no_main)]
|
|
aya_ebpf::main_stub!();
|
|
|
|
use aya_ebpf::{macros::socket_filter, programs::SkBuffContext};
|
|
|
|
// Introduced in kernel v3.19.
|
|
#[socket_filter]
|
|
pub fn simple_prog(_ctx: SkBuffContext) -> i64 {
|
|
0
|
|
}
|
|
|
|
aya_ebpf::panic_handler!();
|