Shachar Shemesh wrote:
It gets slightly more complicated than that. I need it cross platform
:-). Searching http://msdn2.microsoft.com for "BINDTODEVICE" returns no
results (well, none that seem relevant, anyways). Even if it did, I'm
not sure how you specify the device's name in Windows, being as it is
that Windows does not have a 1:1 relationship between IP addresses and
devices.
Neither does Linux (although you wont be aware of that if you're only using
ifconfig):
[EMAIL PROTECTED] gby]# ip a show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:11:11:55:be:f1 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.13/24 brd 10.0.0.255 scope global eth0
inet 192.168.0.1/24 brd 192.168.0.255 scope global eth0
What BINDTODEVICE does is force the routing code to consider only routes that go
through the requested interface.
Gilad
--
Gilad Ben-Yossef <[EMAIL PROTECTED]>
Codefidence. A name you can trust(tm)
http://www.codefidence.com
Phone: +972.3.7515563 ext. 201 | Cellular: +972.52.8260388
SIP: [EMAIL PROTECTED] | Fax: +972.3.7515503
Lacking fins or tail
the gefilte fish swims with
great difficulty.
-- A Jewish Haiku
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]