[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get MAC address from userspace program
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Re: get MAC address from userspace program
- From: Martin Schmachtel <schmadde_(_at_)_syscall_(_dot_)_de>
- Date: Fri, 19 Jul 2002 12:36:46 +0200
- Mail-followup-to: Martin Schmachtel <schmadde_(_at_)_syscall_(_dot_)_de>, tech_(_at_)_openbsd_(_dot_)_org
Kamil Andrusz schrob:
> Martin Schmachtel <schmadde_(_at_)_syscall_(_dot_)_de>:
>
> > I need to find out the MAC address of a given ethernet interface from
> > a userspace program. I cannot, however, find out how to get this data.
> Maybe this diff will help:
> http://mniam.net/soft/ifconfig.diff
Thanks, sockaddr_dl and the LLADDR macro was exactly what I was looking
for. Works like a charm. Thanks to the others as well (yes, I was using
getifaddrs already).
ciaole
schmadde
Visit your host, monkey.org