With io-net, we were able to get the mac address of a particular port with: nicfd = open(device, O_RDONLY); devctl(nicfd, DCMD_IO_NET_GET_CONFIG, &nic, sizeof( nic_config_t ); close(nicfd); Then use nic.current_address. Since there isn't a device under dev with io-pkt with a native driver, how would you do the above?
It's different but, ifconfig can do this, and it's source is here. http://community.qnx.com/integration/viewcvs/viewcvs.cgi/trunk/utils/i/ifconfig/?root=core_networking&system=exsy1001
Hi Bill: It's a bit more complicated since you have to go through the stack instead of talking to the driver directly. It's not so great that old interfaces aren't supported, but what IS nice is that google is now useful :> http://othermark.livejournal.com/3005.html Don't forget to link with "-lsocket" to get the socket library linked in. Robert. -----Original Message----- From: William Smith [mailto:bsmith@tridium.com] Sent: Thursday, January 10, 2008 4:46 PM To: ionetmig-networking Subject: Get MAC with io-pkt With io-net, we were able to get the mac address of a particular port with: nicfd = open(device, O_RDONLY); devctl(nicfd, DCMD_IO_NET_GET_CONFIG, &nic, sizeof( nic_config_t ); close(nicfd); Then use nic.current_address. Since there isn't a device under dev with io-pkt with a native driver, how would you do the above? _______________________________________________ io-net migration http://community.qnx.com/sf/go/post4195
Hello All, I checked links given above, but itseems to be not available. Please suggest how to get mac address with io-pkt for "fec0" interface. Thanks.