Trait puffin::protocol::ProtocolBehavior
source · pub trait ProtocolBehavior: 'static {
type Matcher: Matcher;
type Claim: Claim;
type SecurityViolationPolicy: SecurityViolationPolicy<Self::Claim>;
type ProtocolMessage: ProtocolMessage<Self::Matcher, Self::OpaqueProtocolMessage>;
type OpaqueProtocolMessage: OpaqueProtocolMessage<Self::Matcher>;
type ProtocolMessageFlight: ProtocolMessageFlight<Self::Matcher, Self::ProtocolMessage, Self::OpaqueProtocolMessage, Self::OpaqueProtocolMessageFlight>;
type OpaqueProtocolMessageFlight: OpaqueProtocolMessageFlight<Self::Matcher, Self::OpaqueProtocolMessage> + From<Self::ProtocolMessageFlight>;
fn signature() -> &'static Signature;
fn create_corpus() -> Vec<(Trace<Self::Matcher>, &'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.