discv5_cli/packet/
command.rs1use clap::{Args, Subcommand as ClapSubcommand};
2
3#[derive(Args, Clone, Debug)]
5pub struct Packet {
6 #[clap(subcommand)]
8 pub subcommand: PacketSubcommand,
9}
10
11#[derive(ClapSubcommand, Clone, Debug)]
13pub enum PacketSubcommand {
14 Decode(Decode),
16}
17
18#[derive(Args, Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
20pub struct Decode {
21 #[clap(
23 short = 'p',
24 long = "packet",
25 help = "The packet to be decoded as a hex string."
26 )]
27 pub packet: String,
28 #[clap(
30 short = 'n',
31 long = "nodeid",
32 help = "The node id of the destination of this packet to determine WHOAREYOU packets as a hex string."
33 )]
34 pub node_id: String,
35}