Add --mac filter and rename IpFilter to PacketFilter
A packet is kept if its Ethernet source or destination MAC matches any --mac entry; combined with --ip, both must match. Empty dimensions match everything, so the unfiltered case is still the same code path. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b111ddfdc
commit
a9e283a87c
6 files changed
+189
-53
No files matched your search
+13
@@ -48,6 +48,14 @@ pub struct ClientCli {
|
||||
#[arg(long = "ip", value_name = "ADDR")]
|
||||
pub ip: Vec<String>,
|
||||
|
||||
/// Only forward packets whose Ethernet source or destination MAC
|
||||
/// matches, e.g. to pull one switch connection out of a capture by its
|
||||
/// upstream MAC ("aa:bb:cc:dd:ee:ff"). May be repeated; a packet is kept
|
||||
/// if it matches any entry. Combined with --ip, a packet must match
|
||||
/// both. Requires an Ethernet-linktype pcap source.
|
||||
#[arg(long = "mac", value_name = "ADDR")]
|
||||
pub mac: Vec<String>,
|
||||
|
||||
/// Append a diagnostic trace of this (local) process's transfer events
|
||||
/// to this file -- positions, rename detection, finalize -- for
|
||||
/// figuring out where a stalled transfer is stuck.
|
||||
@@ -105,6 +113,11 @@ pub struct ServerCli {
|
||||
#[arg(long = "ip", value_name = "ADDR")]
|
||||
pub ip: Vec<String>,
|
||||
|
||||
/// MAC filter for --send mode; repeated, one per address. See the
|
||||
/// client's --mac.
|
||||
#[arg(long = "mac", value_name = "ADDR")]
|
||||
pub mac: Vec<String>,
|
||||
|
||||
/// Destination final path (--recv mode).
|
||||
#[arg(long)]
|
||||
pub dest_final: Option<String>,
|
||||
|
||||
Reference in new issue
Block a user