pub struct SeccompFilter { /* private fields */ }Implementations§
Source§impl SeccompFilter
impl SeccompFilter
Sourcepub fn from_cbpf(
code: &Vec<sock_filter>,
maybe_unique_id: u64,
should_log: bool,
) -> Result<Self, Errno>
pub fn from_cbpf( code: &Vec<sock_filter>, maybe_unique_id: u64, should_log: bool, ) -> Result<Self, Errno>
Creates a SeccompFilter object from the given sock_filter. Associates the user-provided id with it, which is intended to be unique to this process.
pub fn run(&self, data: &seccomp_data) -> u32
Trait Implementations§
Source§impl BpfProgramContext for SeccompFilter
impl BpfProgramContext for SeccompFilter
const CBPF_CONFIG: &'static CbpfConfig
type RunContext<'a> = ()
type Packet<'a> = &'a SeccompData
type Map = NoMap
fn get_arg_types() -> Vec<Type>
Source§impl StaticHelperSet for SeccompFilter
impl StaticHelperSet for SeccompFilter
Source§fn helpers() -> &'static HelperSet<SeccompFilter>
fn helpers() -> &'static HelperSet<SeccompFilter>
Returns the set of helpers available to the program.
Auto Trait Implementations§
impl !Freeze for SeccompFilter
impl RefUnwindSafe for SeccompFilter
impl Send for SeccompFilter
impl Sync for SeccompFilter
impl Unpin for SeccompFilter
impl UnwindSafe for SeccompFilter
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
Source§impl<T> EbpfProgramContext for Twhere
T: BpfProgramContext,
impl<T> EbpfProgramContext for Twhere
T: BpfProgramContext,
Source§type RunContext<'a> = <T as BpfProgramContext>::RunContext<'a>
type RunContext<'a> = <T as BpfProgramContext>::RunContext<'a>
Context for an invocation of an eBPF program.
Source§type Packet<'a> = <T as BpfProgramContext>::Packet<'a>
type Packet<'a> = <T as BpfProgramContext>::Packet<'a>
Packet used by the program.
Source§type Arg1<'a> = <T as BpfProgramContext>::Packet<'a>
type Arg1<'a> = <T as BpfProgramContext>::Packet<'a>
Arguments passed to the program
type Arg2<'a> = ()
type Arg3<'a> = ()
type Arg4<'a> = ()
type Arg5<'a> = ()
Source§type Map = <T as BpfProgramContext>::Map
type Map = <T as BpfProgramContext>::Map
Type used to reference eBPF maps for the lifetime of a program.
Source§fn struct_mappings() -> SmallVec<[StructMapping; 1]>
fn struct_mappings() -> SmallVec<[StructMapping; 1]>
Returns the set of struct mappings that should be applied when linking a program. The
default implementation collects mappings from all arguments.
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.