RockSaw Raw Socket Library

About RockSaw

Gear icon RockSaw is a simple API for performing network I/O with IPv4 and IPv6 raw sockets in Java. It has been deployed on tens of thousands of computing nodes as part of custom enterprise applications.

The latest version of this software is now maintained by Savarese Software Research Corporation. You can find the new project page at

The current version of RockSaw compiles on Linux, Win32 with Cygwin/MinGW/Winsock or Visual C++, Solaris 8/9/10, FreeBSD 5.3, and Darwin/Mac OS X. It should compile on other POSIX systems using the GNU tool chain. Configuration of the JNI build via autoconf may be added somewhere down the line. There just are not enough platform-specific cases in the native code to warrant it right now, but the GNU Makefile is accumulating if blocks.[1]

The example program requires at least VServ TCP/IP version 0.7.x to compile because it uses the ICMPEchoPacket class.


ByteSphere Technologies graciously funded IPv6 support. Please check out their network management and fault management products.

Commercial support is provided by Savarese Software Research Corporation


RockSaw is released under the Apache License 2.0.


VersionSourceBinariesLicenseChangesAPI Documentation
0.6.2rocksaw-0.6.2-src.tar.gzrocksaw-0.6.2-bin.tar.gzLICENSECHANGESRockSaw 0.6.2 API

On most operating systems, you must have root access or administrative privileges to use raw sockets.

The API is at a fairly crude stage of development (i.e., the minimum required to do the job it needed to do), but is functional. Don't hesitate to submit patches (please use unified diff format) that enhance the functionality.

Additional Resources

Frequently Asked QuestionsRockSaw FAQ
Java Pro May 2005Implement Raw Sockets
IETF RFC 792Internet Control Message Protocol

[1] The platform distinctions currently break down into POSIX and Win32/Winsock, handled by an ifdef and GNU Makefile if blocks to support Cygwin/MinGW and Darwin. A separate Makefile.win32 is used for compilation with Visual C++.