[Winpcap-users] Plugin Framework Patch

Dustin Johnson dustin at dustinj.us
Wed Feb 23 07:28:55 PST 2011


WinPcap Users,

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:
                http://www.dustinj.us/winpcap/winpcap_plugin_patch_v1.zip
                MD5: 624e5c61da63485ba399a0fde57ab379
                SHA1: 09910ca01236e69bdd61d837f12be2f27752811d

Overview:
    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.

Documentation:
    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
(temporarily): http://www.dustinj.us/winpcap/docs/html/pcap-plugin-interface_8h.html

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!

Cheers,
   DJ


More information about the Winpcap-users mailing list