pub enum SocketControlRequest {
AttachEbpfProgram {
payload: AttachEbpfProgramOptions,
responder: SocketControlAttachEbpfProgramResponder,
},
DetachEbpfProgram {
hook: SocketHook,
responder: SocketControlDetachEbpfProgramResponder,
},
}
Expand description
Allows to attach eBPF filters to sockets API.
More than one SocketControl
client is allowed but they cannot install
more than one filter for the same hook. Closing the client end causes
all filters installed by that client to be removed.
Warning: Currently this protocol should be routed only to Starnix.
Variants§
AttachEbpfProgram
Attaches the specified eBPF program
to the specified hook
.
May fail if another program is already attached (potentially by another
SocketControl
instance).
Warning: Caller must check that the specified program is compatible
with the specified hook
.
DetachEbpfProgram
Detaches eBPF program from the specified hook
.
Implementations§
Source§impl SocketControlRequest
impl SocketControlRequest
pub fn into_attach_ebpf_program( self, ) -> Option<(AttachEbpfProgramOptions, SocketControlAttachEbpfProgramResponder)>
pub fn into_detach_ebpf_program( self, ) -> Option<(SocketHook, SocketControlDetachEbpfProgramResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SocketControlRequest
impl !RefUnwindSafe for SocketControlRequest
impl Send for SocketControlRequest
impl Sync for SocketControlRequest
impl Unpin for SocketControlRequest
impl !UnwindSafe for SocketControlRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more