Andrew Gallatin wrote:
Hi,

I'm porting a IP offload software package from Linux to {Open,}Solaris.
I need to determine if a local IP address belongs to one of our
NICs for the purpose of offloading a connection.  This happens
in a library, and should not require root access.

On Linux, this boils down to calling getifaddrs() to find the
interface name that matches the sockaddr's IP.  Then we use
use ioctl(..SIOCGIFHWADDR) to get that interface's HW address and match
it against a list of valid MAC addresses (obtained from private ioctl
to our driver).

FWIW, providing PF_PACKET sockets on [Open]Solaris will by
necessity support this ioctl. For reference:
http://arc.opensolaris.org/caselog/PSARC/2009/232/pfp-psarc.txt

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to