Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2014 12:11:17 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Luigi Rizzo <rizzo@iet.unipi.it>, current@freebsd.org
Subject:   Re: any use for sys/sys/selinfo.h outside the kernel ?
Message-ID:  <201401281211.17679.jhb@freebsd.org>
In-Reply-To: <20140122223836.GA292@onelab2.iet.unipi.it>
References:  <20140122223836.GA292@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, January 22, 2014 5:38:36 pm Luigi Rizzo wrote:
> Looking at sys/sys/selinfo.h i see that parts of it are in
> 
> 	#ifdef _KERNEL
> 	...
> 	#endif
> 
> but it seems to me that also the remaining content (definition
> of struct selinfo) is only of use within the kernel -- or possibly
> to programs who want to peek into kmem.
> 
> So i wonder, does it make sense to have the #ifdef _KERNEL guard
> at all, or should we push it to the entire content of the file ?
> 
> Same goes probably for other files in sys/sys describing kernel
> data structures, e.g. sys/sys/socketvar.h etc.

Some things (ab)use socket ones (probably lsof for example).  I'm not
sure of any that need selinfo, though they may need it indirectly.
For example, since lsof wants to look at sockets, it needs sockbuf,
and sockbuf needs selinfo, etc.

-- 
John Baldwin



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