The second argument to ioctl(2) is the ioctl number, which is coming from the afs[] table near the top of ifconfig.c. For inet, it's SIOCAIFADDR. I don't understand what this has to do with your machine turning off, though. It sounds to me like there's a bug in your driver.