filter_packets
Extract specific packets from a pcap file by filtering on source/destination IP, protocol, or port. Combine multiple criteria with AND logic to narrow down network traffic.
Instructions
Filter packets from a pcap file based on criteria.
Use this tool to extract specific packets matching your criteria. Multiple filters can be combined (AND logic).
Args: file_path: Path to the pcap or pcapng file src_ip: Filter by source IP address dst_ip: Filter by destination IP address protocol: Filter by protocol (TCP, UDP, ICMP, DNS) port: Filter by port number (source or destination) max_packets: Maximum packets to scan (default: 100000) max_results: Maximum matching packets to return (default: 100)
Returns: Matching packets with details (number, timestamp, IPs, protocol, info)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| src_ip | No | ||
| dst_ip | No | ||
| protocol | No | ||
| port | No | ||
| max_packets | No | ||
| max_results | No |