I need to use raw sockets in Windows CE 5.0. The following code always fails with error
socket failed, err:10044.
(The support for the specified socket type does not exist in this address family.)
WSAData wsaData;
SOCKET s;
int n;
n = WSAStartup(MAKEWORD(2,0), &wsaData);
if (n < 0) {
printf("WSAStartUp failed, err:%d\n", WSAGetLastError());
} else {
s = socket(AF_INET, SOCK_RAW, IPPROTO_IP);
if (s < 0)
{
printf("socket failed, err:%d\n", WSAGetLastError());
}
}
What must I do for using raw sockets in Windows CE?
Raw IP sockets are not supported in Windows CE 5.0.
You can use NDISUIO to send packets with arbitrary content.