[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hardware address retrieval
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Hardware address retrieval
- From: CyberPsychotic <fygrave_(_at_)_epr0_(_dot_)_org>
- Date: Sun, 14 Nov 1999 14:14:36 +0500 (KGT)
While playing with some code here, I've got abit stumbled with a question:
Is there any _elegant_ way to retrieve hardware address of an interface
in BSD? in linux I would just go with SIOCGIFHWADDR ioctl, but BSD lacks
this. I actually found some obscure example in R.Steven's book which uses
sockaddr_dl, but he used it along with routing sockets and looks like too
much complexity for such simple task. Maybe I am just missing something?
would appreciate any hints or pointers.