bind() to specific network interface before connect()
-
Hi I have a machine with several network interfaces that route through different NAT VPNs. I've created a testing application that bind()s to one of these interfaces before calling connect(), which works excellent in Windows 7. When I try the same thing in Windows XP, bind() succeeds, but connect() fails with 10065 (WSAEHOSTUNREACH) after some seconds of blocking. I checked Wireshark, and there isn't even one single packet sent/received on each interface. Any ideas what may be the problem?
Don't try it, just do it! ;-)
-
Hi I have a machine with several network interfaces that route through different NAT VPNs. I've created a testing application that bind()s to one of these interfaces before calling connect(), which works excellent in Windows 7. When I try the same thing in Windows XP, bind() succeeds, but connect() fails with 10065 (WSAEHOSTUNREACH) after some seconds of blocking. I checked Wireshark, and there isn't even one single packet sent/received on each interface. Any ideas what may be the problem?
Don't try it, just do it! ;-)
OK, this is probably a stupid question (so I won't be unhappy if I get a stupid answer :-)) but are you sure the host is reachable through that interface on the XP host? Have you checked with some other network application?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
OK, this is probably a stupid question (so I won't be unhappy if I get a stupid answer :-)) but are you sure the host is reachable through that interface on the XP host? Have you checked with some other network application?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
yea it is reachable. When i switch the default gateway to the interface i want to use i can reach the hosts. the routes should be fine.
===========================================================================
Schnittstellenliste
0x1 ........................... MS TCP Loopback interface
0x2 ...00 0c 29 70 8c 43 ...... VMware Accelerated AMD PCNet Adapter - Paketplaner-Miniport
0x10004 ...00 0c 29 70 8c 39 ...... VMware Accelerated AMD PCNet Adapter===========================================================================
Aktive Routen:
Netzwerkziel Netzwerkmaske Gateway Schnittstelle Anzahl
0.0.0.0 0.0.0.0 192.168.178.1 192.168.178.28 1
0.0.0.0 0.0.0.0 192.168.179.1 192.168.179.130 100
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.178.0 255.255.255.0 192.168.178.28 192.168.178.28 1
192.168.178.28 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.178.255 255.255.255.255 192.168.178.28 192.168.178.28 1
192.168.179.0 255.255.255.0 192.168.179.130 192.168.179.130 100
192.168.179.130 255.255.255.255 127.0.0.1 127.0.0.1 100
192.168.179.255 255.255.255.255 192.168.179.130 192.168.179.130 100
224.0.0.0 240.0.0.0 192.168.178.28 192.168.178.28 1
224.0.0.0 240.0.0.0 192.168.179.130 192.168.179.130 100
255.255.255.255 255.255.255.255 192.168.178.28 192.168.178.28 1
255.255.255.255 255.255.255.255 192.168.179.130 192.168.179.130 1
Standardgateway: 192.168.178.1Ständige Routen:
KeineDon't try it, just do it! ;-)
-
OK, this is probably a stupid question (so I won't be unhappy if I get a stupid answer :-)) but are you sure the host is reachable through that interface on the XP host? Have you checked with some other network application?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
I think I've found the reason.. http://technet.microsoft.com/en-us/magazine/cc137807.aspx Windows XP uses weak host model, Vista and later strong host model. There doesn't seem to be a way to configure this in Windows XP which is particularly ANNOYING!!
Don't try it, just do it! ;-)
-
I think I've found the reason.. http://technet.microsoft.com/en-us/magazine/cc137807.aspx Windows XP uses weak host model, Vista and later strong host model. There doesn't seem to be a way to configure this in Windows XP which is particularly ANNOYING!!
Don't try it, just do it! ;-)
Woah - your network-fu is way stronger than mine :-)
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p