Parse Pcap
parse_pcapParse Wireshark pcap files by aggregating TCP streams, slicing protocol frames, and auto-parsing each frame. Get structured frame sequences and partial-frame diagnostics with automatic protocol detection.
Instructions
解析 Wireshark 导出 pcap: 按 TCP 流聚合载荷 -> 按协议切帧 -> 逐帧 parse_auto。
每个流返回完整帧序列 (带结构化解析) 与尾部半帧 (partial, 截断也是 诊断信息)。protocol 缺省时按"完整帧数最多的协议"自动判别。 需要可选依赖 scapy (uv sync --extra eval)。大批量帧场景比逐条 frame_hex 高效得多。 输出受 64KB token 预算约束: 超出时按流序/帧序装帧并截断, 末尾追加 一条 flow 以 "truncated:" 开头的 sentinel 流 (frames 为空, 带 total/shown 计数)。需要其余帧时用 protocol= 过滤或拆分 pcap 再解析。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| protocol | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |