Subject: Re: Finding the correct interface for a packet
To: None <kenh@cmf.nrl.navy.mil>
From: Ronald Khoo <ronald@demon.net>
List: tech-net
Date: 12/02/1998 11:08:40
> 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.


--