SA add notification to externa module
Robert Watson
rwatson at FreeBSD.org
Tue Mar 17 05:20:48 PDT 2009
On Tue, 17 Mar 2009, srikanth jampala wrote:
> This is my first posting.
>
> I want the notifications about the SA (security association) add/delete
> events, from the kernel to my externel kernel module.
>
> How can I do this... ?
>
> Thanks in advance for ur suggestions.
I'm not sure if PF_KEY has an async notification event, but in principle you
could consume those inside the kernel, not just in a user application.
Alternatively, you might reasonably submit a patch to add an EVENTHANDLER(9)
event at the right points in the kernel code so that future versions of
FreeBSD will allow your code to plug in more easily. We already provide event
handler hooks for things like process fork/exit, arrival/departure of network
interfaces, etc. The trick is to place them at the right points so that
appropriate locks are held, and you'll want to avoid having your handler code
change the semantics of the calling site (i.e., don't sleep if that's not
allowed).
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the freebsd-hackers
mailing list