ioccom.h File Reference

API published in:
API deprecated in:


#include <sys/cdefs.h>

Go to the source code of this file.


Defines

#define  IOCPARM_MASK   0x1fff
#define  IOCPARM_LEN(x)   (((x) >> 16) & IOCPARM_MASK)
#define  IOCBASECMD(x)   ((x) & ~(IOCPARM_MASK << 16))
#define  IOCGROUP(x)   (((x) >> 8) & 0xff)
#define  IOCPARM_MAX   PAGE_SIZE
#define  IOC_VOID   0x20000000
#define  IOC_OUT   0x40000000
#define  IOC_IN   0x80000000
#define  IOC_INOUT   (IOC_IN|IOC_OUT)
#define  IOC_DIRMASK   0xe0000000
#define  _IOC(inout, group, num, len)   ((unsigned long)(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)))
#define  _IO(g, n)   _IOC(IOC_VOID, (g), (n), 0)
#define  _IOR(g, n, t)   _IOC(IOC_OUT, (g), (n), sizeof(t))
#define  _IOW(g, n, t)   _IOC(IOC_IN, (g), (n), sizeof(t))
#define  _IOWR(g, n, t)   _IOC(IOC_INOUT, (g), (n), sizeof(t))

Functions

__BEGIN_DECLS IMPORT_C int  ioctl (int, unsigned long,...)

Define Documentation

#define _IO g,
 )     _IOC(IOC_VOID, (g), (n), 0)
 
#define _IOC inout,
group,
num,
len   )     ((unsigned long)(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)))
 
#define _IOR g,
n,
 )     _IOC(IOC_OUT, (g), (n), sizeof(t))
 
#define _IOW g,
n,
 )     _IOC(IOC_IN, (g), (n), sizeof(t))
 
#define _IOWR g,
n,
 )     _IOC(IOC_INOUT, (g), (n), sizeof(t))
 
#define IOC_DIRMASK   0xe0000000
 
#define IOC_IN   0x80000000
 
#define IOC_INOUT   (IOC_IN|IOC_OUT)
 
#define IOC_OUT   0x40000000
 
#define IOC_VOID   0x20000000
 
#define IOCBASECMD  )     ((x) & ~(IOCPARM_MASK << 16))
 
#define IOCGROUP  )     (((x) >> 8) & 0xff)
 
#define IOCPARM_LEN  )     (((x) >> 16) & IOCPARM_MASK)
 
#define IOCPARM_MASK   0x1fff
 
#define IOCPARM_MAX   PAGE_SIZE
 

Function Documentation

__BEGIN_DECLS IMPORT_C int ioctl int  ,
unsigned  long,
  ...
 

Copyright © Nokia Corporation 2001-2008
Back to top