IOCTL_NDISRD_GET_ADAPTER_MODE
This IOCTL returns
the redirection flags for the selected adapter. See details in
_ADAPTER_MODE structure description.
| Input
Buffer
|
_ADAPTER_MODE
|
| Input Buffer
Size
|
sizeof
(_ADAPTER_MODE)
|
| Output Buffer
|
_ADAPTER_MODE
|
| Output Buffer
Size
|
sizeof
(_ADAPTER_MODE)
|
Remarks:
For this call the
following field of ADAPTER_MODE must be initialized:
- ADAPTER_MODE.hAdapterHandle
must be set to the interface handle (obtained via call to
CNdisApi::GetTcpipBoundAdaptersInfo).
As a result of this
call driver fills the field of ADAPTER_MODE below:
- ADAPTER_MODE.dwFlags
is a combination of the XXX_LISTEN or XXX_TUNNEL flags:
- MSTCP_FLAG_SENT_TUNNEL - queue all
packets sent from MSTCP to network interface. Original packet
dropped.
- MSTCP_FLAG_RECV_TUNNEL - queue all
packets indicated by network interface to MSTCP. Original packet
dropped.
- MSTCP_FLAG_SENT_LISTEN - queue all
packets sent from MSTCP to network interface. Original packet goes
ahead.
- MSTCP_FLAG_RECV_LISTEN - queue all
packets indicated by network interface to MSTCP. Original packet
goes ahead.
Version 2.0 of
WinpkFilter has added three new flags:
- MSTCP_FLAG_FILTER_DIRECT - In
promiscuous mode TCP/IP stack receives all packets in the Ethernet
segment and replies with various ICMP packets, to prevent this set
this flag. All packets with destination MAC different from
FF-FF-FF-FF-FF-FF and network interface current MAC will never
reach MSTCP.
By default loopback
packets are passed to original MSTCP handlers without processing,
to change this behavior use the flags below:
- MSTCP_FLAG_LOOPBACK_FILTER - Pass
loopback packet for processing by helper driver routines
(redirected to user-mode if requested).
- MSTCP_FLAG_LOOPBACK_BLOCK -
Silently drop loopback packets, this flag is recommended for usage
in combination with promiscuous mode to avoid multiply processing
of one packet.
|