Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Replies: 2 - Pages: 1  
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

jNetPcap: a java wrapper for libpcap and winpcap

URL: jNetPcap project homepage

At 12:36 PM on Aug 10, 2007, Mark Bednarczyk wrote:

Hi everyone, here is a neat open source project. I have released new version of jNetPcap loaded with functionality. This is the 3rd beta release, right on track to production quality status.

jNetPcap is a true java wrapper around the native libpcap and winpcap libraries, exposing all of their functions and structures. Through the use of java's JNI API, methods are proxied and structures are peered with their java cousins. I stress the "all" exported functions fact, to point out that no other java library does this today and that is how jNetPcap differentiates itself, among other things.

Some Features:
- No packet data copies - passed by reference into java as a direct nio byte buffer
- Provides "all" libpcap functions and structures - very few exceptions that just did not make sense in java
- Also comes with all WinPcap extensions
- Tune kernel buffers and behavior from java
- Transmit at link layer with any size sendqueues
- Remote captures
- Allows the kernel to gather statistics much more efficiently
- LGPL licensed - source in SVN on sf.net

Some note worthy methods:
* openLive - opens a live capture from network interface
* openOffline - opens a capture file
* findAllDevsEx - extended version of Pcap.findAllDevs which allows you to not only find network interfaces, but also PCAP files. This can be done locally or remotely.
* liveDump - which can dump captured packets to a savefile automatically at the kernel level.
* sendQueueTransmit - and related method, which allow raw packets to be sent in bulk, efficiently.
* setMinToCopy, setMode and setBuf - allow tweaking of kernel buffers and enable/disable statistical captures
* offlineFilter - ability to apply the BPF filter on your own packets without a capture
* setSampling - changes the mode of the capture where only samples of a capture are retruend. packets
* statEx - extended statistics that include counters on RPCAP remote connection

The best way to see this in action is to look at an example:
http://jnetpcap.sourceforge.net/?q=node/48

Homepage:
http://jnetpcap.sf.net
1 . At 2:11 PM on Aug 21, 2007, Mark Bednarczyk wrote:
  Click to reply to this thread Reply

Re: jNetPcap: a java wrapper for libpcap and winpcap

Update! jNetPcap 1.0 beta 4 is released.

Adds linux platform support and few new features.

http://jnetpcap.sf.net
2 . At 9:30 AM on Jun 22, 2008, Mark Bednarczyk wrote:
  Click to reply to this thread Reply

Re: jNetPcap: a java wrapper for libpcap and winpcap

Update: jNetPcap version 1.1 is released. Code clean up and provides support for Windows XP/Vista, Linux FC8 and Linux Debian 4.

http://jnetpcap.sf.net

Cheers,
mark...

thread.rss_message