Next: , Previous: Concatenation, Up: Programs


1.3 Comparisons

One may test two PCAP traces for equivalence using the wipal-cmp command. The default is to compare every bit of information (PCAP headers plus packet bytes) but you may change this behavior using the -8, -b, -o, or -t options. Note that this is different however to using diff or cmp since traces with different endianness may contain the same packets.

By default wipal-cmp produces a report on the standard output indicating either that traces are equal, either which packet is the first to mismatch. Use -q if you are only interested in the program's exit status and do not want to produce any output. Use -o if you are interested in counting the number of bytes that differ between two traces.

e.g.:

     wipal-cmp foo.pcap bar.pcap
     wipal-cmp -q foo.pcap bar.pcap
     wipal-cmp -q -8 in1.pcap.0:in1.pcap.1 in2.pcap
     ...