ok so this is to test raw sockets but there is a problem.. you can initialize raw sockets on all win nt's without a problem, but when you try to send a packet through it, it will fail with permission denied... and if i want to make a true raw socket tester, then it also have to try send a packet... so anyone can give some ideas or whateverCode:#include <windows.h> #include <stdio.h> #include <winsock.h> #pragma comment(lib, "WS2_32") int main() { int get; int get2; WSADATA wsadata; WSAStartup(MAKEWORD(2,2), &wsadata); if ((get = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0) { printf("no raw sockets - get\n"); } if ((get2=socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) == INVALID_SOCKET) { printf("no raw sockets - get2\n"); } system("pause"); return 1; }



LinkBack URL
About LinkBacks


