Subject: Re: Finding the correct interface for a packet
To: None <>
From: Ronald Khoo <>
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.