tree: cefaf66d2dc8510ebaac25eab6bfbe54775ffdc6
  1. ffx/
  2. src/
  3. tests/
  4. BUILD.gn
  5. METADATA.textproto
  6. README.md
src/connectivity/network/net-cli/README.md

net-cli

net-cli is a CLI tool which can run directly on target or as an FFX plugin for configuring and inspecting the Netstack.

capture subcommand

The capture subcommand is used for managing packet captures on Fuchsia.

Start a rolling capture

Start capturing on interface lo using the default capture name capture:

net capture start-rolling name:lo

Start capturing on interface ID 2 with a custom name my_capture, packet size limit of 100 bytes, and buffer size of 4 MiB:

net capture start-rolling --name my_capture --snap-len 100 --capture-size 4194304 id:2

Start capturing with a tcp port filter:

net capture start-rolling name:lo "tcp port 80"

Stop and download/discard

Stop the default capture and download to the default /tmp/pcap/capture.pcapng:

net capture stop-rolling

Stop a custom capture and download to a specific path:

net capture stop-rolling --name my_capture --output /data/my_capture.pcapng

Stop capture and discard the data immediately without downloading:

net capture stop-rolling --skip-download