Date: Fri, 18 Oct 1996 19:12:43 -0400 (EDT) From: rohit@cs.umd.edu (Rohit Dube) To: freebsd-hackers@freebsd.org Subject: Conventions/Rules for adding Local ioctls Message-ID: <199610182312.TAA04920@seine.cs.umd.edu>
next in thread | raw e-mail | index | archive | help
Hi,
I have been writing a pseudo-device driver (using a Major Device
number reserved for local use). I need to add some ioctls to
this pseudo-device driver.
I was wondering if there are any (FreeBSD/BSD/Unix) rules which specify
the definition of new local ioctls? In other words, how do I add a
'group' and a 'num' to an ioctl command meant for local consumption,
without running the risk of conflicting with any current or future
code?
Thanks.
--rohit.
PS:
sys/sys/ioccom.h -
#define _IOC(inout,group,num,len) \
(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
sys/net/local.h
#define _IOWR ('?', ???, u_int)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610182312.TAA04920>
