[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hardware address retrieval

Hello people,
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.