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.
20 lines
390 B
Rust
20 lines
390 B
Rust
use core::ffi::c_void;
|
|
|
|
use crate::{bindings::bpf_sk_lookup, EbpfContext};
|
|
|
|
pub struct SkLookupContext {
|
|
pub lookup: *mut bpf_sk_lookup,
|
|
}
|
|
|
|
impl SkLookupContext {
|
|
pub fn new(lookup: *mut bpf_sk_lookup) -> SkLookupContext {
|
|
SkLookupContext { lookup }
|
|
}
|
|
}
|
|
|
|
impl EbpfContext for SkLookupContext {
|
|
fn as_ptr(&self) -> *mut c_void {
|
|
self.lookup as *mut _
|
|
}
|
|
}
|