Hi;
Would anyone have a tip on how to get the MAC from a C program?
I tried:
struct ifreq ifreq;
unsigned char *hw;
strcpy(ifreq.ifr_name, "rl0");
ioctl(fd, SIOCGIFMAC, &ifreq);
hw = ifreq.ifr_ifru.ifru_data; ????
but i don't know if this is right or, if it is, where to get the MAC from the
structure. I doesn't issue any error compiling or running though.
In linux i used:
struct ifreq ifreq;
unsigned char *hw;
strcpy(ifreq.ifr_name, "rl0");
ioctl(fd, SIOCGIFHWADDR, &ifreq);
hw = ifreq.ifr_hwaddr.sa_data;
Thanks,
Mario
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"