Does anybody know where to find an masm/tasm raw example, that shows how to use raw sockets under win2k?

I'm trying to send an UDP packet with the flag "don't fragment" set, and I think using a raw socket, is the only way to do it.

Also I have seen diffrent ways of defining IP_HDRINCL. Some say that it is 2 others 3. In my program I have set it to 2. Does anyone know if that's correct?

Posted on 2001-07-19 15:04:34 by clerihew
i was looking for the same thing , i found something , i didnt find a masm example but found Socket 2 FAQ ( raw socket included).
Posted on 2001-07-20 05:14:44 by eko
oops i did sumbit before putting the address
Posted on 2001-07-20 05:18:05 by eko
Thanks eko, that FAQ is a good one, but I still seem to need more info on raw sockets. It does not seem to be well documented.

I have found a source code i delphi, that does the same as the C source for the raw socket ping program in the wsock2 FAQ. Here is the link. (Exists only in Google cache)

If you get a raw socket program to work in asm, I will be happy to know.

Thank you for your efforts.

Posted on 2001-07-20 07:07:02 by clerihew
I got it to work!!!!

The fault I made was that I had imports to boths wsock32.dll and ws2_32.dll. Because of this, every time I called WSASocket ws2_32.dll was used, and every time I called setsockopt wsock32.dll was called.

I deleted all reference to wsock32.dll, so that ws2_32.dll was the only dll used, and then it worked.

I hate it when you see yourself blind on an error.

Thank you all for a good forum.

Posted on 2001-07-22 04:01:39 by clerihew
Well if your willing to post your source code I would be very interested. I have been working with raw sockets as well and I am not getting very far at this point.

Thanks Betrayed
Posted on 2001-07-22 04:16:07 by Betrayed

I'm very happy for you that you solve your problem the problem.
it be very useful to some people if you will post your source (especially for me )

while searching something that has not related with this subject i found a source in tasm on raw socket . doesnt work good on my computer ... maybe i should do a restart ;]


do search in page for "raw" or "raw tcp"

p.s i allmost didnt understood a thing in this page .(the language)

Posted on 2001-07-22 15:58:20 by eko
UUps. Created a new thread. The source code can be found under networking, with topic: "source code".

Hope you can use it.

Posted on 2001-07-27 05:07:07 by clerihew