Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2005 23:36:56 +0300
From:      Vlad GALU <vladgalu@gmail.com>
To:        Sergey Uvarov <uvarovsl@mail.pnpi.spb.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: preferable way to control kernel module
Message-ID:  <79722fad050810133651d0bc25@mail.gmail.com>
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 8/10/05, Sergey Uvarov <uvarovsl@mail.pnpi.spb.ru> wrote:
> Hello hackers,
>=20
> I'm writing a kernel module for my own needs. AFAIK the following
> methods could be used:
>=20
> 1) allocate not used system call with help of SYSCALL_MODULE macro
>=20

   1 syscall

> 2) allocate proprieatry oid via SYSCTL_OID(OID_AUTO) and write an
> appropriate sysctl handler(s)
>
   1 syscall + some work on the handler, but less flexibility. You
can't pass much information as an OID value.
=20
> 3) add a file in /dev and use ioctl(2) call
>=20
   at least 2 syscalls (open()/ioctl()). The flexibility would be the
same as 1), since you would also probably pass info packed in a
structure that is the argument for the ioctl(). But you'd have to do
slightly more work involving the /dev entry.

> What is a preferable way to control my module?
>=20
 =20
  I would go for 1. But then again, I might be wrong. Better wait to
hear more suggestions before choosing a design.

> Thanks in advance,
>         Sergey.
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org=
"
>=20


--=20
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.



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