Trait puffin::protocol::ProtocolBehavior

source ·
pub trait ProtocolBehavior: 'static {
    type ProtocolTypes: ProtocolTypes;
    type Claim: Claim<Self::ProtocolTypes>;
    type SecurityViolationPolicy: SecurityViolationPolicy<Self::ProtocolTypes, Self::Claim>;
    type ProtocolMessage: ProtocolMessage<Self::ProtocolTypes, Self::OpaqueProtocolMessage>;
    type OpaqueProtocolMessage: OpaqueProtocolMessage<Self::ProtocolTypes>;
    type ProtocolMessageFlight: ProtocolMessageFlight<Self::ProtocolTypes, Self::ProtocolMessage, Self::OpaqueProtocolMessage, Self::OpaqueProtocolMessageFlight>;
    type OpaqueProtocolMessageFlight: OpaqueProtocolMessageFlight<Self::ProtocolTypes, Self::OpaqueProtocolMessage> + From<Self::ProtocolMessageFlight>;

    // Required method
    fn create_corpus() -> Vec<(Trace<Self::ProtocolTypes>, &'static str)>;
}
Expand description

Defines the protocol which is being tested.

The fuzzer is generally abstract over the used protocol. We assume that protocols have opaque messages, structured messages, and a way to deframe an arbitrary stream of bytes into messages.

Also the library allows the definition of a type for claims and a (security policy)SecurityViolationPolicy over sequences of them. Finally, there is a matcher which allows traces to include queries for knowledge.

Required Associated Types§

Required Methods§

source

fn create_corpus() -> Vec<(Trace<Self::ProtocolTypes>, &'static str)>

Creates a sane initial seed corpus.

Object Safety§

This trait is not object safe.

Implementors§