RAW Sockets in C++ Windows
问题 I want to use a RAW Socket in Visual C++. I saw a function on Linux which is int out = socket(AF_INET, SOCK_RAW, htons(ETH_P_ALL)); Using this code in linux we can do that, but how to use RAW SOCKET on Windows Platform because when I use this in Visual C++ I am getting Error. Thanks in Advance. EDIT int out1 = socket(AF_INET, SOCK_RAW, IPPROTO_SCTP); for (; ;) { int bytesIn = recvfrom(out1, buf, 2000, 0, (sockaddr*)&server, &serverLength); if (bytesIn == SOCKET_ERROR) { cout << "Error