Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Feb 2007 13:24:38 -0800
From:      Chuck Swiger <>
To:        nocturnal <>
Subject:   Re: Which file to request SIOCGIFMAC on?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Feb 20, 2007, at 1:10 PM, nocturnal wrote:
> I'm trying to get the ethernet address and from the manuals i  
> understand that i need the ifreq structure for this. So i'm trying  
> to request SIOCGIFMAC with ioctl on a socket of type SOCK_DGRAM.

If you're just targetting FreeBSD >= 5.x platforms, your current  
approach is reasonable (assuming you can fix whatever the problem  
is); if you're targetting other platforms such FreeBSD 4, Dfly, OS X,  
or SysV things like Solaris, try installing the libnet port and  
invoke libnet_get_hwaddr().


Want to link to this message? Use this URL: <>