=pod =head1 NAME B - Filter a tcpdump file using a SiLK Flow file =head1 SYNOPSIS rwpmatch --flow-file=FLOW_FILE [--msec-compare] [--ports-compare] TCPDUMP_INPUT > TCPDUMP_OUTPUT =head1 DESCRIPTION B reads each packet from the B (B) capture file I and writes the packet to the standard output if the specified I contains a matching SiLK Flow record. It is designed to reverse the input from B. B will read the pcap capture data from its standard input if I is specified as C. The application will fail when attempting to read or write binary data from or to a terminal. The SiLK Flow records in I should appear in time sorted order. =head1 OPTIONS Option names may be abbreviated if the abbreviation is unique or is an exact match for an option. A parameter to an option may be specified as B<--arg>=I or B<--arg> I, though the first form is required for options that take optional parameters. =over 4 =item B<--flow-file>=I I refers to a file, named pipe, or the string C. The flow file determines which packet records should be output to the new packet file. This switch is required. =item B<--msec-compare> Compare times down to the millisecond (rather than the default of second). =item B<--ports-compare> For TCP and UDP data, compare the source and destination ports when matching. =back =head1 EXAMPLES Given the B capture file F, convert it to a SiLK flow file: rwptoflow data.pcap --packet-pass=good.pcap --flow-out=data.rw Filter the SiLK flows---passing those records whose source IPs are found in the IPset file F: rwfilter --sipset=sip.set --pass=filtered.rw data.rw Match the original B file against the filtered SiLK file, in effect generating a B file which has been filtered by F: rwpmatch --flow-file=filtered.rw good.pcap > filtered.pcap =head1 NOTES For best results, the B input to B should be the output from B<--packet-pass-output> switch on B. This ensures that only well-behaved packets are given to B. The flow file input to B should contain single-packet flows originally derived from a B file using B. If a flow record is found which does not represent a corresponding B record, B will return an error. Both the B and the SiLK file inputs must be time-ordered. B is an expensive I/O application since it reads the entire B capture file and the entire SiLK Flow file. It may be worthwhile to optimize an analysis process to avoid using B until payload filtering is necessary. Saving the output from B as a partial-results file, and matching against that in the future (rather than the original B file) can also provide significant performance gains. SiLK supports millisecond timestamps. When reading packets whose timestamps have finer precision, the times are truncated at the millisecond position. =head1 SEE ALSO B, B, B, B =cut $SiLK: rwpmatch.pod 5815 2006-11-30 22:40:53Z mthomas $ Local Variables: mode:text indent-tabs-mode:nil End: