Heart code [from another off-list discussion]
Alan Robertson
alanr@bell-labs.com
Tue, 30 Mar 1999 06:36:52 -0700
Tom and I were having another off-list discussion about the distinction
between SO_DONTROUTE (which is supported on Linux and other OSes), and
SO_BINDTODEVICE (which appears to be a Linux-only option). We want the
code to be portable to other OSes, as much as possible.
Tom Vogt wrote:
>
> Alan Robertson <alanr@bell-labs.com> wrote:
> > I guess in most cases, you can control which subnet you go out on just by
> > controlling the broadcast address. Is that right?
>
> I think so.
>
> > I can still need to know
> > which interface, in order to look up the broadcast address.
>
> the description of SO_DONTROUTE says that it'll bypass routing, taking the
> interface to use from the network portion of the address.
The only thing that SO_DONTROUTE won't do is select which interface
you're doing diagnostics on [which is a longer-term goal]. For example,
if I have two redundant NICs on a machine, and want to test one, I need
to be able to control which one gets a particular packet. They will
both have the same network portion of the address, and you'll want to
know which one you're testing. That's the only distinction I can see.
And this distinction doesn't apply in heartbeats.
-- Alan Robertson
alanr@bell-labs.com