Date: Tue, 17 Mar 2009 12:20:47 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: srikanth jampala <srikanthhcu05@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: SA add notification to externa module Message-ID: <alpine.BSF.2.00.0903171219000.32289@fledge.watson.org> In-Reply-To: <a557faae0903170157m6b8a8ff7v6a9ec0a788c365b8@mail.gmail.com> References: <a557faae0903170157m6b8a8ff7v6a9ec0a788c365b8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0903171219000.32289>