pub struct Seccomp { /* private fields */ }
Implementations§
Source§impl Seccomp
impl Seccomp
pub fn get_attr( 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>
pub fn add_exact_rule( &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>
Sourcepub fn add_rule(
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg: 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>
adding rule to seccomp before the seccomp loaded to kernel
Sourcepub fn add_rules(
&self,
action: c_uint,
syscall: c_int,
arg_cnt: c_uint,
arg_array: Vec<SCMP_ARG_CMP>,
) -> Result<c_int, String>
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>
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>
pub fn export_pfc( ctx: *const SCMP_FILTER_CTX, fd: c_int, ) -> Result<c_int, String>
Sourcepub fn resolve_syscall_name(name: &str) -> i32
pub fn resolve_syscall_name(name: &str) -> i32
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>
Sourcepub fn release(ctx: *mut SCMP_FILTER_CTX)
pub fn release(ctx: *mut SCMP_FILTER_CTX)
release the seccomp from kernel
Auto Trait Implementations§
impl Freeze for Seccomp
impl RefUnwindSafe for Seccomp
impl !Send for Seccomp
impl !Sync for Seccomp
impl Unpin for Seccomp
impl UnwindSafe for Seccomp
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