Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Read MAC address on VxWorks 6.8

439 views
Skip to first unread message

MotoDev

unread,
Apr 19, 2012, 11:40:37 AM4/19/12
to
I am attempting to read the MAC address of my device on VxWorks 6.8.

Back on Vx5.5, I was able to do this:
char macAddress[6];
STATUS ret = ERROR;
void * pDrvCookie = muxTkCookieGet(LAN_IF_NAME, LAN_IF_NUMBER);
if( pDrvCookie == NULL )
return ERROR;
else
ret = muxIoctl( pDrvCookie, EIOCGADDR, macAddress);

However, now I'm on 6.8, and it returns an error code of 22 ("Invalid argument").
I suspect it is because I am using the old header file with the definition of EIOCGADDR. But, I don't have the new header.

So... my question is:
1) Can someone post the definition of EIOCGADDR ("end.h").
- OR -
2) Can someone suggest an alternate method to obtain the MAC address. I have already tried the following, with no success:
ifunit <- not defined
etherAddrResolve(self) <- not defined
arpResolve(self) <- doesn't work when using my own IP address, "Network is unreachable"

Thanks.
0 new messages