Reply To: Send Raw Packet.

Home Forums Discussions General Discussion Send Raw Packet. Reply To: Send Raw Packet.

Vadim Smirnov

need to be chechsum or is it will be do the checksum by the SendPacketToMstcp or SendPacketToAdapter?

The sample above does not initialize IP header and above, it forms and sends a sample Ethernet frame filled with zeros. If you are creating real world IP/TCP/UDP packet then you have to properly initialize required headers and calculate checksums.

by the way,if i want to close the connection,need i send send a rst packet to both MSTCP and Adapter?

Depends from your task, in general it is enough to send RST packet to local stack, another peer will close connection by timeout. But of course you can send RST packets to both, local and remote peers.