I want to get the hardware address of my mac's ethernet card. In all samples I saw in include on IOKit/assert.h . Which doesn't seem to exist on my system. GCC throws an error saying he doesn't know the type IOEthernetAddress. Is assert.h necessary for my task? It would be great if someone coud give me a working sample. [edit] here's my code, think this will help understanding the problem:
#include <IOKit/assert.h>
#include <IOKit/network/IOEthernetController.h>
#include <IOKit/network/IOEthernetInterface.h>
int main(){
IOEthernetAddress addr;
getHardwareAddress(&addr);
printf("%x", addr);
return 0;
}