Sending raw IP packets on Win2K

This is a repost. Sorry if you got it already.

Greetings,

I am running into a weird problem trying to send raw IP packets on Win2K
server.
My sendto() call consistently fails upon first try with WSAEINTR (10004).
This seems to happen because the call blocks, likely due to “no buffer space
available” and then gets killed out via a WSACancelBlockingCall() blocking
hook.

// I set up the socket like this:

sock=WSASocket(AF_INET, SOCK_RAW, IPPROTO_RAW, NULL, 0, 0);
//sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
BOOL x=1;
i= setsockopt(sock,IPPROTO_IP,IP_HDRINCL,(LPSTR) &x, sizeof(x));

//Fill in my packet buffer, and headers…

//Then send like such:
sres = sendto(sock,pack,psize,0,(struct
sockaddr*)&target,sizeof(target));
if (sres==SOCKET_ERROR)
sres=WSAGetLastError(); //sres == 10004 ==WSAEINTR

I am humbly asking for a hint.

/sG


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com