Herramientas de usuario

Herramientas del sitio


notas:programacion:console_ioctls_under_linux

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
Próxima revisiónAmbos lados, revisión siguiente
notas:programacion:console_ioctls_under_linux [2011/06/09 18:41] cayunotas:programacion:console_ioctls_under_linux [2011/06/09 18:42] cayu
Línea 1: Línea 1:
 ====== Console IOCTLs Under Linux ====== ====== Console IOCTLs Under Linux ======
  
- Console IOCTLs can be very useful and powerful. These are the IOCTls that involve the console. They are the user interface to manipulation of the console. I am going to go over these console IOCTLs and give you examples of them. You can make some pretty powerful programs, whether they be general utilities or security programs, with these (such as Auto Console Switching and Console Access Protection). The structure of this article will be the name of the IOCTL, and then example source code to uses of the IOCTL. Now, I must warn you that the console IOCTLs are being replaced by POSIX functions. These IOCTLs are undocumented Linux internals and can be added or dropped without warning. I did not include all the console IOCTLs, but I included the ones that I though would be important or useful. The switch statement for each of these IOCTLs is in +Console IOCTLs can be very useful and powerful. These are the IOCTls that involve the console. They are the user interface to manipulation of the console. I am going to go over these console IOCTLs and give you examples of them. You can make some pretty powerful programs, whether they be general utilities or security programs, with these (such as Auto Console Switching and Console Access Protection). The structure of this article will be the name of the IOCTL, and then example source code to uses of the IOCTL. Now, I must warn you that the console IOCTLs are being replaced by POSIX functions. These IOCTLs are undocumented Linux internals and can be added or dropped without warning. I did not include all the console IOCTLs, but I included the ones that I though would be important or useful. The switch statement for each of these IOCTLs is in 
 linux/drivers/char/vt.c. Other interesting code to look at would be (all in linux/drivers/char) conmakehash.c, console.c, consolemap.c, keyboard.c, tty_io.c, vc_screen.c, vga.c. Other interesting files (also in linux/drivers/char) are console_struct.h, consolemap.h, kbd_kern.h, vt_kern.h, and uni_hash.tbl. We are going to be using the IOCTLs defined in /usr/include/linux/kd.h, and /usr/include/linux/vt.h. linux/drivers/char/vt.c. Other interesting code to look at would be (all in linux/drivers/char) conmakehash.c, console.c, consolemap.c, keyboard.c, tty_io.c, vc_screen.c, vga.c. Other interesting files (also in linux/drivers/char) are console_struct.h, consolemap.h, kbd_kern.h, vt_kern.h, and uni_hash.tbl. We are going to be using the IOCTLs defined in /usr/include/linux/kd.h, and /usr/include/linux/vt.h.
 +
  
 The function prototype for ioctl() as defined in /usr/include/sys/ioctl.h  The function prototype for ioctl() as defined in /usr/include/sys/ioctl.h 
Línea 2074: Línea 2075:
 otherwise (for example, ACS and CAP). otherwise (for example, ACS and CAP).
  
- Shok (Matt Conover) 
  
  
-Email: shok@dataforce.net+Shok (Matt Conover)\\ 
 +Email: shok@dataforce.net \\
 Web: http://www.w00w00.org Web: http://www.w00w00.org
notas/programacion/console_ioctls_under_linux.txt · Última modificación: 2011/06/10 12:24 por cayu