📄 send.c
字号:
#include <ndis.h>
#include "rtsnt_sw.h"
/*++
Routine Description:
The Rtl8139Send request instructs a driver to transmit packets through
the adapter onto the medium.
Arguments:
MiniportAdapterContext - Context registered with the wrapper, really
a pointer to the adapter.
PacketArray - A pointer to a descriptor for the packet that is to be
transmitted.
NumberOfPackets
--*/
VOID
RTFast_Sends(
IN NDIS_HANDLE MiniportAdapterContext,
IN PPNDIS_PACKET PacketArray,
IN UINT NumberOfPackets
)
{
PRTFAST_ADAPTER Adapter = (PRTFAST_ADAPTER)(MiniportAdapterContext);
UINT Flags = 1;
UINT PacketNumbers = NumberOfPackets;
PPNDIS_PACKET PArray = PacketArray ;
PNDIS_PACKET Packet;
UINT PacketCounter;
#if DBG
// DbgPrint("*** Enter RTFast Sends !\n");
// Adapter->counter2++;
#endif
for(PacketCounter = 0; PacketCounter < PacketNumbers; PacketCounter++)
{
NDIS_SET_PACKET_STATUS(PArray[PacketCounter], NDIS_STATUS_SUCCESS);
}
return ;
}
/*++
Routine Description:
The Rtl8139Send request instructs a driver to transmit a packet through
the adapter onto the medium.
Arguments:
MiniportAdapterContext - Context registered with the wrapper, really
a pointer to the adapter.
Packet - A pointer to a descriptor for the packet that is to be
transmitted.
SendFlags - Optional send flags
Notes:
This miniport driver will always accept a send. This is because
the Rtl8139 has limited send resources and the driver needs packets
to copy to the adapter immediately after a transmit completes in
order to keep the adapter as busy as possible.
This is not required for other adapters, as they have enough
resources to keep the transmitter busy until the wrapper submits
the next packet.
--*/
NDIS_STATUS
RTFast_Send(
IN NDIS_HANDLE MiniportAdapterContext,
IN PNDIS_PACKET Packet,
IN UINT Flags
)
{
//PRTFAST_ADAPTER Adapter = (PRTFAST_ADAPTER)(MiniportAdapterContext);
// return (NDIS_STATUS_PENDING);
return NDIS_STATUS_SUCCESS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -