Subject: Re: Finding the correct interface for a packet
To: Ronald Khoo <ronald@demon.net>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: tech-net
Date: 12/02/1998 10:37:03
>> The returned struct sockaddr from getsockname() will contain the
>> IP address of the interface that the supplied IP address will be
>> using.  From there, you should be able to figure out the interface name
>> by walking the interface list.
>
>Fails if you have the same local address on more than one interface.

Oh, you mean if you have a PPP interface and you use the same address on
your local interface?  True, I had forgotten about that.

--Ken