File: cli.rs

package info (click to toggle)
rust-sniffglue 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 488 kB
  • sloc: sh: 116; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 818 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use structopt::clap::AppSettings;

#[derive(Debug, StructOpt)]
#[structopt(global_settings = &[AppSettings::ColoredHelp])]
pub struct Args {
    /// Set device to promisc
    #[structopt(short="p", long="promisc")]
    pub promisc: bool,
    /// Detailed output
    #[structopt(short="d", long="detailed")]
    pub detailed: bool,
    /// Json output (unstable)
    #[structopt(short="j", long="json")]
    pub json: bool,
    /// Show more packets (maximum: 4)
    #[structopt(short="v", long="verbose",
                parse(from_occurrences))]
    pub verbose: u8,
    /// Open device as pcap file
    #[structopt(short="r", long="read")]
    pub read: bool,
    /// Number of cores
    #[structopt(short="n", long="cpus")]
    pub cpus: Option<usize>,
    /// Device for sniffing
    pub device: Option<String>,
}