Hello.
I am making an NDIS hooking driver (according to vadim smirnov’s
technique), and have run into 2 problems:
- Replacing NdisSend() and NdisSendPackets() should be the same since
their prototypes contain NDIS_HANDLE MiniportAdapterContext, but my NDIS.H
has the following macros:
#define NdisSend(Status, NdisBindingHandle, Packet)
{
*(Status) =
(((PNDIS_OPEN_BLOCK)(NdisBindingHandle))->SendHandler)(
((PNDIS_OPEN_BLOCK)(NdisBindingHandle))->MacBindingHandle,
(Packet));
}
#define NdisSendPackets(NdisBindingHandle, PacketArray, NumberOfPackets)
{
(((PNDIS_OPEN_BLOCK)(NdisBindingHandle))->SendPacketsHandler)(
(PNDIS_OPEN_BLOCK)(NdisBindingHandle), (PacketArray),
(NumberOfPackets));
}
The NdisSend seems to receive a pointer to the miniport’s context area, as
the documentation says it does, but NdisSendPackets seems to receive a
pointer to the OPEN_BLOCK, instead of the miniport’s context area. Is my
NDIS.H corrupt? (I have a WORKING IM based on passthru which treats the
NdisSendPackets() NdisBindingHandle parameter as the context area)
- Saving NDIS_OPEN_BLOCKs allows me to search for ProtocolBindingContext
in order to tell which protocol needs to be called inside ReceiveXXX
functions, but I do not know where in the OPEN_BLOCK, the
MiniportAdapterContext that I get from the SendXXX functions is. (and, are
the context variables the only method to get to the originator?)
Any help would be greatly appreciated. Thanks.
Yoav.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com