Wireshark-commits: [Wireshark-commits] rev 51886: /trunk/ /trunk/doc/: editcap.pod /trunk/: editcap
Date: Mon, 09 Sep 2013 19:39:45 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=51886

User: cmaynard
Date: 2013/09/09 12:39 PM

Log:
 Fix the "crossed chopping region" problem.  Also, move chopping to its own function for both clarity and correctness since we need to compute chop offsets and lengths on a per-packet basis whereas previously this was not being done.
 
 Lastly, try to improve the documentation a bit concerning chopping and provide another example depicting 2 separate chopping regions.  *Maybe* this is clearer?
 
 One more example here for posterity:  Given the following 75 byte packet, there
 are 8 different ways to chop the 2 regions marked as 10 and 20 in a single pass:
 
     <--------------------------- 75 ---------------------------->
  
     +---+-------+-----------+---------------+-------------------+
     | 5 |   10  |     15    |       20      |         25        |
     +---+-------+-----------+---------------+-------------------+
 
 1) editcap -C 5:10 -C -25:-20 in.pcap out.pcap
 2) editcap -C 5:10 -C 50:-20 in.pcap out.pcap
 3) editcap -C -70:10 -C -25:-20 in.pcap out.pcap
 4) editcap -C -70:10 -C 50:-20 in.pcap out.pcap
 5) editcap -C 30:20 -C -60:-10 in.pcap out.pcap
 6) editcap -C 30:20 -C 15:-10 in.pcap out.pcap
 7) editcap -C -45:20 -C -60:-10 in.pcap out.pcap
 8) editcap -C -45:20 -C 15:-10 in.pcap out.pcap

Directory: /trunk/doc/
  Changes    Path           Action
  +14 -6     editcap.pod    Modified

Directory: /trunk/
  Changes    Path          Action
  +128 -82   editcap.c     Modified