Changing Mac addresses

I am writing to ask whether it is possible to code wise change the MAC
address of an ethernet adaptor similar to the execution of a umount/mount
script.

The required code should replace the following script:-

umount /dev/io-net/en0
mount -Tio-net -opci=0,mac="…" /lib/dll/devn-…

Yours hopefully

David