Hi,
Can anybody help me out to retrieve MAC address of my machine... using a C
program.... I gave it a try using ioctl but not getting the correct
result...... Following is my code......
int main()
{
......
struct ifr_req ifr ;
strcpy(ifr.ifr_name, "rl0");
if( ioctl(s, SIOCGIFADDR, &ifr) < 0 ) {
cout << "Error" << endl ;
return 0 ;
}
printf("ADDR(%s) = ") ;
for(int i = 0; i < 6; i++) {
printf("%x :", ifr.ifr_addr.sa_data[i] ) ;
}
its not printing the correct result....
Thanks in advance
Dennis
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"