#[link(name = "syscall_intercept")]
extern "C" {
static mut intercept_hook_point: Option<HookFn>;
pub fn syscall_no_intercept(num: isize, ...) -> isize;
}
pub unsafe fn set_hook_fn(f: HookFn) {
intercept_hook_point = Some(f);
}
pub unsafe fn unset_hook_fn() {
intercept_hook_point = None;
}
pub type HookFn = extern "C" fn(
num: isize,
a0: isize,
a1: isize,
a2: isize,
a3: isize,
a4: isize,
a5: isize,
result: &mut isize,
) -> InterceptResult;
#[repr(i32)]
pub enum InterceptResult {
Hook = 0,
Forward = 1,
}