Bind Problem - with multihomed
- From: Albert <Albert@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 May 2008 05:28:04 -0700
Hi,
I have a multihomed pc with Windows XP Pro SP2 installed and two network
interfaces. My task is to build an application to send out data from a
particular interface.
What I did is, first I created two datagram sockets and then, I used the
bind() function to bind each socket with the interface. Then I used the
sendto() function to send out some data over the interface. The problem is
that when I am using a sniffer to watch the outgoing packets, both packets
seems to be leaving from the same interface with the source IP changed.
The funny thing is that the same code works fine when I run it on a Windows
XP Pro without the SP2 installed.
Is it correct to use the bind function to bind a socket to a particular
interface or there is another API function?
Many Thanks.
--------------
bind (Windows Socket)
"This allows the underlying service provider to use any appropriate network
address, potentially simplifying application programming in the presence of
multihomed hosts" ... msdn quote.
-------------
.
- Follow-Ups:
- Re: Bind Problem - with multihomed
- From: Volodymyr M. Shcherbyna
- Re: Bind Problem - with multihomed
- Prev by Date: Re: WSAENOBUFS on winsock client application
- Next by Date: Re: HTTP server problem when running two clients
- Previous by thread: RE: Virtual channel access violation in mstscax.dll with Vista SP1
- Next by thread: Re: Bind Problem - with multihomed
- Index(es):
Relevant Pages
|
|