Trait TapController

Source
pub trait TapController {
    type Driver: VmiDriver;

    // Required methods
    fn new() -> Self;
    fn check_event(
        &self,
        event: &VmiEvent<<Self::Driver as VmiDriver>::Architecture>,
    ) -> Option<(View, Gfn)>;
    fn insert_breakpoint(
        &mut self,
        vmi: &VmiCore<Self::Driver>,
        pa: Pa,
        view: View,
    ) -> Result<(), VmiError>;
    fn remove_breakpoint(
        &mut self,
        vmi: &VmiCore<Self::Driver>,
        pa: Pa,
        view: View,
    ) -> Result<(), VmiError>;
    fn monitor(
        &mut self,
        vmi: &VmiCore<Self::Driver>,
        gfn: Gfn,
        view: View,
    ) -> Result<(), VmiError>;
    fn unmonitor(
        &mut self,
        vmi: &VmiCore<Self::Driver>,
        gfn: Gfn,
        view: View,
    ) -> Result<(), VmiError>;
}
Expand description

Trait for breakpoint controller implementations.

Required Associated Types§

Source

type Driver: VmiDriver

VMI driver type.

Required Methods§

Source

fn new() -> Self

Creates a new TapController.

Source

fn check_event( &self, event: &VmiEvent<<Self::Driver as VmiDriver>::Architecture>, ) -> Option<(View, Gfn)>

Checks if the given event was caused by a breakpoint.

Source

fn insert_breakpoint( &mut self, vmi: &VmiCore<Self::Driver>, pa: Pa, view: View, ) -> Result<(), VmiError>

Inserts a breakpoint at the given physical address.

Source

fn remove_breakpoint( &mut self, vmi: &VmiCore<Self::Driver>, pa: Pa, view: View, ) -> Result<(), VmiError>

Removes a breakpoint at the given physical address.

Source

fn monitor( &mut self, vmi: &VmiCore<Self::Driver>, gfn: Gfn, view: View, ) -> Result<(), VmiError>

Monitors the given guest frame number.

Source

fn unmonitor( &mut self, vmi: &VmiCore<Self::Driver>, gfn: Gfn, view: View, ) -> Result<(), VmiError>

Unmonitors the given guest frame number.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Driver> TapController for BreakpointController<Driver>
where Driver: VmiDriver, <Driver::Architecture as Architecture>::EventReason: EventReason<Architecture = Driver::Architecture>,

Source§

type Driver = Driver

Source§

impl<Driver> TapController for MemoryController<Driver>
where Driver: VmiDriver,

Source§

type Driver = Driver