preferable way to control kernel module
John Baldwin
jhb at FreeBSD.org
Wed Aug 10 20:57:38 GMT 2005
On Wednesday 10 August 2005 04:29 pm, Sergey Uvarov wrote:
> Hello hackers,
>
> I'm writing a kernel module for my own needs. AFAIK the following
> methods could be used:
>
> 1) allocate not used system call with help of SYSCALL_MODULE macro
>
> 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an
> appropriate sysctl handler(s)
>
> 3) add a file in /dev and use ioctl(2) call
>
> What is a preferable way to control my module?
It depends on what you want to do really. I've used sysctl's for simple debug
modules where I write to the sysctl to have it perform a desired action.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-hackers
mailing list