BOOL CNdisApi::SendPacketToAdapter ( PETH_REQUEST pPacket );
Return Value:TRUE if call was successful, FALSE otherwise
Parameters:pPacket
Pointer to the user allocated and initialized ETH_REQUEST structure.
Remarks:
The following fields of ETH_REQUEST must be initialized:
ETH_REQUEST.hAdapterHandlemust be set to the interface handle (obtained via call to CNdisApi::GetTcpipBoundAdaptersInfo) to which you would like to send a packet.ETH_REQUEST.EthPacket.Buffermust point to the user allocated and initialized INTERMEDIATE_BUFFER structure
The following fields of the INTERMEDIATE_BUFFER should be initialized:
INTERMEDIATE_BUFFER.m_IBuffershould contain Ethernet packetINTERMEDIATE_BUFFER.m_Lengthshould be initialized to the actual length of the packetINTERMEDIATE_BUFFER.m_Flagsshould be initialized by combination ofNDIS_FLAGS_XXX(defined in ndis.h). Look at these flags for details. Note, that these flags usually don’t work for the old NDIS versions.
This member calls the filter driver with IOCTL_NDISRD_SEND_PACKET_TO_ADAPTER control code (see details below).
IOCTL_NDISRD_SEND_PACKET_TO_ADAPTER
| Input Buffer | _ETH_REQUEST |
| Input Buffer Size | sizeof (_ETH_REQUEST) |
| Output Buffer | None |
| Output Buffer Size | 0 |
