get_flow_matrix
Generate a host-pair communication matrix from a PCAP file, showing packet and byte totals per source-destination pair. Optionally apply a display filter and limit to top N pairs.
Instructions
Build a host-pair communication matrix showing traffic volume.
Extracts ip.src, ip.dst, and frame.len fields from packets, then aggregates by (src, dst) pair sorted by total bytes descending.
Args: file_path: Path to the PCAP file display_filter: Optional display filter (e.g. "not arp") top_n: Number of top host pairs to return (default: 20)
Returns: Ranked table of host pairs with packet count and byte totals
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| file_path | Yes | ||
| display_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |