stresser/
args.rs

1use clap::{arg, command, Parser};
2
3#[derive(Parser)]
4#[command(author, version, about)]
5pub(crate) struct StresserArgs {
6    /// IPv4/IPv6/DNS address of a server.
7    #[arg(short = 't', long = "target")]
8    pub(crate) target_host: String,
9
10    /// Number of sessions.
11    #[arg(short = 'c', long = "count")]
12    pub(crate) sessions_count: usize,
13
14    /// Name prefix of sessions.
15    #[arg(default_value = "Stresser")]
16    #[arg(short = 'n', long = "name")]
17    pub(crate) name_prefix: String,
18
19    /// Spawn cooldown of sessions in milliseconds.
20    /// The lower the value, the more frequently sessions are spawned.
21    #[arg(default_value = "10")]
22    #[arg(long = "cooldown")]
23    pub(crate) spawn_cooldown: u64,
24
25    /// Read buffer size in bytes.
26    #[arg(default_value = "4096")]
27    #[arg(long = "read-buffer")]
28    pub(crate) read_buffer_size: usize,
29}