I am implemeting a application using Winsock which receive data from
interface (192.168.0.178 in following ethereal summary) using IP raw
sockets. And it sends out the packet using Winpcap (as windows xp does
not allow transmit on raw sockets).
My application is forwarding the TCP packets from 2nd interface of PC
to this interface. I am having a problem in this process as shown in
following ethereal summary. It sends out packet 2 (TCP SYN) and gets
the response packet 3 (TCP SYN-ACK). Before application can send next
required packet 5 (TCP ACK), windows responds on its own with packet 4
(TCP RST) which destroy the connection and application does not work
anymore.
2 24.103098 192.168.0.178 192.168.0.199 TCP 2500 >
http [SYN] Seq=0Len=0 MSS=1460
3 24.103324 192.168.0.199 192.168.0.178 TCP http >
2500 [SYN, ACK]Seq=0 Ack=1 Win=65535 Len=0 MSS=1260
4 24.103346 192.168.0.178 192.168.0.199 TCP 2500 >
http [RST] Seq=1Len=0
5 24.111957 192.168.0.178 192.168.0.199 TCP 2500 >
http [ACK] Seq=1Ack=1 Win=65535 Len=0
Is there a way that windows is prevented from automatically responding
to this TCP SYN,ACK packet. Or I can reserve this port number 2500 so
that windows ignores packets on this port.
I will appreciate any help in this regards.
Thanks,
Amir