Commit Graph
63 Commits
Author SHA1 Message Date
basil00 dce8ebd459 - If driver installation fails, then also attempt to delete the service. This
should fix some confusing errors caused by a zombie WinDivert service.
2013-10-06 15:15:59 +08:00
basil00 8ecfc1e52b - Add documentation for WinDivertRecvEx() and WinDivertSendEx(). 2013-10-05 13:03:33 +08:00
basil00 3eed5aca39 - Writes (via WinDivertSend()) are now copied before being injected.
This ensures that the user program does not clobber the buffer before the
  injection is complete.
- Update the changelog.
2013-09-28 23:25:51 +08:00
basil00 63b72288d5 - Fix function names in README. 2013-09-24 14:29:40 +08:00
basil00 fd9d8eb0c3 - Documentation tweaks, including comments in (1275) errors. 2013-09-24 14:15:28 +08:00
basil00 a59c70ae0a - WinDivert now queues copies of packets, rather than simply referencing
the original packet.  The former turns out to be problematic, since there is
  no guarantee that something else (e.g. another callout driver)
  modifies/overwrites the packet data whilst it is in the queue.  Copying the
  data is not ideal either, but seems to be the only way to ensure the packet
  is not changed later.
2013-09-21 10:43:42 +08:00
basil00 0b15b26d45 - (Missing from last commit) remove the PASSTHRU flag from windivert_device.h 2013-09-10 17:58:08 +08:00
basil00 835d604d4e - Remove the PASSTHRU flag; The same result can be achieved with a "false"
filter.
2013-09-10 17:52:43 +08:00
basil00 bbd3b0e9e9 - Update documentation to version 1.1 API 2013-08-16 22:50:00 +08:00
basil00 09b7cd45a2 - Add support for the legacy WinDivert API. 2013-07-26 18:01:49 +08:00
basil00 dc149f281b - Fix README out-of-date reference to VS2010. 2013-07-17 11:55:36 +08:00
basil00 38f1f3a16d - Towards WinDivert 1.1:
* Re-brand "DIVERT" to "WINDIVERT" throughout the code-base.
* New flags:
  > WINDIVERT_FLAG_PASSTHRU: Do not drop nor capture packets.  Useful
    for injection-only handles.
  > WINDIVERT_FLAG_NO_CHECKSUM: Do not guarantee that diverted packets
    have a correct checksum.
  NOTE: Not yet tested!
* New default values and limits for various WinDivert parameters,
  including WINDIVERT_PARAM_QUEUE_LEN, WINDIVERT_PARAM_QUEUE_TIME, and
  the maximum filter length.
* New extended WinDivert functions that support asynchronous I/O:
  > WinDivertRecvEx(..)
  > WinDivertSendEx(..)
  NOTE: Not yet tested!
* The WinDivert driver now services reads (receives) out-of-band.
  The motivation is because WFP callouts are run at DISPATCH_LEVEL, so
  we should not be doing expensive work in the ClassifyFn.  This is also
  the same reason why the filter length has been restricted.
2013-06-30 15:58:21 +08:00
basil00 7f70f9a575 - Fix FwpsInjectionHandleCreate flags for NETWORK and FORWARD layers.
- Strip debug symbols from WinDivert.dll for MinGW builds.
2013-06-26 13:44:56 +08:00
basil00 e0e1feabad - Update support to Visual Studio 2012. 2013-06-25 23:22:41 +08:00
basil00 5481e6edd5 - New version 1.0.5 2013-06-25 19:58:13 +08:00
basil00 3d7d3e4fd4 - Documentation improvements. 2013-06-20 18:31:32 +08:00
basil00 ed56b1871b - Change filter action type from UNKNOWN to TERMINATING. 2013-06-13 13:02:34 +08:00
basil00 437d64d9e3 - Fix issue #6:
* Use type 0 for FwpsInjectionHandleCreate0 for the FORWARD layer.
* Use FWPS_FIELD_IPFORWARD_V{4|6}_DESTINATION_INTERFACE_INDEX to get addr->IfIdx
* Replace FWP_ACTION_CONTINUE with FWP_ACTION_PERMIT.
2013-06-13 12:57:59 +08:00
basil00 9687d945e6 - Strip MinGW .exe files. 2013-06-04 00:01:29 +08:00
basil00 eb667e4c32 - New version 1.0.4
- Documentation tweaks
- Use a newer version of MinGW
- Use signed driver in release.
2013-06-03 18:32:30 +08:00
basil00 6ef0028edd - Fix stray `;' in code sample (issue #5). 2013-05-02 11:09:00 +08:00
basil00 7636b0acc2 - Fix MinGW wcscpy_s() workaround. 2013-04-13 14:46:45 +08:00
basil00 59ef023fb1 - New version 1.0.3 2013-04-07 17:53:29 +08:00
basil00 6d8d0b3134 - Improved version stamping. 2013-04-07 11:27:21 +08:00
basil00 3b486d49af - Code clean up [credit: GliderPro] 2013-04-07 10:42:08 +08:00
basil00 3d881423d6 - Replace (110) errors with more meaningful error codes.
- Add two new helper API functions: DivertHelperParseIPv?Addr(..)
- Document these new features.
2013-04-06 23:41:00 +08:00
basil00 e34a69abc6 Merge branch 'master' of github.com:basil00/Divert 2013-04-02 12:21:31 +08:00
basil00 8cc8299f26 - Fix mis-placed decli bug. [credit GliderPro] 2013-04-02 12:14:45 +08:00
basil00 6b6901278e Merge pull request #3 from azerton/master
Compiling in VS2012
2013-03-07 19:20:58 -08:00
Daan Raman 0266a1048f Type error compiling examples on VS2012
Casting the divert layer argument for the DivertOpen function resolves
a type error in VS2012.
2013-03-07 11:40:13 +01:00
basil00 d9e1d687cc - Fix the implementation of DivertParseIPv6Address() 2013-01-31 23:48:19 +08:00
basil00 89bf2fb622 - New VERSION 1.0.2
- Add a CHANGELOG
- Add note to webfilter.c
- CHANGELOG and VERSION now included in release packages.
2012-12-25 18:26:23 +08:00
basil00 700f91e7fb - Remove copyright notice (not really code). 2012-10-28 02:22:41 +08:00
basil00 091e3025ce - Change WinDivert device permission: Administrator now required for any
device access.
2012-10-28 02:21:10 +08:00
basil00 a0e50dfd79 - add a VERSION file 2012-10-26 14:12:34 +08:00
basil00 3a59af9f25 - Ignore ERROR_INVALID_PARAMETER from pfnWdfPostDeviceInstall() as these
errors appear to be benign.
2012-10-24 22:46:13 +08:00
basil00 898ea780e2 - Fix typo 2012-10-24 21:58:43 +08:00
basil00 934019aec5 - In divert_filter_compile(), do not use the stack for filter0; instead
allocate from the heap.  Stacks are small (12Kb on x86).
2012-10-24 21:30:27 +08:00
basil00 5ce2f868d6 - Expand documentation regarding test signing the WinDivert driver.
(this was causing some confusion).
2012-06-01 23:14:46 +08:00
basil00 498fbaab98 - MSVC build system now supports x64
- passthru.c now compiles on all 3 compilers.
2012-03-31 18:32:01 +08:00
basil00 53b45c4e8c - Complete build-system revamp.
* Updated sources files to target install\WDDK
  * Remove wdfinstaller.h dependency from dll/divert.dll
  * Fix passthru error in newer compilers.
2012-03-27 17:39:46 +08:00
basil00 47e2764c20 - Fix typo 2012-03-26 22:32:47 +08:00
basil00 7cb25b8a1e - Added build-system documentation 2012-03-26 22:31:21 +08:00
basil00 9b132946de - Add WDDK build script.
- Add documentation for new build system.
2012-03-26 22:28:48 +08:00
basil00 6dfed99c28 Build system revamp:
- VS2010 support added via msvc-build.bat and *.vcxproj files
- MinGW now also builds example programs
- Documentation and examples are now included in the binary packages
2012-03-26 21:55:55 +08:00
basil00 f9b1619adb - Fix bad priority in the webfilter sample.
- Minor comments tweaks.
2012-02-22 11:00:05 +08:00
basil00 13b2ab4418 ***MAJOR UPDATE***
Name and version:

* Now officially called 'WinDivert'
* Now officially working towards a version 1.0 release

New features:

* WinDivert now supports a packet-sniffing mode.  This mode merely
  copies packets, and does not drop the original.
* WinDivert now also supports a packet-dropping mode.
* WinDivert now supports filter priorities.
* WinDivert now supports a forwarded packet layer (WARNING: untested).
* WinDivert now supports get/set parameters such as packet queue length and
  time.
* WinDivert now supports larger filters (but use at own risk).
* WinDivert now uninstalls the driver on program exit/library unload
* Different versions of WinDivert can co-exist on the same machine
  (WARNING: untested, as there is currently only one version).

New License:

* WinDivert is now LGPL.  This is less restrictive than the GPL so WinDivert
  can be linked to by commercial software (under the terms of the LGPL
  license).

Technical:

* Cleaner IOCTL interface.
* Cleaner driver implementation.
* Thread local events in WinDivert.dll
* Many minor tweaks and fixes.
2012-02-21 23:18:45 +08:00
basil00 1d2b3a4649 - Fix a bug caused by missing FILE_FLAG_OVERLAPPED flag. 2012-02-08 23:46:22 +08:00
basil00 27b6f47de7 - Now include the divert.lib files in the MSVC release package. 2012-02-06 12:54:33 +08:00
basil00 ec6ef9e0ce - Fix bug where NDIS pool was freed before a packet injection was complete,
possibly resulting in a BSOD.
2012-02-06 12:50:31 +08:00