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
381 B
Rust
20 lines
381 B
Rust
use core::ffi::c_void;
|
|
|
|
use crate::{bindings::bpf_sockopt, BpfContext};
|
|
|
|
pub struct SockoptContext {
|
|
pub sockopt: *mut bpf_sockopt,
|
|
}
|
|
|
|
impl SockoptContext {
|
|
pub fn new(sockopt: *mut bpf_sockopt) -> SockoptContext {
|
|
SockoptContext { sockopt }
|
|
}
|
|
}
|
|
|
|
impl BpfContext for SockoptContext {
|
|
fn as_ptr(&self) -> *mut c_void {
|
|
self.sockopt as *mut _
|
|
}
|
|
}
|