How to change eth card en0 MAC address ?

How to change ethernet card en0 MAC address ?

/how to do it from command line
and in c/c++ program ?

i doubt it can be changed in runtime, however it can be done on command line when starting/mounting the driver

see qnx.com/developers/docs/mome … .html#devn

Check with the EEPROM utility options.

I’ve written short script - chmac:
umount /dev/io-net/en$1
mount -v -Tio-net -v -o mac=$2,pci=$1 /lib/dll/devn-pcnet.so

use:

chmac 1 001122334455

it works, but it would be nice if I could change mac addr during en0 work :slight_smile:

Just a remark: I have observed that the umount command sometimes misbehaves in that it either stays blocked forever or it crashes io-net entirely. It happend with several drivers. Anybody seen this?

So I would not recommend to use this script in a production system unless thorough testing with known hardware has been done.

Regards,
Albrecht