decode_protocol
Extract targeted protocol fields from pcap files. Use curated defaults for DNS, HTTP, etc., or specify your own fields. Results returned as a tab-separated table; apply filters to refine output.
Instructions
Extract protocol-specific fields from a pcap file using tshark '-T fields'. Pass a known protocol name to use curated defaults (supported: dns, goose, http, icmp, mms, sip, sv, tls), or supply your own 'fields' list for any other protocol. Returns a tab-separated table — much smaller than full JSON. Use a 'filter' to narrow results (e.g. only request packets, only specific stNum values).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .pcap or .pcapng file | |
| protocol | Yes | Protocol name or display filter (e.g. 'http', 'goose', 'mms', 'sv', 'sip', or any tshark display filter such as 'icmp.type == 8') | |
| fields | No | Optional override of the field list. If omitted and the protocol has curated defaults, those are used. Required for protocols without defaults. Max 20 fields. | |
| filter | No | Optional additional display filter ANDed with the protocol filter (e.g. 'goose.stNum >= 5'). Numeric comparisons with == != >= <= are supported. | |
| packet_count | No | Maximum number of packets to return (default: 50) |