Re: Get interface MAC address in sys_accept4() syscall

From: AmÃrico Wang
Date: Fri Jul 30 2010 - 03:13:19 EST


On Fri, Jul 30, 2010 at 03:42:14AM +0400, Guram Z. Savinov wrote:
>Hi all,
>
>in net/socket.c is syscall sys_accept4(). In it syscall I need to get
>MAC address of interface, from connection is come.
>For example it is two interfaces eth0 and eth1. I want to know, from
>what interface connection is come to sys_accept4().
>Please help me, how I can do it.
>

It is not obtained from accept(2), you get it with ioctl SIOCGIFHWADDR.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/