Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2005 16:40:27 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Cc:        Sergey Uvarov <uvarovsl@mail.pnpi.spb.ru>
Subject:   Re: preferable way to control kernel module
Message-ID:  <200508101640.28555.jhb@FreeBSD.org>
In-Reply-To: <42FA63A3.4040802@mail.pnpi.spb.ru>
References:  <42FA63A3.4040802@mail.pnpi.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508101640.28555.jhb>