Brian Weaver wrote:
You can get the remote address (getpeername(2)), but as to which
interface (lo, eth0, eth1) the packet was received on... not sure
there is any easy way.
-Brian
getsockname() is what you want, assuming you want the local interface name.
Then maybe do black magic with /sbin/route? There's probably a way to do
it portably,
but I don't know it.
Michael Tharp
--
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc