72 Commits
Author SHA1 Message Date
StalkR 90396ffa2b windivert.html: fix 6.11 title: format not parse 2022-02-15 19:35:18 +01:00
basil00 a1173fe08f Coalesce filter interpreter implementations.
Replace the dual kernel/user-mode filter
interpreters with a single shared implementation.
2019-08-17 09:31:46 +08:00
basil00 a240329323 Add "fragment" to filter language.
True if the packet is an IPv4/IPv6 fragment.
2019-08-15 09:08:46 +08:00
basil00 194d9afa1e Towards WinDivert version 2.1 release.
- inbounds/outbound now work for SOCKET layer.
- passthru.exe now uses MTU_MAX to prevent 122
  errors.
- Further header parsing code hardening.
- Fix bug where Reserved2 was not zeroed.
2019-08-04 08:11:43 +08:00
basil00 69e4edade7 Add new WINDIVERT_FLAG_FRAGMENTS flag (fix #191).
This flag only affects inbound packets at the
WINDIVERT_LAYER_NETWORK layer.

If set, the handle will capture IP fragments,
but not reassembled IP packets.

If unset (the default), the handle will capture
reassembled IP packets, but not IP fragments.
2019-08-02 08:32:50 +08:00
basil00 02541ce1da WinDivert 2.0.1-rc bugfix release. 2019-07-06 08:23:06 +08:00
basil00 e306d0058b WinDivert filter language improvements.
- Add "length" for total packet length.
- Add "timestamp" for timestamp filtering.
- All filter language numbers are now signed.
- Add new macros: TRUE, FALSE, TCP, UDP, ICMP &
  ICMPV6.
- Future-proof the WINDIVERT_FILTER struct.
2019-03-15 08:01:10 +08:00
basil00 d29688ea83 Redesign the WinDivert SOCKET layer.
- Socket (& flow) events are now associated with
  a endpointId/parentEndpointId pair that allows
  the tracking of socket operations.
- A single socket CLOSE event replaces the UNBIND
  and DISCONNECT events.
- A new flag addr.Sniffed indicates if the event
  was sniffed or not.  Some events (CLOSE) are
  always sniffed, regardless of the flags.
- All filter language numbers are now 128bit.
- socketdump.exe can now optionally block events.
2019-03-13 08:33:12 +08:00
basil00 8baeda9ec7 WinDivert documentation tweaks. 2019-03-06 09:34:07 +08:00
basil00 8fcb4313b6 WinDivert 2.0 API, service & documentation fixes.
- Make WinDivertRecv() and WinDivertSend() arg
  ordering match the Ex versions.
- Put the WinDivertHelperParsePacket() protocol
  arg after the IP headers.
- WinDivert service handling is now protected by
  a mutex.
- Debug the "uninstall" command for windivertctl.
  It can now uninstall the WinDivert driver &
  not leave the WinDivert service in a "pending"
  state.
- Document WinDivert performance tips.
2019-03-04 08:42:34 +08:00
basil00 bb67daf2da Update WinDivert documentation. 2019-03-02 08:12:51 +08:00
basil00 eb75e63431 Add WINDIVERT_PARAM_VERSION_* parameters.
This makes it possible for the user application
to determine the exact driver version.

Also update documentation and tests.
2019-02-28 09:23:08 +08:00
basil00 7fa04945c0 Various WinDivert improvements.
- Add UNBIND/DISCONNECT events to the SOCKET
  layer.  These events can only be sniffed.
- Remove the RECV_PARTIAL flag.  The user
  application can just ignore the error code
  instead.
- WINDIVERT_ADDRESS is now 64bytes.  Some extra
  padding added for future-proofing.
- Ignore SOCKET-layer REAUTHORIZE.
- The REFLECT layer returns the filter object
  directly (no IPv4 "pseudo" packet).
2019-02-25 09:15:33 +08:00
basil00 32c5aa90f4 Redesign the WinDivert IOCTL interface.
The idea is to make future versions of the
WinDivert DLL compatible with older SYS and vice
versa.

The interface has also been streamlined so less
system calls are required when the handle is first
opened.
2019-02-23 09:38:18 +08:00
basil00 b7860e3ff5 Add a new WinDivertHelperDecrementTTL() function.
This function decrements the ip.TTL or
ipv6.HopLimit field.  For ipv4, it also updates
the checksum.

Also:
- Make WinDivertHelperParsePacket() work on a
  single packet unless the pNext parameters are
  provided.
- Update documentation.
2019-02-20 07:57:40 +08:00
basil00 d38563a31f More minor API improvements.
- Revert batching for
  WinDivertHelperCalcChecksums().
  All non-ParsePacket helper functions support a
  single packet only.  This is much simpler.
- WinDivertHelperCalcChecksums() now returns a
  simple BOOL.
- More WinDivertHelper*() functions set the error
  code.
2019-02-18 08:44:16 +08:00
basil00 42bf883096 Update WinDivert documentation.
- Also partly modernize the html.
2019-02-17 09:22:08 +08:00
basil00 ed90600d1d Update WinDivert documentation. 2019-02-16 09:47:04 +08:00
basil00 805661d6f3 Update WinDivert documentation. 2019-02-15 08:48:14 +08:00
basil00 8601f07ce1 Update WinDivert documentation. 2019-02-14 09:16:41 +08:00
basil00 ea366e80c2 Update WinDivert documentation. 2019-02-13 09:06:07 +08:00
basil00 6a0dd00e39 Update WinDivert documentation. 2019-02-12 08:14:00 +08:00
basil00 1496a0fe06 Document WinDivert layers 2019-02-11 10:13:52 +08:00
basil00 5c9b473873 Document WinDivert filter language fields. 2019-01-29 08:36:45 +08:00
basil00 fa9229820c Document WinDivertHelperCompileFilter(). 2019-01-27 08:50:41 +08:00
basil00 74b806d042 Document WinDivertShutdown() 2019-01-25 10:06:10 +08:00
basil00 8ff3c86330 Version tweaks. 2018-11-15 08:24:46 +08:00
basil00 6250568974 Add a new FLOW layer into WinDivert.
Adds a new WINDIVERT_LAYER_FLOW layer that can:
- Track when flows are established
- Track when existing flows are deleted
2018-09-30 09:07:16 +08:00
basil00 e82552153b Optimize pseudo checksum "calculation"
Since pseudo checksums can now be arbitrary
values, the WinDivertHelperCalcChecksums function
no longer attempts to calculate the pseudo-
header checksum.
2018-07-19 09:16:15 +08:00
basil00 6ac22c1650 Retire MSVC-2012 and (non-driver) WDDK builds.
The new MINGW build should be compatible with all
major compilers, including Visual Studio 201X.
2018-07-02 19:23:49 +08:00
basil00 ae25f27469 Fix #131 2018-05-23 18:14:36 +08:00
basil00 1543e958e6 Dual-license WinDivert under the LGPLv3 and GPLv2.
This allows projects that are strictly "GPLv2
only" to use WinDivert without licensing issues.
See the FSF's compatibility matrix here:
https://www.gnu.org/licenses/gpl-faq.en.html

This change does not affect existing projects
that can continue to use the LGPLv3 as before.

Also, bump the WinDivert version to 1.4.1.
2018-04-04 18:41:45 +08:00
basil00 af5cd69883 Document the 1753 error. 2017-11-27 06:45:18 +08:00
basil00 884622c5c7 Update documentation. 2017-11-18 15:38:15 +08:00
basil00 bbf6a34aa6 Add Loopback and Timestamp fields to addresses.
- Loopback=1 for loopback packets, 0 otherwise.
- Timestamp is the time when packet captured.
2017-11-05 12:12:19 +08:00
basil00 60c3a26e1c Documentation improvements. 2017-11-01 20:56:51 +08:00
basil00 4c4f586f4d Add WINDIVERT_FLAG_DEBUG for WinDivertOpen() 2017-10-31 10:53:06 +08:00
basil00 b2fd7eb891 Bump version to 1.4 2017-10-22 21:07:06 +08:00
basil00 bd4265897a Increase packet queue limits.
Queued packets use PagedPool, so increase limits:
- Queue length (min=16,max=16384,default=2048)
- Queue time (min=20,max=8000,default=1000ms)
2017-10-21 18:13:58 +08:00
clmul 751ed975e3 Fix documentation, the default packet queue length is 1024 2017-10-19 10:41:23 +08:00
basil00 910a2e3050 Add new WINDIVERT_PARAM_QUEUE_SIZE parameter.
Controls the number of bytes used by the packet queue.
2017-10-01 15:33:58 +08:00
basil00 7b7d92cd26 Bump version to WinDivert 1.3.0
This prevents the old 1.2 driver from being used by new 1.3 software.

Also, clean up the driver code.
2017-09-24 15:48:38 +08:00
basil00 7cfc3e2e72 Further integrate the streamdump sample.
Untested.
2016-01-19 10:57:47 +08:00
basil00 609ab63594 Add a NO_REPLACE for WinDivertHelperCalcChecksums
The WINDIVERT_HELPER_NO_REPLACE flag tells WinDivertHelperCalcChecksums not to
recalculate and replace non-zero checksum fields.  This is useful for
reconstructing the checksums for packets returned by WinDivertRecv(), where
all non-zero checksum fields are already valid.  This allows WinDivert1.2
to achieve similar efficiency as WinDivert1.1, where checksums were calculated
by the driver.

Note that for modified packets, the WINDIVERT_HELPER_NO_REPLACE flag should
not be used, as all checksums need to be recalculated from scratch anyway.
2015-07-25 13:24:28 +08:00
basil00 82fb0e704c Update documentation.
Add notes about zero-checksums and known issues.
2015-07-25 12:40:03 +08:00
basil00 7666386af2 Update the WinDivert documentation for version 1.2 2015-07-18 10:46:20 +08:00
basil00 90da7a92c7 - Fix documentation; ipv6 extension headers are now supported. 2014-11-29 13:22:52 +08:00
basil00 232459cc11 - Document the WinDivertHelperParseIPvXAddress() byte/word orderings. 2014-11-18 00:02:47 +08:00
basil00 08fef993ba - Update documentation to reflect the new installation instructions. 2013-12-12 22:55:19 +08:00
basil00 f9f11c0e23 - Documentation tweaks and improvements. 2013-11-27 23:49:00 +08:00