aggregate_flows
Aggregate packet flows from PCAP files by arbitrary tshark fields such as IPs, protocols, or ports. Get ranked tables of flow groups with packet counts and byte totals, with optional display filters.
Instructions
Aggregate packet flows grouped by arbitrary tshark field combinations.
Extracts the specified fields plus frame.len from each packet, then groups and sums by those fields. Default grouping is (src IP, dst IP, protocol number).
Args: file_path: Path to the PCAP file group_by: Comma-separated tshark field names to group by (default: "ip.src,ip.dst,ip.proto"). Examples: "ip.src,tcp.dstport" for per-service flows, "ip.src,ip.dst,ip.proto,tcp.dstport" for 5-tuple display_filter: Optional display filter (e.g. "tcp.dstport == 5432") top_n: Number of top flows to return, ranked by bytes (default: 20)
Returns: Table of flow groups with packet count and byte total, ranked by volume
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| group_by | No | ip.src,ip.dst,ip.proto | |
| file_path | Yes | ||
| display_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |