阅读:1337回复:1
发包问题,请强烈关注?
9X下的NDIS,我从应用层传数据到VXD的缓冲区中,将传来的数据组装成NDIS_PACKET后用原来的NdisSend发包,却返回一个,NDIS_STATUS_PENDING,请问这是怎么回事,
以下是我组装NDIS_PACKET的代码: NdisAllocatePacket(&nNdisStatus, &(PNDIS_PACKET)pTCPH_IPacket, pTCPH_AEReserved->m_hPacketPool); if( nNdisStatus != NDIS_STATUS_SUCCESS ) { dprintf( \"TCPH_DeferNdisSend: Could Not Allocate Packet\\n\" ); return nNdisStatus; } NdisAllocateBuffer( &nNdisStatus, &pTCPH_IBuffer, pTCPH_AEReserved->m_hBufferPool, pTCPH_IPacket->m_Reserved.m_IBuffer, FilterPacket->Size ); if( nNdisStatus != NDIS_STATUS_SUCCESS ) { dprintf( \"TCPH_DeferNdisSend: Could Not Allocate Buffer\\n\" ); TCPH_FreePacketAndBuffers( pTCPH_IPacket ); return nNdisStatus; } // Chain Our Buffer To Our Packet NdisChainBufferAtFront( (PNDIS_PACKET )pTCPH_IPacket, pTCPH_IBuffer ); pTCPH_IPacket->m_Reserved.m_pAdapterEntry = pAdapterEntry; // // Setup Private SendCompleteHandler // pTCPH_IPacket->m_Reserved.m_ISendCompleteHandler = TCPH_DeferredNdisISendCompleteHandler; //Write Buffer to Packet bReturn=0; UTIL_WriteBufToPacket(pTCPH_IPacket,FilterPacket->Buffer,FilterPacket->Size,0,&bReturn); if (FilterPacket->Size!=bReturn) return 0xffffffff; pNDISVXD_NdisSend(&nNdisStatus, pAdapterEntry->m_hNdisBindingHandle, pTCPH_IPacket ); |
|
最新喜欢:moqing...
|
沙发#
发布于:2001-12-29 17:29
上面问题已解决,还有一个问题是,我在什么时候释放自己组装的包?
|
|
|