Subject: Re: Question on ioctl
To: Martin Husemann <martin@duskware.de>
From: Steven M. Bellovin <smb@research.att.com>
List: netbsd-users
Date: 02/15/2002 17:34:27
In message <20020215193739.GC2423@night-porter.duskware.de>, Martin Husemann wr
ites:
>> Is this format for 'request' enforced anywhere in NetBsd, or is
>> it just a convention?
>
>Well, this is used to copy the argument between kernel and user space. So
>if you don't follow it, be sure to mark the ioctl as IOC_VOID.
>
More explicitly -- a higher layer of the kernel than the individual 
device driver does the copyin/copyout for ioctl arguments.  If you want 
to use that mechanism -- and in my opinion you'd need really strong 
justification to do anything else -- you have to abide by the format.

		--Steve Bellovin, http://www.research.att.com/~smb
		Full text of "Firewalls" book now at http://www.wilyhacker.com