home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 171.lha / SupLib / ioctl.h < prev    next >
Text File  |  1988-04-28  |  2KB  |  69 lines

  1.  
  2. /*
  3.  *  IOCTL.H
  4.  *
  5.  *  Note on IOF_ASYNC:    Handles by default can do only one thing at a time...
  6.  *            This might cause the device to block when you specify
  7.  *            an asynchronous operation when the previous op has not
  8.  *            completed yet.    Not all devices support IOC_NASYNCH
  9.  *
  10.  *  SEE IOCTL.DOC !!!!!
  11.  */
  12.  
  13. #define IOF_ASYNC   0x80000000L     /*    Do asynchronously if possible.        */
  14. #define IOF_NOORD   0x40000000L     /*    Execute immediately if possible     */
  15. #define IOF_BUF     0x20000000L     /*    Ioctl args are a buffer and a length*/
  16. #define IOF_NB        0x10000000L     /*    Non-Blocking.  Do not block        */
  17.  
  18. #define IOCMASK     0x00FFFFFFL
  19.  
  20. #define IOC_RESET   1L
  21. #define IOC_READ    (2L|IOF_BUF)        /*  IOF_ASYNC usually implemented   */
  22. #define IOC_WRITE   (3L|IOF_BUF)        /*  IOF_ASYNC usually implemented   */
  23. #define IOC_UPDATE  4L
  24. #define IOC_CLEAR   5L
  25. #define IOC_STOP    6L
  26. #define IOC_START   7L
  27. #define IOC_FLUSH   8L
  28.  
  29. #define IOC_SIGNAL  0x040L        /*  Get/Set signal # for asynch ops    */
  30. #define IOC_SLOTS   0x041L        /*  Get/Set # of parallel asynch reqs    */
  31. #define IOC_RAVAIL  0x042L        /*  Return # bytes ready to read    */
  32. #define IOC_WAVAIL  0x043L        /*  Return # bytes that can be written    */
  33. #define IOC_BLOCKSZ 0x044L        /*  R/W can be in multiples of this val */
  34. #define IOC_RBUFSZ  0x045L        /*  Get/Set input buffer size, bytes    */
  35. #define IOC_WBUFSZ  0x046L        /*  Get/Set output buffer size, bytes    */
  36. #define IOC_ASYRDY  0x048L        /*  Asynchronous control, see docs    */
  37. #define IOC_ASYWAIT 0x049L
  38. #define IOC_TXTCMD  0x04AL        /*  Ascii command to execute remote    */
  39.  
  40. #define IOC_ABORT   0x050L        /*  Abort all asynch. requests        */
  41. #define IOC_DUP     0x051L        /*  Duplicate a handle            */
  42. #define IOC_CHOWN   0x052L        /*  Change ownership of a handle    */
  43.  
  44. #define IOC_SETFUNC 0x054L        /*  Set IOCTL dispatch function     */
  45. #define IOC_GETFUNC 0x055L        /*  Get IOCTL dispatch function     */
  46. #define IOC_DEVCLAS 0x056L        /*  Return device type            */
  47.  
  48. /*
  49.  *  These _IOC commands are for internal use only and
  50.  *  should never be used from application programs.
  51.  */
  52.  
  53. #define _IOC_CREATE 0x60
  54. #define _IOC_DELETE 0x61
  55. #define _IOC_OPEN   0x62
  56. #define _IOC_CLOSE  0x63
  57. #define _IOC_DUP    0x64
  58.  
  59. /*
  60.  *  DEVICE ABILITIES
  61.  */
  62.  
  63. #define IOTC_CLASS0    0
  64. #define IOTC_CLASS1    1
  65. #define IOTC_CLASS1    2
  66. #define IOTC_CLASS1    3
  67. #define IOTC_CLASS1    4
  68.  
  69.