Subject: Re: thoughts on a dohooks(9) API?
To: Jeff Rizzo <riz@netbsd.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 01/04/2006 23:47:45
On 1/4/06, Jeff Rizzo <riz@netbsd.org> wrote:
> I'm helping someone to port carp(4) from OpenBSD
> (comments/flames/whatever on the desirability of THAT in another thread,
> please :), and we've come across some instances where we need to add
> hooks to certain events (interface up, address change, etc). OpenBSD
> has a dohooks(9) API that is used to implement various hook-needing
> functions (their doshutdownhooks() is implemented on top of it, for
> example). I've done some poking around in kern_subr.c, and it looks
> like we actually have almost all of the blocks that their API is built
> on top of already, so I'm wondering if people think this would be a good
> thing to import, or not, before I spend any time on it. Is it
> worthwhile to get a little API convergence, here? I don't necessarily
> think we should copy it exactly, but think a more general "hooks"
> mechanism is warranted...
Take a look to the vfs_hooks(9) I added some months ago.
It'd be nice if a more generic interface was designed and replaced
all the other existing ones (if possible).
Cheers,
--
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/
The NetBSD Project - http://www.NetBSD.org/