From 2b678369e79c36e732371e5a75c26349aca160b0 Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Thu, 4 Sep 2025 19:37:10 -0600 Subject: [PATCH] Add docs note that the pcapd service is only available over USB --- idevice/src/services/pcapd.rs | 2 ++ tools/src/pcapd.rs | 18 ++---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/idevice/src/services/pcapd.rs b/idevice/src/services/pcapd.rs index e4a1359..91774a8 100644 --- a/idevice/src/services/pcapd.rs +++ b/idevice/src/services/pcapd.rs @@ -1,4 +1,5 @@ //! Abstraction for pcapd +//! Note that this service only works over USB or through RSD. use plist::Value; use tokio::io::AsyncWrite; @@ -11,6 +12,7 @@ const ETHERNET_HEADER: &[u8] = &[ ]; /// Client for interacting with the pcapd service on the device. +/// Note that this service only works over USB or through RSD. pub struct PcapdClient { /// The underlying device connection with established service pub idevice: Idevice, diff --git a/tools/src/pcapd.rs b/tools/src/pcapd.rs index 682520a..167a4aa 100644 --- a/tools/src/pcapd.rs +++ b/tools/src/pcapd.rs @@ -15,18 +15,6 @@ async fn main() { let matches = Command::new("pcapd") .about("Capture IP packets") - .arg( - Arg::new("host") - .long("host") - .value_name("HOST") - .help("IP address of the device"), - ) - .arg( - Arg::new("pairing_file") - .long("pairing-file") - .value_name("PATH") - .help("Path to the pairing file"), - ) .arg( Arg::new("udid") .value_name("UDID") @@ -54,11 +42,9 @@ async fn main() { } let udid = matches.get_one::("udid"); - let host = matches.get_one::("host"); - let pairing_file = matches.get_one::("pairing_file"); let out = matches.get_one::("out").map(String::to_owned); - let provider = match common::get_provider(udid, host, pairing_file, "pcapd-jkcoxson").await { + let provider = match common::get_provider(udid, None, None, "pcapd-jkcoxson").await { Ok(p) => p, Err(e) => { eprintln!("{e}"); @@ -68,7 +54,7 @@ async fn main() { let mut logger_client = PcapdClient::connect(&*provider) .await - .expect("Failed to connect to pcapd"); + .expect("Failed to connect to pcapd! This service is only available over USB!"); logger_client.next_packet().await.unwrap();