Hi!
i have a question: i tried to delay receive d packets too…as in
SendPackets i created a newfunction that handles received packets…
driver not crash, i see debug message so timer works too…but the problem is
that received packets i think are not delivered to the next level, because
connection go closed when i start driver…i think the problem is the value
that handle function must return after the call to timer
INT PtReceivePacketEx(IN NDIS_HANDLE ProtocolBindingContext,IN PNDIS_PACKET
Packet){
PNDIS_TIMER timerRec = (PNDIS_TIMER)ExAllocatePool(NonPagedPool,
sizeof(NDIS_TIMER));
struct strutturaRec *strutRec = NULL;
UINT delayRec = 80;
if (timerRec == NULL){
return 0;}
strutRec = ExAllocatePool(NonPagedPool, sizeof(struct strutturaRec));
if (strutRec == NULL){
ExFreePool(timerRec);
return 0;}
strutRec->pack=Packet;
strutRec->pad=ProtocolBindingContext;
strutRec->timer = timerRec;
NdisInitializeTimer(timerRec,pippoRec,strutRec);
DbgPrint(“inizioritardoRec”);
NdisSetTimer(timerRec,delayRec);
DbgPrint(“DoporitardoRec”);
return 0;
}
i return 0 to tell the driver that i finish with that packet, maybe i must
return a non zero value? but if i do this, driver will enter in a cycle
waiting a zero value??
thanks a lot…
Francesco