Started on 1.4.b0001

Printer-friendly

I started work on 1.4.b0001. The new branch-1.4 is based branch-1.3. Its using exact same code base, but will have few new features added and expanded platform support. Any bugs that will be discovered in 1.3, the fixes will be incorporated into 1.4 as well.

Here is what I'm working on right at the moment:

1) Adding the "lazy decode" feature.

2) Adding JPacketBufferHandler feature.

Lazy decode is when packet scan/decoding is triggered only when the packet contents are first accessed and not when the packet is created. This will delay packet decoding to a time when its actually needed. This will allow packet decoding to be delayed by the user, to be performed in other threads and not the capture thread.

The JPacketBufferHandler is a new dispatcher handler that is designed for efficiency and minimization of java overhead during capture. This new handler uses a new container object JPacketBuffer which is designed to allocate large user memory buffer to store multiple packets. The default allocation size is 1MB and allows storage of anywhere between 500 to 10,000 packets depending on the packet size. Both the pcap header and the packet contents are stored in the buffer. The native dispatcher copies incoming packets from libpcap into this buffer until its full. Only when the buffer is full is the buffer dispatched to java handler with all of the captured packets. The JPacketBuffer container provides an iterator to access packets within the buffer. This minimizes interaction with java as hundreds if not thousands of packets can be efficiently stored in the buffer before any interaction with java has to occur. After the buffer is dispatched to java, a new buffer is allocated to receive more packets.

In high performance applications, the received buffer, full of raw packets, can be passed to another thread that can create and decode java packet objects, without impact on the capture thread on multi-processor systems. The handler is designed to streamline performance and overhead. No java interaction takes place in the native handler until the buffer is full and needs to be dispatched or the Pcap.loop or Pcap.dispatch is interrupted by either timeout or break-loop call.

As soon as these features are working I will be releasing 1.4.b0001 dev build. No new platforms have been added at this point, although fedora-core x64 is already working. Release 1.4 will add support for Solaris/OpenSolaris, MacOS/Darwin, FreeBSD/OpenBSD on both x32 and x64 architectures. The platforms will come after 1.4.b0001 dev snapshot.

The main dev "trunk" will be updated with all new additions to branch-1.4.