On 8/10/05, Sergey Uvarov <[EMAIL PROTECTED]> 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 >
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. > 3) add a file in /dev and use ioctl(2) call > 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? > 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 "[EMAIL PROTECTED]" > -- 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. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"