Hi Here is some fact on my linux box. When I bind a socket to eth0, I can not use this socket to talk with another application on my pc through loop back interface. Does this mean LINUX do not use a standard implementation? is there any posix standard concerning SO_BINDTODEVICE? thanks, Xia Weizhong -----Original Message----- From: Anupam Kapoor [mailto:anupam.kapoor@gmail.com] Sent: 2004?8?26? 17:01 To: Xia Wei-Zhong-W20079 Cc: Henrik Nordstrom; rss26@njit.edu; linux-net@vger.kernel.org Subject: Re: Forcing a connection from a particular NIC On Thu, 26 Aug 2004 15:28:26 +0800, Xia Wei-Zhong-W20079 <xia@motorola.com> wrote: > Hi , anupam > > Can I ask a question about SO_BINDTODEVICE, since you mentioned it here. > > (I can't recall where I find the information), it is said to use SO_BINDTODEVICE, you still need to have a route pointing to the device. SO_BINDTODEVICE only allow you to choose device among the different routing priorities. > > Is it true for LINUX? yes. > > Also somebody said SO_BINDTODEVICE can't work with multicast, true? i don't think SO_BINDTODEVICE will work with multicast. but i have not tried it, so i am not sure. regards anupam > > Thanks, Xia Weizhong > > > > > -----Original Message----- > From: linux-net-owner@vger.kernel.org [mailto:linux-net-owner@vger.kernel.org]On Behalf Of Anupam Kapoor > Sent: 2004?8?26? 12:34 > To: Henrik Nordstrom > Cc: rss26@njit.edu; linux-net@vger.kernel.org > Subject: Re: Forcing a connection from a particular NIC > > > You can in most cases accomplish this with a little LD_PRELOAD hackery, to > > modify the socket calls to always bind() to the desired address when the > > application tries to call connect(). > > > how about limiting the packet through a specific interface via the > SO_BINDTODEVICE socket > option ? i guess that's what you (henrik) means. right ? > > kind regards > anupam > - > : send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html