1use clap::Parser;
2use navigator::protocol::Protocols;
3
4#[derive(Parser, Debug, Clone)]
5#[command(
6 version,
7 about,
8 long_about = "Generates fuzzing seed data in a bespoke binary format from an ExchangeDataset msgpack file. Uses the provided protocol to sort request-response pairs by function code & length of response bytes required."
9)]
10pub struct SeedingArgs {
11 #[arg(long)]
13 pub dataset_path: String,
14 #[arg(long)]
16 pub output_path: String,
17 #[arg(long, value_parser = protocol_parser)]
19 pub protocol: Protocols,
20}
21
22fn protocol_parser(s: &str) -> Result<Protocols, String> {
23 Protocols::try_from(s)
24}