Trait libafl::events::EventFirer

source ·
pub trait EventFirer: UsesState {
    fn fire(
        &mut self,
        state: &mut Self::State,
        event: Event<<Self::State as UsesInput>::Input>
    ) -> Result<(), Error>; fn log(
        &mut self,
        state: &mut Self::State,
        severity_level: LogSeverity,
        message: String
    ) -> Result<(), Error> { ... } fn serialize_observers<OT>(
        &mut self,
        observers: &OT
    ) -> Result<Vec<u8>, Error>
    where
        OT: ObserversTuple<Self::State> + Serialize
, { ... } fn configuration(&self) -> EventConfig { ... } }
Expand description

EventFirer fire an event.

Required Methods§

source

fn fire(
    &mut self,
    state: &mut Self::State,
    event: Event<<Self::State as UsesInput>::Input>
) -> Result<(), Error>

Send off an Event to the broker

For multi-processed managers, such as llmp::LlmpEventManager, this serializes the Event and commits it to the llmp page. In this case, if you fire faster than the broker can consume (for example for each Input, on multiple cores) the llmp shared map may fill up and the client will eventually OOM or panic. This should not happen for a normal use-case.

Provided Methods§

source

fn log(
    &mut self,
    state: &mut Self::State,
    severity_level: LogSeverity,
    message: String
) -> Result<(), Error>

Send off an Event::Log event to the broker. This is a shortcut for EventFirer::fire with Event::Log as argument.

source

fn serialize_observers<OT>(&mut self, observers: &OT) -> Result<Vec<u8>, Error>where
    OT: ObserversTuple<Self::State> + Serialize,

Serialize all observers for this type and manager

source

fn configuration(&self) -> EventConfig

Get the configuration

Implementors§

source§

impl<IC, ICB, DI, S, SP> EventFirer for LlmpEventConverter<IC, ICB, DI, S, SP>where
    S: UsesInput,
    SP: ShMemProvider,
    IC: InputConverter<From = S::Input, To = DI>,
    ICB: InputConverter<From = DI, To = S::Input>,
    DI: Input,

source§

impl<MT, S> EventFirer for SimpleEventManager<MT, S>where
    MT: Monitor,
    S: UsesInput,

source§

impl<MT, S, SP> EventFirer for SimpleRestartingEventManager<MT, S, SP>where
    MT: Monitor,
    S: UsesInput,
    SP: ShMemProvider,

source§

impl<S> EventFirer for NopEventManager<S>where
    S: UsesInput,

source§

impl<S, SP> EventFirer for LlmpEventManager<S, SP>where
    S: UsesInput,
    SP: ShMemProvider,

source§

impl<S, SP> EventFirer for LlmpRestartingEventManager<S, SP>where
    SP: ShMemProvider,
    S: UsesInput,