ifconfig

anyone know the c code equivilent of

ifconfig en0 etheraddr:ethernetmask?

I’m sure its either an ioctl or a devctl of /dev/io-net/en0 but cant locate it

Cheers
Darren

Just digging through the headers I saw ‘SIOCSIFADDR’ and ‘struct ifreq’ in sys/sockio.h:
#define SIOCSIFADDR _IOW(‘i’, 12, struct ifreq) /* set ifnet address */