[−][src]Struct libseccomp_rs::Seccomp
Methods
impl Seccomp
[src]
pub fn init(act: c_uint) -> Self
[src]
initialize the seccomp and set the context into the struct
pub fn load(self) -> Result<c_int, String>
[src]
load seccomp to kernel
pub fn add_arch(&self, arch_token: c_uint) -> Result<c_int, String>
[src]
add an architecture
pub fn remove_arch(&self, arch_token: c_uint) -> Result<c_int, String>
[src]
remove an architecture
pub fn get_attr(
ctx: *const SCMP_FILTER_CTX,
attr: SCMP_FILTER_ATTR,
value: *mut c_uint
) -> Result<*mut c_uint, String>
[src]
ctx: *const SCMP_FILTER_CTX,
attr: SCMP_FILTER_ATTR,
value: *mut c_uint
) -> Result<*mut c_uint, String>
pub fn set_attr(
&self,
attr: SCMP_FILTER_ATTR,
value: c_uint
) -> Result<c_int, String>
[src]
&self,
attr: SCMP_FILTER_ATTR,
value: c_uint
) -> Result<c_int, String>
pub fn add_exact_rule(
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg: SCMP_ARG_CMP
) -> Result<c_int, String>
[src]
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg: SCMP_ARG_CMP
) -> Result<c_int, String>
pub fn add_exact_rules(
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg_array: Vec<SCMP_ARG_CMP>
) -> Result<c_int, String>
[src]
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg_array: Vec<SCMP_ARG_CMP>
) -> Result<c_int, String>
pub fn add_rule(
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg: SCMP_ARG_CMP
) -> Result<c_int, String>
[src]
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg: SCMP_ARG_CMP
) -> Result<c_int, String>
adding rule to seccomp before the seccomp loaded to kernel
pub fn add_rules(
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg_array: Vec<SCMP_ARG_CMP>
) -> Result<c_int, String>
[src]
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg_array: Vec<SCMP_ARG_CMP>
) -> Result<c_int, String>
adding rules(vector) to seccomp before the seccomp loaded to kernel
pub fn export_bpf(
ctx: *const SCMP_FILTER_CTX,
fd: c_int
) -> Result<c_int, String>
[src]
ctx: *const SCMP_FILTER_CTX,
fd: c_int
) -> Result<c_int, String>
pub fn export_pfc(
ctx: *const SCMP_FILTER_CTX,
fd: c_int
) -> Result<c_int, String>
[src]
ctx: *const SCMP_FILTER_CTX,
fd: c_int
) -> Result<c_int, String>
pub fn resolve_syscall_name(name: &str) -> i32
[src]
if you are using arm/aarch64 you could use this instead of SCMP_SYS
pub fn syscall_priority(
&self,
syscall: c_int,
priority: u8
) -> Result<c_int, String>
[src]
&self,
syscall: c_int,
priority: u8
) -> Result<c_int, String>
pub fn reset(&self, def_action: c_uint) -> Result<c_int, String>
[src]
reset the seccomp
pub fn release(ctx: *mut SCMP_FILTER_CTX)
[src]
release the seccomp from kernel
Auto Trait Implementations
impl Unpin for Seccomp
impl !Sync for Seccomp
impl !Send for Seccomp
impl UnwindSafe for Seccomp
impl RefUnwindSafe for Seccomp
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,