7 个稳定版本
2.1.1 | 2024年8月9日 |
---|---|
2.1.0 | 2021年11月1日 |
2.0.0 | 2019年10月8日 |
1.1.0 | 2019年5月28日 |
1.0.2 | 2019年4月17日 |
#268 in Unix API
1,605 每月下载量
1MB
24K SLoC
bpfjit-sys
Rust 对 NetBSD 的 cBPF JIT 引擎的绑定
作者: Alex Forster <[email protected]>
许可证: BSD-2-Clause
使用方法
use bpfjit_sys::{BpfJit, Linktype};
static PACKET: &'static [u8] = &[
// 0xDE, 0xAD, 0xBE, 0xEF, ...
];
fn main() {
let filter = BpfJit::new("udp dst port 123", Linktype::Ethernet)?;
if filter.matches(PACKET) {
// ...
}
}
贡献
sljit
版权所有 © Zoltan Herczeg <[email protected]>。保留所有权利。
在 2-clause BSD 许可证(BSD-2-Clause)下分发。
bpfjit
版权所有 © Alexander Nasonov <[email protected]>。保留所有权利。
在 2-clause BSD 许可证(BSD-2-Clause)下分发。