Trait libafl::events::EventFirer

source ·
pub trait EventFirer: UsesState {
    // Required method
    fn fire(
        &mut self,
        state: &mut Self::State,
        event: Event<<Self::State as UsesInput>::Input>
    ) -> Result<(), Error>;

    // Provided methods
    fn log(
        &mut self,
        state: &mut Self::State,
        severity_level: LogSeverity,
        message: String
    ) -> Result<(), Error> { ... }
    fn serialize_observers<OT>(
        &mut self,
        observers: &OT
    ) -> Result<Option<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<Option<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

Object Safety§

This trait is not object safe.

Implementors§

source§

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

source§

impl<EM, M> EventFirer for MonitorTypedEventManager<EM, M>
where EM: EventFirer,

source§

impl<EM, SP> EventFirer for CentralizedEventManager<EM, SP>

source§

impl<EMH, S> EventFirer for TcpEventManager<EMH, S>
where EMH: EventManagerHooksTuple<S>, S: State,

source§

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

source§

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

source§

impl<EMH, S, SP> EventFirer for TcpRestartingEventManager<EMH, S, SP>

source§

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

source§

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

source§

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