Ethereal-dev: [Ethereal-dev] getting the last n records in editcap ...

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Richard Sharpe <rsharpe@xxxxxxxxxxxxxxxxx>
Date: Wed, 8 Oct 2003 15:58:37 -0700 (PDT)
Hi,

Someone remarked that it would be nice to be able to save the last n 
frames in a capture ...

It would seem that a mechanism like:

  Use an array of offsets with n entries in it
  add the oiffset of new frames to the array as we see each one
  wrap around when we hit the end

When we have done the lot, simply loop through the list, reading in each 
frame and writing it out.

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com