Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jun 2002 13:41:02 -0700
From:      "Kevin D. Wooten" <kevin@wooten.com>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Retrieving interface MAC address
Message-ID:  <3D0F9ADE.8070103@wooten.com>
References:  <Pine.NEB.3.96L.1020618130127.30505C-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote:

>I tend to retrieve address information about interfaces using
>getifaddrs(), which will (among other things) retrieve the link layer
>addresses of an interface.  It might be overkill for your application,
>however.
>
>Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
>robert@fledge.watson.org      Network Associates Laboratories
>
>On Tue, 18 Jun 2002, Kevin D. Wooten wrote:
>
>  
>
>>How can I go about retrieving the MAC address for an interface? Since 
>>SIOCGHWADDR doesn't seem to be implemented. Can anyone help??
>>
>>Thanks,
>>Kevin Wooten
>>
>>
>>To Unsubscribe: send mail to majordomo@FreeBSD.org
>>with "unsubscribe freebsd-hackers" in the body of the message
>>
>>    
>>
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-hackers" in the body of the message
>
>
>  
>
Thanks getifaddrs() works great, just one more thing is there a simple 
way to tell the difference between "real" interfaces and virtual ones? I 
could obviously exclude the easy ones ( i.e. lo, lp, faith, ... ) by 
looking at the name, but I am not sure how many different virtual 
interfaces there are ( or will be ).

Thanks Again,
Kevin Wooten



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D0F9ADE.8070103>