[Winpcap-users] Plugin Framework Patch
dustin at dustinj.us
Wed Feb 23 07:28:55 PST 2011
I’m not sure if there is an official way to submit patches for
WinPcap, but I have uploaded a patch to the following location:
This patch adds a plugin framework to WinPcap that allows the
authors to easily extend WinPcap to support new packet sources. The
primary target of this framework is manufacturers or authors of new
devices or classes of devices.
To create a plugin one must simply create a DLL that exposes at
least the required functions (outlined in the included documentation)
and install the DLL with the name ‘winpcap_<plugin_name>.dll’ into the
system directory. All available plugins are dynamically discovered
and imported during the device discovery process.
A sample plugin is included that creates fictitious devices and
device data for demonstration purposes.
Plugin Framework Highlights:
1. The plugin API is completely abstracted from pcap internals.
a. All pcap functions point to framework-local functions that
relay the request to the plugin.
b. All data structures are converted to/from pcap internal
structures to those exported in the plugin API.
2. Optional functions can be handled by the framework if the
plugin does not implement them. For example, if a plugin chooses not
to allow configurable BPF expressions the plugin framework will
automatically handle packet filtering in user-mode.
3. A simple mechanism for plugin identification and version
reporting has been implemented to allow for controlled API growth.
1. Full documentation for the plugin API is included in the patch
and will get generated with the normal WinPcap documentation.
2. For convenience the documentation can be found here
Please send any suggestions or comments back to this list or directly
to me, Dustin at Dustinj.us. I look forward to hearing from you!
More information about the Winpcap-users