Ethereal-dev: Re: [Ethereal-dev] Re: NTAR - PCAP next generation dump file format implementati
While reverse engineering tektronix rf5 file format I discovered they
insert 4 words (4 bytes each) every 0x2000 bytes (even in the middle
of a record).
I think these contain the number of records so far, the number of
records in the following block and a pointer to the first whole record
in the following block (preety much like aal2 does).
While I find simply obnoxious cutting the packet in the middle, I
think that "marking" the file this way makes seeking much simpler and
faster.
Whithout the need of creating a "frame" for the "blocks" once a
record would reach the marker one could zero pad the current block
until the right position of the "block marker" and continue writing
after that.
If the block marker contains just the number of packets so far writing
can be done without going backwards to fill the previous marker.
L
On 6/26/05, ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
> The draft describes two different blocks for holding a captured packet:
>
> Packet Block: it contains a single captured packet, or a portion of it.
> Simple Packet Block: it contains a single captured packet, or a
> portion of it, with only a minimal set of information about it.
>
>
> I often work with very very large capture files and often want to only
> extract a very small subset (packets captured between time X and time
> Y).
> This is very very slow with the current fileformats doe to the massive
> amount of data that has to be processed.
>
>
> I would propose to introduce a new type of block and encapsulate both
> PacketBlock and SimplePacketBlock in it :
>
>
>
> Packet
> ======
> This the block you refer to in the draft as PacketBlock. A Packet MUST
> be encapsulated inside a PacketBlock.
>
>
> SimplePacket
> ============
> This the block you refer to in the draft as SimplePacketBlock. A
> SimplePacket MUST be encapsulated inside a PacketBlock.
>
>
> Then introduce a new PacketBlock :
>
> PacketBlock
> ===========
> A block that contains one or (preferrably) more Packet or SimplePacket
> structures.
> Format of PacketBlock (in units of 4 bytes):
>
> Version: 1 byte, version of packetblock structure.
>
> Num packets: 3 bytes, number of Packet or SimplePacket structures in
> this PacketBlock, or zero (==use offline tool to calculate this and
> populate the field)
>
> Length : 8 bytes, total length of this block in bytes.
>
> TSofFirstPacket: timestamp of the first packet or simplepacket in this
> PacketBlock or zero (==run some offline tool to populate this field if
> you need it)
>
> TSofLastPacket: timestamp of last packet or simplepacket in this
> PaketBlock or zero.
>
>
>
> A PCAP writer should aggregate PacketBlocks/SimplePacketBlocks into
> blocks of approximately 10MByte.
> This default approximate block-size should be controllable by the user
> but i think 10MByte should be reasonable.
>
>
>
> Assuming we have a 10GByte capture file, then this would make it possible to :
> 1, parse the cap file and collect all PacketBlock headers, timestamps
> and number of packets in each block. fseek() to the next block
> instead of parsing it packet by packet.
> 2, present to the user a list :
> Block 1: start:x:y stop:x:y packets:z
> Block 2: ...
> ...
> 3, Allow the user to ONLY read/extract a subset of the PacketBlocks in
> teh capture file.
>
>
> Having this kind of encapsulation structure would allow users to use
> large captures (and skip the portions that are of no interest) while
> the current design would require the user to read the entire 10GB
> file.
>
> 1GB and larger capture files are becoming more and more standard to
> many users and reading through this massive amount of data is slow and
> painful.
>
>
>
> On 6/25/05, Gianluca Varenni <gianluca.varenni@xxxxxxxxx> wrote:
> > Hi all.
> >
> > This mail is to announce the birth of the NTAR project. NTAR stands for
> > Network Trace Archival and Retrieval library, and is an implementation of
> > the PCAP next generation dump file format, that was proposed and discussed
> > last year by several folks on the libpcap/tcpdump and WinPcap mailing
> > lists.
> > The library is released under the 3-clause/BSD license.
> >
> > The URL of the project is:
> >
> > http://www.winpcap.org/ntar
> >
> > On this website you can find
> > - the source file of the library (both for windows and *nix)
> > - the HTML documentation of the API (generated with doxygen from the
> > commented source files), both for the user and for someone wanting to
> > extend it. The docs contain some tests/examples that you can look to
> > get an idea of how the library works.
> > - An updated version of the PCAP draft specifying the file format.
> > The original draft of the file format is available at
> > http://www.tcpdump.org/pcap/pcap.html
> >
> >
> >
> > I'm seeking contributors to improve the library in terms of
> > - testing the library on different platforms and operating systems
> > - reviewing the API
> > - implementing new extensions to the library.
> >
> > A mailing list, ntar-workers@xxxxxxxxxxx, has been created for NTAR-related
> > discussions. People interested in this project are welcome to join it, the
> > mailman web interface to subscribe is available at
> >
> > https://www.winpcap.org/mailman/listinfo/ntar-workers
> >
> > Have a nice day
> > Gianluca Varenni
> >
> > _______________________________________________
> > Ethereal-dev mailing list
> > Ethereal-dev@xxxxxxxxxxxx
> > http://www.ethereal.com/mailman/listinfo/ethereal-dev
> >
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>
--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan