Added an ioctl framework