Ethereal-dev: Re: [Ethereal-dev] Re: NTAR - PCAP next generation dump file format implementati
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: LEGO <luis.ontanon@xxxxxxxxx>
Date: Sun, 26 Jun 2005 04:03:24 +0200
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
- Follow-Ups:
- Re: [Ethereal-dev] Re: NTAR - PCAP next generation dump file formatimplementation
- From: Gianluca Varenni
- Re: [Ethereal-dev] Re: NTAR - PCAP next generation dump file formatimplementation
- References:
- [Ethereal-dev] [ANNOUNCE] NTAR - PCAP next generation dump file format implementation
- From: Gianluca Varenni
- [Ethereal-dev] Re: NTAR - PCAP next generation dump file format implementation
- From: ronnie sahlberg
- [Ethereal-dev] [ANNOUNCE] NTAR - PCAP next generation dump file format implementation
- Prev by Date: [Ethereal-dev] Re: NTAR - PCAP next generation dump file format implementation
- Next by Date: [Ethereal-dev] buildbot failure in Windows 2003 (IA32)
- Previous by thread: [Ethereal-dev] Re: NTAR - PCAP next generation dump file format implementation
- Next by thread: Re: [Ethereal-dev] Re: NTAR - PCAP next generation dump file formatimplementation
- Index(es):