Next: , Previous: Merging, Up: Programs


1.6 Synchronization

In order to merge two IEEE 802.11 traces WiPal needs to synchronize them precisely. In order to do so, it first identifies some frames that appear in both inputs. These are reference frames. It uses these frames to model clock desynchronization among the traces. It then update the first trace's timestamps so they are synchronized with the second trace.

One may use the wipal-synchronize command to synchronize two traces. It takes two inputs and produce one output. The output contains the same packets as the first input, but with synchronized timestamps.

To extract reference frames WiPal extract some specific frames called unique frames (see Unique frames) from both input traces and then intersect the two obtained sets. One may use the wipal-intersect-unique-frames command to get the result of this operation (i.e. the list of reference frames used for synchronization of two traces).

WiPal's synchronization process synchronizes reference frames before it synchronizes other frames. One may get the result of this operation using the wipal-synchronize-unique-frames command.

e.g.:

     wipal-intersect-unique-frames -n -P foo.0:foo.1:foo.2 bar.0:bar.1
     wipal-synchronize-unique-frames -n -P foo.0:foo.1:foo.2 bar.0:bar.1
     wipal-synchronize -n -P foo.0:foo.1:foo.2 bar.0:bar.1 foo-sync

1.6.1 Synchronizing more than two traces

Due to WiPal's mode of operation, it is not possible to synchronize multiple traces on a common timeline in a single operation. wipal-merge-and-synchronize however provide a similar feature. It behaves as follows:

  1. First, merge all the traces given on the command line. At this stage, the command behaves exactly as wipal-merge.
  2. Then, synchronize each individual trace from the command line with the timeline of the previously merged trace. Record each synchronized trace into the files sync-1, sync-2, etc.

For instance:

     wipal-merge-and-synchronize t1.pcap t2.pcap t3.pcap

will merge t1.pcap, t2.pcap, and t3.pcap into the file merge-2. Then each trace will be synchronized using merge-2's timeline.