Hi, hackers.
I have been given the task of writing a PCI device driver for
a special card on 4.0-RELEASE.
But I'm novice in device driver programming.
In writing ioctl routine, I have to decide ioctl command code.
So I saw some other device driver source code and system header
files, I found some macros in <sys/ioccom.h>.
#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))
/* this should be _IORW, but stdio got there first */
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
What 'group' should I use ?
Regards,
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message