Please check the manual page ioctl_console(2).