Re: Bind Problem - with multihomed
- From: "Volodymyr M. Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx>
- Date: Wed, 14 May 2008 09:06:03 +0200
[...]
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 bind(...) function associates socket with local address. So it seems for
me it behaves correctly: the source IP is changed.
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Albert" <Albert@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A796CC0E-C02A-41BC-8204-A5BB473148C6@xxxxxxxxxxxxxxxx
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: Albert
- Re: Bind Problem - with multihomed
- References:
- Bind Problem - with multihomed
- From: Albert
- Bind Problem - with multihomed
- Prev by Date: Re: Bluetooth Service Calls
- Next by Date: Re: NTP/NetRemoteTOD And a zone of time
- Previous by thread: Bind Problem - with multihomed
- Next by thread: Re: Bind Problem - with multihomed
- Index(es):
Relevant Pages
|
|