I am looking for someone who has in depth knowledge of both C++ and C# to write a C# library around the Windows Filtering Platform APIs. I currently have a C# library to access the RRAS Packet Filtering APIs which needs to be verified for any potential memory leaks or marshalling errors.
This new library must be able to detect which operating system is currently running and call the appropriate Windows APIs (RRAS or WFP) as necessary.
The RRAS Packet Filtering APIs which are used by Windows Server 2003, Windows XP and prior can be found here:
<[url removed, login to view](v=[url removed, login to view]).aspx>.
The Windows Filtering Platform APIs which are used by Windows Server 2008, Windows Vista and later can be found here: <[url removed, login to view](v=[url removed, login to view]).aspx>.
The class must be named as follows: FilteringController
The required functions of the library are as follows:
AddFilter(IPAddress ip, Filter filter)
RemoveFilter(IPAddress ip, Filter filter)
The AddFilter function must create the appropriate interfaces and/or layers and/or filters as required per the APIs that match the filtering criteria.
The RemoveFilter function must delete all appropriate interfaces and/or layers and/or filters as required per the APIs that match the filtering criteria.
The Reset function must remove all filters and/or layers and/or interfaces and return the system to a non-filtered state.
The class must be disposable. Once the class is disposed, all managed or unmanaged resources must be released and all previously defined filters and/or layers and/or interfaces must be released, returning the system to a non-filtered state.
The Filter class must contain the following information:
TrafficDirection (enum, In or Out)
TrafficProtocol (enum, TCP, UDP or ICMP)
Other portions of the RRAS or WFP APIs do not need to be implemented. Only what is required to provide the needed packet filtering functionality.
The developper will be required to make changes and adapt as the code is developped and reviewed, although changes will be minor and mostly semantic.
The goal of this class is to provide a standardized, managed, interface to be able to drop packets in a specified direction with the specified protocol, source and destination information. This interface will also serve to hide the underlying operating system specific APIs and allow this class to be used within an application in the context of, for example, a firewall and maintain operating system independance and run on any platform which supports running a .NET application.