Original Post
ok heres the thing... what is the best way (in windows or linux)
to access the raw ip header on a packet
i know u can create one with socket(AF_INET,SOCK_RAW,IPPROTO_RAW);
or something like that but how would u go about sending the data?
you cant really use sendto cause it wants a port in sockaddr and ip doesnt have a notion of ports
im thinking of maybe doing the following... would this work?
char packet[]="insert ip header and anything else in the packet here";
int sock=socket(AF_INET,SOCK_RAW,IPPROTO_RAW);
send(sock,packet,sizeof(packet),0);
for recv would u just do
recv(sock, buff, MAX_LEN,0); and would that give you the raw packet that was sent?
any help would be apreicated thanks