Package org.jnetpcap.winpcap

WinPcap extensions to libpcap avialable on a limited set of platforms.

See:
          Description

Class Summary
WinPcap Class peered with native pcap_t structure providing WinPcap specific extensions to libpcap library.
WinPcapRmtAuth Class peered with native pcap_rmtauth structure.
WinPcapSamp Class peered with native pcap_samp structure.
WinPcapSendQueue Class peered with native pcap_send_queue structure.
WinPcapStat Class peered with native pcap_stat structure providing all available extensions part of WinPcap extensions.
 

Package org.jnetpcap.winpcap Description

WinPcap extensions to libpcap avialable on a limited set of platforms. This package adds additional functionality provided by WinPcap library widely available on win32 based platforms. These extensions are optional and are not available on unix based platforms.

Checking for WinPcap extension availability

Before you utilize any of the extension in this package, the programmer must first check if the extensions are available on this particular platform. To do that use WinPcap.isSupported() method which returns a boolean value. A return value of true means that the extensions are supported and available, while a value of false means they are not. All methods will throw an PcapExtensionNotAvailableException if used and the extensions are not supported on this particular platform. Therefore it is essential to always perform this check before relying on these extensions.

Main WinPcap Extension Highlights

WinPcap improves greatly on libpcap. Since WinPcap is more then just a libbrary (its actually a set of kernel drivers as well), it kind of holds keys to many key resources within the native platform it was designed to run on.

Main features:

WinPcap Source String Syntax

WinPcap introduced a URI style syntax for addressing local and remote resources using a single open call, called a source string . The source string is used for both open and findAllDevsEx methods. A utility method is provided to help you build a source string from individual components, createSrcStr(StringBuilder, int, String, String, String, StringBuilder) . The method does take quiet a few parameters, but most of them are optional and null can be supplied instead. With the utility method you can build source strings based on user interactions. The result is stored in the first StringBuilder which is essentially a char buffer.

Here is a listing of various source string formats allowed by the open method:

The formats allowed by findAllDevsEx method are:

And some examples:

(Credit for most doc comments: WinPcap manual)