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
369 B
Rust
20 lines
369 B
Rust
3 years ago
|
use core::ffi::c_void;
|
||
|
|
||
|
use crate::{bindings::bpf_sysctl, BpfContext};
|
||
|
|
||
|
pub struct SysctlContext {
|
||
|
pub sysctl: *mut bpf_sysctl,
|
||
|
}
|
||
|
|
||
|
impl SysctlContext {
|
||
|
pub fn new(sysctl: *mut bpf_sysctl) -> SysctlContext {
|
||
|
SysctlContext { sysctl }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl BpfContext for SysctlContext {
|
||
|
fn as_ptr(&self) -> *mut c_void {
|
||
|
self.sysctl as *mut _
|
||
|
}
|
||
|
}
|