阅读:1357回复:1
PtReceive里组包正确,一到NdisMIndicateReceivePacket时就Page Fault
我在2k DDK下参照胡大侠的代码修改了PtReceive,我用softice跟踪
包每次都走PacketSize<=LookAheadBufferSize这里, 我把headbuffer和lookaheadbuffer里的东西打出来,在 NdisMIndicateRecievePacket之前把MyPacket里的 内容打出来。 发现组包完全正确,但一运行NdisMIndicateRecievePacket就PageFault; bufferpool我是PtBindAdapter里在分配packetpool后这样分配的 NdisAllocateBufferPool(Status,&pAdapt->SendBufferPoolHandle,1); if (*Status != NDIS_STATUS_SUCCESS) { break; } //Allocate a buffer pool for receives. NdisAllocateBufferPool(Status,&pAdapt->RecvBufferPoolHandle,1); if (*Status != NDIS_STATUS_SUCCESS) { break; } 释放是在MpHalt里在释放PacketPool之前这样释放的: if (pAdapt->RecvBufferPoolHandle != NULL) { // // Free the packet pool that is used to indicate receives // NdisFreeBufferPool(pAdapt->RecvBufferPoolHandle); pAdapt->RecvBufferPoolHandle = NULL; } if (pAdapt->SendBufferPoolHandle != NULL) { // // Free the packet pool that is used to send packets below // NdisFreeBufferPool(pAdapt->SendBufferPoolHandle); pAdapt->SendBufferPoolHandle = NULL; } 可是就是无法把包送上去。请大家帮帮忙! |
|
沙发#
发布于:2003-01-17 21:53
自己仔细看程序吧,肯定是你自己处理的问题。
|
|
|