home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / sys / ioccom.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-08  |  2.9 KB  |  84 lines

  1. /*    @(#)ioccom.h 1.7 89/06/16 SMI; from UCB ioctl.h 7.1 6/4/86    */
  2.  
  3. /*
  4.  * Copyright (c) 1982, 1986 Regents of the University of California.
  5.  * All rights reserved.  The Berkeley software License Agreement
  6.  * specifies the terms and conditions for redistribution.
  7.  */
  8.  
  9. #ifndef    __sys_ioccom_h
  10. #define    __sys_ioccom_h
  11. #include <sys/ioctl.h>
  12. #ifdef 0
  13. /*
  14.  * Ioctl's have the command encoded in the lower word,
  15.  * and the size of any in or out parameters in the upper
  16.  * word.  The high 2 bits of the upper word are used
  17.  * to encode the in/out status of the parameter; for now
  18.  * we restrict parameters to at most 255 bytes.
  19.  */
  20. #define    _IOCPARM_MASK    0xff        /* parameters must be < 256 bytes */
  21. #define    _IOC_VOID    0x20000000    /* no parameters */
  22. #define    _IOC_OUT    0x40000000    /* copy out parameters */
  23. #define    _IOC_IN        0x80000000    /* copy in parameters */
  24. #define    _IOC_INOUT    (_IOC_IN|_IOC_OUT)
  25. /* the 0x20000000 is so we can distinguish new ioctl's from old */
  26. #define    _IO(x,y)    (_IOC_VOID|('x'<<8)|y)
  27. #define    _IOR(x,y,t)    (_IOC_OUT|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  28. #define    _IORN(x,y,t)    (_IOC_OUT|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  29. #define    _IOW(x,y,t)    (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  30. #define    _IOWN(x,y,t)    (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  31. /* this should be _IORW, but stdio got there first */
  32. #define    _IOWR(x,y,t)    (_IOC_INOUT|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  33. #define    _IOWRN(x,y,t)    (_IOC_INOUT|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
  34.  
  35. /*
  36.  * Registry of ioctl characters, culled from system sources
  37.  *
  38.  * char    file where defined        notes
  39.  * ----    ------------------        -----
  40.  *   F    sun/fbio.h
  41.  *   G    sun/gpio.h
  42.  *   H    vaxif/if_hy.h
  43.  *   M    sundev/mcpcmd.h            *overlap*
  44.  *   M    sys/modem.h            *overlap*
  45.  *   S    sys/stropts.h
  46.  *   T    sys/termio.h            -no overlap-
  47.  *   T    sys/termios.h            -no overlap-
  48.  *   V    sundev/mdreg.h
  49.  *   a    vaxuba/adreg.h
  50.  *   d    sun/dkio.h            -no overlap with sys/des.h-
  51.  *   d    sys/des.h            (possible overlap)
  52.  *   d    vax/dkio.h            (possible overlap)
  53.  *   d    vaxuba/rxreg.h            (possible overlap)
  54.  *   f    sys/filio.h
  55.  *   g    sunwindow/win_ioctl.h        -no overlap-
  56.  *   g    sunwindowdev/winioctl.c        !no manifest constant! -no overlap-
  57.  *   h    sundev/hrc_common.h
  58.  *   i    sys/sockio.h            *overlap*
  59.  *   i    vaxuba/ikreg.h            *overlap*
  60.  *   k    sundev/kbio.h
  61.  *   m    sundev/msio.h            (possible overlap)
  62.  *   m    sundev/msreg.h            (possible overlap)
  63.  *   m    sys/mtio.h            (possible overlap)
  64.  *   n    sun/ndio.h
  65.  *   p    net/nit_buf.h            (possible overlap)
  66.  *   p    net/nit_if.h            (possible overlap)
  67.  *   p    net/nit_pf.h            (possible overlap)
  68.  *   p    sundev/fpareg.h            (possible overlap)
  69.  *   p    sys/sockio.h            (possible overlap)
  70.  *   p    vaxuba/psreg.h            (possible overlap)
  71.  *   q    sun/sqz.h
  72.  *   r    sys/sockio.h
  73.  *   s    sys/sockio.h
  74.  *   t    sys/ttold.h            (possible overlap)
  75.  *   t    sys/ttycom.h            (possible overlap)
  76.  *   v    sundev/vuid_event.h        *overlap*
  77.  *   v    sys/vcmd.h            *overlap*
  78.  *
  79.  * End of Registry
  80.  */
  81.  
  82. #endif /* !__sys_ioccom_h */
  83. #endif
  84.