On Aug 24, 2004, at 4:36 PM, [EMAIL PROTECTED] wrote:

I am using TJesNetMonitor component for C++ builder for my project. And
something very strange is happening. I am creating a single TCP SYN packet
and I send it to a web server. The server replies correctly but my code
response with a TCP RST packet.

If you truly mean that *your* code responds with an RST, then it's strange only if you don't know what your code does.


However, if what you *really* mean is "my *machine* responds with a TCP RST packet", then don't assume it's your code that's doing so! IP packets received by your machine and sent to your machine's MAC address and IP address are not only handed to the WinPcap driver, they're also handed to the OS's IP implementation, which will process them as regular input - which means that if they're TCP packets they get handed to the TCP implementation.

If the packet is a SYN+ACK for a connection that the TCP implementation doesn't know about (for example, because the initial SYN was sent via WinPcap, rather than being sent by the TCP implementation), the TCP implementation will probably reject it, sending an RST.

In other words, you can't use WinPcap, or anything using WinPcap, to set up a TCP connection, as the Windows TCP stack will get in the way. You can't arrange to have the incoming TCP packets go to your program but not to the Windows TCP stack:

        http://winpcap.polito.it/misc/faq.htm#Q-17

There might be software that lets you push the Windows TCP stack out of the way, but I don't know what that software would be, although I *do* know that it's not WinPcap (which wasn't designed to support that).



==================================================================
This is the WinPcap users list. It is archived at
http://www.mail-archive.com/[EMAIL PROTECTED]/

To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to