Struct libafl::bolts::llmp::LlmpReceiver [−][src]
pub struct LlmpReceiver<SP> where
SP: ShMemProvider, { pub id: u32, pub last_msg_recvd: *const LlmpMsg, pub shmem_provider: SP, pub current_recv_map: LlmpSharedMap<SP::Mem>, }
Receiving end on a (unidirectional) sharedmap channel
Fields
id: u32
Id of this provider
last_msg_recvd: *const LlmpMsg
Pointer to the last meg this received
shmem_provider: SP
The shmem provider
current_recv_map: LlmpSharedMap<SP::Mem>
current page. After EOP, this gets replaced with the new one
Implementations
impl<SP> LlmpReceiver<SP> where
SP: ShMemProvider,
[src]
impl<SP> LlmpReceiver<SP> where
SP: ShMemProvider,
[src]Receiving end of an llmp channel
pub fn on_existing_from_env(
shmem_provider: SP,
env_name: &str
) -> Result<Self, Error>
[src]
pub fn on_existing_from_env(
shmem_provider: SP,
env_name: &str
) -> Result<Self, Error>
[src]Reattach to a vacant recv_map
, to with a previous sender stored the information in an env before.
pub fn to_env(&self, env_name: &str) -> Result<(), Error>
[src]
pub fn to_env(&self, env_name: &str) -> Result<(), Error>
[src]Store the info to this receiver to env.
A new client can reattach to it using LlmpReceiver::on_existing_from_env()
pub fn on_existing_map(
shmem_provider: SP,
current_sender_map: SP::Mem,
last_msg_recvd_offset: Option<u64>
) -> Result<Self, Error>
[src]
pub fn on_existing_map(
shmem_provider: SP,
current_sender_map: SP::Mem,
last_msg_recvd_offset: Option<u64>
) -> Result<Self, Error>
[src]Create a Receiver, reattaching to an existing sender map.
It is essential, that the sender (or someone else) keeps a pointer to the sender_map
else reattach will get a new, empty page, from the OS, or fail.
pub unsafe fn recv_blocking(&mut self) -> Result<*mut LlmpMsg, Error>
[src]
pub unsafe fn recv_blocking(&mut self) -> Result<*mut LlmpMsg, Error>
[src]Blocks/spins until the next message gets posted to the page, then returns that message.
Safety
Returns a raw ptr, on the recv map. Should be safe in general
pub fn recv_buf(&mut self) -> Result<Option<(u32, Tag, &[u8])>, Error>
[src]
pub fn recv_buf(&mut self) -> Result<Option<(u32, Tag, &[u8])>, Error>
[src]Returns the next message, tag, buf, if avaliable, else None
pub fn recv_buf_with_flags(
&mut self
) -> Result<Option<(ClientId, Tag, Flags, &[u8])>, Error>
[src]
pub fn recv_buf_with_flags(
&mut self
) -> Result<Option<(ClientId, Tag, Flags, &[u8])>, Error>
[src]Receive the buffer, also reading the LLMP internal message flags
pub fn recv_buf_blocking(&mut self) -> Result<(ClientId, Tag, &[u8]), Error>
[src]
pub fn recv_buf_blocking(&mut self) -> Result<(ClientId, Tag, &[u8]), Error>
[src]Returns the next sender, tag, buf, looping until it becomes available
pub fn describe(&self) -> Result<LlmpDescription, Error>
[src]
pub fn describe(&self) -> Result<LlmpDescription, Error>
[src]Describe this client in a way, that it can be restored later with Self::on_existing_from_description
pub fn on_existing_from_description(
shmem_provider: SP,
description: &LlmpDescription
) -> Result<Self, Error>
[src]
pub fn on_existing_from_description(
shmem_provider: SP,
description: &LlmpDescription
) -> Result<Self, Error>
[src]Create this client on an existing map from the given description. acquired with self.describe
Trait Implementations
Auto Trait Implementations
impl<SP> RefUnwindSafe for LlmpReceiver<SP> where
SP: RefUnwindSafe,
<SP as ShMemProvider>::Mem: RefUnwindSafe,
SP: RefUnwindSafe,
<SP as ShMemProvider>::Mem: RefUnwindSafe,
impl<SP> !Send for LlmpReceiver<SP>
impl<SP> !Sync for LlmpReceiver<SP>
impl<SP> Unpin for LlmpReceiver<SP> where
SP: Unpin,
<SP as ShMemProvider>::Mem: Unpin,
SP: Unpin,
<SP as ShMemProvider>::Mem: Unpin,
impl<SP> UnwindSafe for LlmpReceiver<SP> where
SP: UnwindSafe,
<SP as ShMemProvider>::Mem: UnwindSafe,
SP: UnwindSafe,
<SP as ShMemProvider>::Mem: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self