RAW sockets

Description

This sample application provides a test for sending and receiving raw IP packets.

Source Files

RawSockets project source file:

Remarks

This test causes the receiver to send many ICMP error messages because it sends IP packets with a bogus protocol type. That said, the raw sockets should still receive them, so this test verifies proper operation.

The source for this sample is in the <RTXDIR>\RTTCPIP\Samples\RawSockets directory. The project file builds a real-time .rtss executable binary file.

APIs Referenced

RTAPI

Winsock BSD APIs

RtPrintf

bind

recvfrom

select

sendto

socket

WSACleanup

WSAGetLastError

WSAStartUp

See Also

Using RAW Sockets

IntervalZero.com | Support | Give Feedback