阅读:1686回复:1
请教高手,PtReceivePacket问题
我是在PtReceivePacket做收到封包的NAT,如下面处理:
#ifdef NDIS51 // // Check if we can reuse the same packet for indicating up. // See also: PtReceive(). // (VOID)NdisIMGetCurrentPacketStack(Packet, &Remaining); DBGPRINT(("==>PtReceivePacket remaining is %d", Remaining)); if (Remaining) { // // We can reuse "Packet". Indicate it up and be done with it. // Status = NDIS_GET_PACKET_STATUS(Packet); if (Status == NDIS_STATUS_RESOURCES) { PtQueueReceivedPacket(pAdapt, Packet, TRUE); } else { PtQueueReceivedPacket(pAdapt, Packet, FALSE); } return((Status != NDIS_STATUS_RESOURCES) ? 1 : 0); } #endif // NDIS51 // // Get a packet off the pool and indicate that up // NdisDprAllocatePacket(&Status, &MyPacket, pAdapt->RecvPacketPoolHandle); if (Status == NDIS_STATUS_SUCCESS) { PRECV_RSVD RecvRsvd; RecvRsvd = (PRECV_RSVD)(MyPacket->MiniportReserved); RecvRsvd->OriginalPkt = Packet; 。。。=》自己的NAT 但是,总是if (Remaining)为1退出执行了,有啥方法不,多谢指教啊 |
|
沙发#
发布于:2014-11-07 15:26
或者如何把reuse注释掉?
|
|