RE: Socket?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think this is what u need to do...

setsockopt(fd,  SOL_SOCKET,  SO_BINDTODEVICE, intefaceName,
INTERFACE_NAME_LENGTH);


-----Original Message-----
From: linux-net-owner@vger.kernel.org
[mailto:linux-net-owner@vger.kernel.org]On Behalf Of S Ramesh
Sent: Tuesday, 26 February 2002 1:11 PM
To: Net
Subject: Socket?


Hi,

Is there anyway of assurance that a data is going through a particular
interface when we send through a socket? I dont think bind call will
do that. It only makes the socket named.

My specific question is suppose we have two interfaces and each is
connected to two different networks. Suppose if i want to send a data
out through a particular interface where the destination IP address of
the packet is routable from both the interface ( assume ). How can i
assure that my data is moving out of the particular interface. Kindly
clarify me in this regard.

Thanks,
Ramesh

-
: 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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux