ok i did…but now i have another problem:
i set as packethandler my function newfunction
VOID newfunction(IN NDIS_HANDLE MiniportAdapterContext,IN PPNDIS_PACKET
PacketArray,IN UINT NumberOfPackets
){
PADAPT pAdapt = (PADAPT)MiniportAdapterContext;
NDIS_STATUS Status;
UINT i;
for (i = 0; i < NumberOfPackets; i++){
PNDIS_TIMER timer = (PNDIS_TIMER)ExAllocatePool(NonPagedPool,
sizeof(NDIS_TIMER));
PNDIS_PACKET Packet = PacketArray[i];
UINT delay = 80;
struct struttura *strut = ExAllocatePool(NonPagedPool, sizeof(struct
struttura));
strut->hand=MiniportAdapterContext;
strut->pack=Packet;
strut->pad=pAdapt;
NdisInitializeTimer(timer,pippo,strut);
DbgPrint(“inizioritardo”);
NdisSetTimer(timer,delay);
DbgPrint(“Doporitardo”);
NdisMSendComplete(ADAPT_MINIPORT_HANDLE(pAdapt),Packet,NDIS_STATUS_SUCCESS);
// Lying Send…
}
}
and pippo function is
VOID pippo(
IN PVOID SystemSpecific1,
IN PVOID FunctionContext,
IN PVOID SystemSpecific2,
IN PVOID SystemSpecific3
){
struct struttura *punt= FunctionContext;
MPSendPacketsEx(punt->hand,punt->pack,punt->pad); —>the third parameter
is different from the original numberofpackets
DbgPrint(“ritardo avvenuto”);
}
in the MPSendPacketsEx i deleted every call to NdisMSendComplete and the
for cycle that i added in newfunction…when i install the driver there is
an error IRQL NOT LESS OR EQUAL…with stop 00000A
maybe there is a memory reference wrong or i can t call MPSendPackets in
that way?? You told me to add to my queue all packets and then delivery
them…but where i must create that queue structure?
thanks!!!
francesco
Da: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Per conto di Francesco Tabbita
(IT)
Inviato: venerd? 3 febbraio 2006 11.47
A: Windows System Software Devs Interest List
Oggetto: R: [ntdev] NDIS driver problem
hi!
i must create a function that works before MPSendPackets…so i set as
packethandler a new function, called newfunct…in this i create a NDIS
timer…so when the timer expires it calls the function
VOID pippo(
IN PVOID SystemSpecific1,
IN PVOID FunctionContext,
IN PVOID SystemSpecific2,
IN PVOID SystemSpecific3
)
in this function i want to call the original MPSendPackets, but this needs
as parameters :
MPSendPackets(
IN NDIS_HANDLE MiniportAdapterContext,
IN PPNDIS_PACKET PacketArray,
IN UINT NumberOfPackets
)
How can i pass to pippo these parameters? they are in newfunct…
thanks!
Da: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Per conto di Beyers Cronje
Inviato: gioved? 2 febbraio 2006 16.58
A: Windows System Software Devs Interest List
Oggetto: Re: [ntdev] NDIS driver problem
Francesco,
Try using an ndis timer, copy incoming packets to your own queue, and
dequeue when timer expires.
Beyers
On 2/2/06, Infinito < xxxxx@infinito.it> wrote:
Hi to all! i have a problem: i must create a driver (starting from
passthruex part 2 sample from ndis.com
)
that adds a delay to some packets (in function of their src and dst port).
i know only these two functions to add delay:
KeWaitForSingleObject
KeDelayExecutionThread
that run only at irq level = passive_level…
So functions in passthruex run at dispatch_level so i can use them because s
ystem crash.
My idea is to buffer packets that i must delay in a some kind of structur an
d give anyway the succes response, like the packet was sent…then i deliver
packets in the buffer after the delay wanted…
can it works? the problem is that i don t know how to call a passive_level f
unction from a driver function…
thanks!
p.s. if i add these function in working sample passthruex part 2 there is an
error like: attempt from a DPC routine to a waiting operation
… stop 0…B8
the error with dpc is connected to irq level or is an other problem?
thanks
francesco
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: unknown lmsubst tag argument: ‘’ To unsubscribe send a blank email
to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com