| Crates.io | bpfjit-sys |
| lib.rs | bpfjit-sys |
| version | 2.1.2 |
| created_at | 2019-04-16 19:55:48.806927+00 |
| updated_at | 2024-10-07 20:18:01.467729+00 |
| description | Rust bindings to NetBSD's cBPF JIT engine |
| homepage | https://github.com/alexforster/bpfjit-sys |
| repository | https://github.com/alexforster/bpfjit-sys |
| max_upload_size | |
| id | 128449 |
| size | 1,037,995 |
Rust bindings to NetBSD's cBPF JIT engine
Author: Alex Forster <alex@alexforster.com>
License: 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) {
// ...
}
}
sljitCopyright © Zoltan Herczeg <hzmester@freemail.hu>. All rights reserved.
Distributed under the 2-clause BSD license (BSD-2-Clause).
bpfjitCopyright © Alexander Nasonov <alnsn@yandex.ru>. All rights reserved.
Distributed under the 2-clause BSD license (BSD-2-Clause).