pub struct LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static, { /* private fields */ }
Expand description
An EventManager
that forwards all events to other attached fuzzers on shared maps or via tcp,
using low-level message passing, crate::bolts::llmp
.
Implementations
impl<I, OT, S, SP> LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static,
impl<I, OT, S, SP> LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static,
Create a manager from a raw llmp client
pub fn new_on_port(
shmem_provider: SP,
port: u16,
configuration: EventConfig
) -> Result<Self, Error>
pub fn new_on_port(
shmem_provider: SP,
port: u16,
configuration: EventConfig
) -> Result<Self, Error>
Create llmp on a port If the port is not yet bound, it will act as broker Else, it will act as client.
pub fn existing_client_from_env(
shmem_provider: SP,
env_name: &str,
configuration: EventConfig
) -> Result<Self, Error>
pub fn existing_client_from_env(
shmem_provider: SP,
env_name: &str,
configuration: EventConfig
) -> Result<Self, Error>
If a client respawns, it may reuse the existing connection, previously stored by LlmpClient::to_env()
.
Describe the client event mgr’s llmp parts in a restorable fashion
pub fn existing_client_from_description(
shmem_provider: SP,
description: &LlmpClientDescription,
configuration: EventConfig
) -> Result<Self, Error>
pub fn existing_client_from_description(
shmem_provider: SP,
description: &LlmpClientDescription,
configuration: EventConfig
) -> Result<Self, Error>
Create an existing client from description
Write the config for a client EventManager
to env vars, a new client can reattach using LlmpEventManager::existing_client_from_env()
.
Trait Implementations
impl<I: Debug, OT: Debug, S: Debug, SP: Debug> Debug for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static,
impl<I: Debug, OT: Debug, S: Debug, SP: Debug> Debug for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static,
impl<I, OT, S, SP> Drop for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static,
impl<I, OT, S, SP> Drop for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider + 'static,
impl<I, OT, S, SP> EventFirer<I> for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider,
impl<I, OT, S, SP> EventFirer<I> for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider,
Get the configuration
Send off an Event::Log
event to the broker
This is a shortcut for EventFirer::fire
with Event::Log
as argument. Read more
fn serialize_observers<OT, S>(
&mut self,
observers: &OT
) -> Result<Vec<u8>, Error> where
OT: ObserversTuple<I, S> + Serialize,
fn serialize_observers<OT, S>(
&mut self,
observers: &OT
) -> Result<Vec<u8>, Error> where
OT: ObserversTuple<I, S> + Serialize,
Serialize all observers for this type and manager
impl<E, I, OT, S, SP, Z> EventProcessor<E, I, S, Z> for LlmpEventManager<I, OT, S, SP> where
SP: ShMemProvider,
E: Executor<Self, I, S, Z> + HasObservers<I, OT, S>,
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
Z: ExecutionProcessor<I, OT, S> + EvaluatorObservers<I, OT, S>,
impl<E, I, OT, S, SP, Z> EventProcessor<E, I, S, Z> for LlmpEventManager<I, OT, S, SP> where
SP: ShMemProvider,
E: Executor<Self, I, S, Z> + HasObservers<I, OT, S>,
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
Z: ExecutionProcessor<I, OT, S> + EvaluatorObservers<I, OT, S>,
Lookup for incoming events and process them. Return the number of processes events or an error Read more
fn deserialize_observers<OT>(
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error> where
OT: ObserversTuple<I, S> + DeserializeOwned,
fn deserialize_observers<OT>(
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error> where
OT: ObserversTuple<I, S> + DeserializeOwned,
Deserialize all observers for this type and manager
impl<I, OT, S, SP> EventRestarter<S> for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider,
impl<I, OT, S, SP> EventRestarter<S> for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S>,
SP: ShMemProvider,
The llmp client needs to wait until a broker mapped all pages, before shutting down. Otherwise, the OS may already have removed the shared maps,
impl<I, OT, S, SP> HasEventManagerId for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
SP: ShMemProvider,
impl<I, OT, S, SP> HasEventManagerId for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
SP: ShMemProvider,
Gets the id assigned to this staterestorer.
impl<I, OT, S, SP> ProgressReporter<I> for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
SP: ShMemProvider,
impl<I, OT, S, SP> ProgressReporter<I> for LlmpEventManager<I, OT, S, SP> where
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
SP: ShMemProvider,
fn maybe_report_progress<S>(
&mut self,
state: &mut S,
last_report_time: Duration,
monitor_timeout: Duration
) -> Result<Duration, Error> where
S: HasExecutions + HasClientPerfMonitor,
fn maybe_report_progress<S>(
&mut self,
state: &mut S,
last_report_time: Duration,
monitor_timeout: Duration
) -> Result<Duration, Error> where
S: HasExecutions + HasClientPerfMonitor,
Given the last time, if monitor_timeout
seconds passed, send off an info/monitor/heartbeat message to the broker.
Returns the new last
time (so the old one, unless monitor_timeout
time has passed and monitor have been sent)
Will return an crate::Error
, if the stats could not be sent. Read more
impl<E, I, OT, S, SP, Z> EventManager<E, I, S, Z> for LlmpEventManager<I, OT, S, SP> where
E: Executor<Self, I, S, Z> + HasObservers<I, OT, S>,
I: Input,
OT: ObserversTuple<I, S> + DeserializeOwned,
SP: ShMemProvider,
Z: ExecutionProcessor<I, OT, S> + EvaluatorObservers<I, OT, S>,
Auto Trait Implementations
impl<I, OT, S, SP> RefUnwindSafe for LlmpEventManager<I, OT, S, SP> where
I: RefUnwindSafe,
OT: RefUnwindSafe,
S: RefUnwindSafe,
SP: RefUnwindSafe,
<SP as ShMemProvider>::Mem: RefUnwindSafe,
impl<I, OT, S, SP> !Send for LlmpEventManager<I, OT, S, SP>
impl<I, OT, S, SP> !Sync for LlmpEventManager<I, OT, S, SP>
impl<I, OT, S, SP> Unpin for LlmpEventManager<I, OT, S, SP> where
I: Unpin,
OT: Unpin,
S: Unpin,
SP: Unpin,
<SP as ShMemProvider>::Mem: Unpin,
impl<I, OT, S, SP> UnwindSafe for LlmpEventManager<I, OT, S, SP> where
I: UnwindSafe,
OT: UnwindSafe,
S: UnwindSafe,
SP: UnwindSafe,
<SP as ShMemProvider>::Mem: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more