pub struct Linux { /* private fields */ }Expand description
A basic model of the Linux Operating System.
Implementations§
Source§impl Linux
impl Linux
Sourcepub fn new(
elf_linker: &ElfLinker,
base_path: Option<PathBuf>,
constants: &'static Constants,
) -> Result<Linux>
pub fn new( elf_linker: &ElfLinker, base_path: Option<PathBuf>, constants: &'static Constants, ) -> Result<Linux>
Create a new basic model of the Linux Operating System.
pub fn file_system(&self) -> &FileSystem
pub fn file_system_mut(&mut self) -> &mut FileSystem
pub fn access(&self, path: &str, _mode: u64) -> u64
pub fn brk(&mut self, address: u64, memory: &mut Memory) -> Result<u64>
pub fn lseek(&mut self, fd: u64, offset: isize, whence: u64) -> Result<u64>
pub fn mmap( &mut self, memory: &mut Memory, address: u64, length: u64, prot: u64, flags: u64, fd: u64, offset: u64, ) -> Result<u64>
pub fn mprotect( &mut self, memory: &mut Memory, address: u64, length: u64, prot: u64, ) -> Result<u64>
pub fn open(&mut self, path: &str, flags: u64, _mode: u64) -> Result<u64>
pub fn openat( &mut self, dirfd: u64, path: &str, flags: u64, mode: u64, ) -> Result<u64>
pub fn read(&mut self, fd: u64, length: u64) -> Result<Option<Vec<Expression>>>
pub fn write(&mut self, fd: u64, data: Vec<Expression>) -> Result<u64>
Trait Implementations§
impl Eq for Linux
impl StructuralPartialEq for Linux
Auto Trait Implementations§
impl Freeze for Linux
impl RefUnwindSafe for Linux
impl !Send for Linux
impl !Sync for Linux
impl Unpin for Linux
impl UnsafeUnpin for Linux
impl UnwindSafe for Linux
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