Struct libafl_bolts::shmem::ShMemId
source · pub struct ShMemId { /* private fields */ }
Expand description
An id associated with a given shared memory mapping (ShMem
), which can be used to
establish shared-mappings between proccesses.
Id is a file descriptor if you use MmapShMem
or AshmemShMem
.
That means you have to use shmem server to access to the shmem segment from other processes in these cases.
On the other hand, id is a unique identifier if you use CommonUnixShMem
or Win32ShMem
.
In these two cases, you can use shmat(id) or OpenFileMappingA
(id) to gain access to the shmem
Implementations§
source§impl ShMemId
impl ShMemId
sourcepub fn from_array(array: &[u8; 20]) -> Self
pub fn from_array(array: &[u8; 20]) -> Self
Create a new id from a fixed-size string/bytes array It should contain a valid cstring.
sourcepub fn try_from_slice(slice: &[u8]) -> Result<Self, Error>
pub fn try_from_slice(slice: &[u8]) -> Result<Self, Error>
Try to create a new id from a bytes string. The slice must have a length of at least 20 bytes and contain a valid cstring.
sourcepub fn from_string(val: &str) -> Self
pub fn from_string(val: &str) -> Self
Create a new id from a string
Trait Implementations§
source§impl<'de> Deserialize<'de> for ShMemId
impl<'de> Deserialize<'de> for ShMemId
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ShMemId
impl PartialEq for ShMemId
impl Copy for ShMemId
impl Eq for ShMemId
impl StructuralEq for ShMemId
impl StructuralPartialEq for ShMemId
Auto Trait Implementations§
impl RefUnwindSafe for ShMemId
impl Send for ShMemId
impl Sync for ShMemId
impl Unpin for ShMemId
impl UnwindSafe for ShMemId
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting
TupleList
, of an Prepend::prepend()
call,
including the prepended entry.source§fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.