- Tutorials
- API Examples
- User Guide
- Ch 1 - The Basics
- Ch 2 - libpcap
- 2.1 - The Main libpcap API Overview
- 2.2 - Getting a List of Interfaces
- 2.3 - Opening a Network Interface for Capture
- 2.4 - Opening offline capture
- 2.5 - Setting a packet filter
- 2.6 - Reading one packet at a time
- 2.7 - Reading multiple packets with dispatch loops
- 2.8 - Dumping captured packet to an offline file
- 2.9 - Transmitting packets
- 2.10 - Close Pcap and PcapDumper handles
- Ch 3 - Packet Decoding
- Ch 4 - Internals
- Ch 5 - Protocols
- Ch 6 - Native API
Submitted by Mark B. on Fri, 03/20/2009 - 05:15
Update 2009-04-11:
jnetpcap project had split into 2 modules (jnetpcap and jnpetpcap-protocols). Also the development and release policies have changed significantly as well. The current official release is being put into incubation until it becomes stable. Incubation involves several interum package releases. The incubation phase goes through the following stages: preview, alpha, beta and release candidate (rc) and final "stable".
The incubation phase for 1.2 has been restarted from the beginning and the first release to be released is jnetpcap-1.2.preview1. This release is based on now deprecated 1.2.rc4 feature set. The code base will contain all the changes upto and including the "packet decoder" feature set and will not include the higher level analysis "protocol analyzer" feature set. That feature set is periodically released as dev snapshots of the main development trunk and is expected to be officially release in the next major release cycle of 1.3 after 1.2 has been finalized.
A list of changes currently being done to the jnetpcap/branches/jnetpcap-1.2 trunk.
The feature set for 1.2 has been frozen. No new features will be added to the 1.2 branch. The feature set includes:
- libpcap wrapper - this is the core functionality of jnetpcap module
- packet decoder - native and java packet scanners that scan a packet for headers
Feature set currently in development trunk, but not included in 1.2 branch:
- protocol analyzer - highlevel protocol analyzer capable of recording various protocol specific events and behaviors. TcpAnalyzer provides sequencing and reassembly services. HttpProtocol analyzer reassembles http messages from multiple packets, etc...
Primary goal for 1.2.preview1 (a pre-alpha) is to provide and disclose the API and feature sets to be part of the 1.2 release. If something has been omitted that should be included with the 1.2 release, it will be added to 1.2.preview2 release. Once it is agreed and verified that the right feature set has been properly included in the preview release, next stage will be to release the preview as 1.2.alpha1. Only bug fixes and minor changes are allowed at that time. After "alpha" stage, we can expect 1.2.beta1 release, which will should prove to be fairly stable and again only bug fixes and minor changes will be allowed. After beta stage, we will once again release as release-candidate. The release candidate will provide the cummunity with the complete package that is to be released as the final "stable" release. If no more bugs are found and the "rc" package appears to be complete, it will be released as "stable" and final release. After that only maintenance and update releases will be released if significant defects are found and need to be fixed.
Here a list tracking various defects and issues:
Bugs, issues
- Bug #2698401 (fixed) - found bug in JBuffer.getByteArray(byte[] buffer) - its throwing an ArrayIndexOutOfBounds exception. This method is implemented natively.
- Bug #2694693 (fixed) - Missing "Display"at function guessFieldName
Additions
- Feature #2698775 (done) - Added convenience
JPayloadAccessorinterface toJHeaderclass - see blog for more details - NEW Added
JBufferInputStream(JBuffer source)class. As you might guess it takes anyJBufferobject and turns it into a regular java IO input stream. The data is read directly out of native memory. All bulk gets and skips are efficiently implemented. It also implements that mark/reset optional methods. Now easily turn any packet (since they all subclass JBuffer) or header into an InputStream.