October updates

Before we begin, I tried an iPhone blogger app and it deleted the contents of the last post (September updates) as well as all the titles from all of the previous posts. Sorry about that, I couldn't get the full text of the Sept. update version back.

Domain and package names

I was unable to acquire the org.jnet.* domain name. So the project was refactored back to org.jnetpcap.* domain, which Sly Technologies owns. It never have been under the org.jnet domain in the first place, but this was a unpublished what if scenerio. Everything is back to normal.

Maven pom.xml groupId is set to 'org.jnetpcap' and artivactId 'jnetpcap'. It will be published under these settings to maven2 repository.

Initial version is slated to be 'jnetpcap-2.0.0-preview.1'. It will continue to be released as previews, until the foreign function features become permanent in java. This should hopefully be in Java 20 or in Java 21 LTS at the latest.

API Progress

The API implementation is complete and going through testing. All of the libpcap native functions have a jNetPcap counter part through libpcap version 1.10.

Unix and Linux

Unix and Linux specific calls get their own Pcap subclass. You can use OS specific factories like so 'UnixPcap pcap = UnixPcap.openOffline()' or 'LinuxPcap pcap = LinuxPcap.openOffline()'.

On Windows

Two Microsoft Windows specific Pcap subclasses are provide, WinPcap and Npcap classes. Just like before, we use a factory method to create the platform specific instance such as 'WinPcap pcap = WinPcap.openOffline()' or 'Npcap pcap = Npcap.openOffline()' to have access to window's specific function calls such as WinPcap.sendQueueTransmit(), Npcap.sendQueueTransmit(), WinPcap.wsockinit() etc...

Fine grade versioning

For fine grade control of the version of Pcap class used, you can use the the versioned subclasses which provide all of the implementations up to that particular version. For example 'Pcap0_9 pcap = Pcap0_9.openOffline()' will instantiate Pcap0_9 class and not force initialization and loading of native function symbols for any higher version libpcap library.

The version management in jNetPcap is extensive and thoroughly designed. Each Pcap subclass provides a static method isSupported() to allow checks at runtime and adaptation to runtime libpcap version. For example Pcap1_5.isSupported(),  Npcap.isSupported(), Linux.isSupported(), etc...

Lastly Javadocs

I have spent a lot of time on javadocs, writing and carrying over descriptions form libpcap man pages where appropriate. The documentation part is pretty thorough for those not familiar with libpcap usage or its intricacies. For those well familiar with libpcap API, jNetPcap API will be a breeze as native API call names are preserved  and only modified to adapt to java naming conversions for the most part, with some minor exceptions.

Lastly, I'm working on upload to github and publishing to maven2 repository right now.

- Mark...

Comments

Popular posts from this blog

jnetpcap-2.0.0-preview.1 imported to github

August update