From owner-freebsd-arch Sun Jun 18 14:43:58 2000 Delivered-To: freebsd-arch@freebsd.org Received: from mail.bastard.co.uk (node16292.a2000.nl [24.132.98.146]) by hub.freebsd.org (Postfix) with ESMTP id 5B5EE37BA22 for ; Sun, 18 Jun 2000 14:43:54 -0700 (PDT) (envelope-from adrian@bastard.co.uk) Received: from adrian by mail.bastard.co.uk with local (Exim 3.14 #1) id 133mr4-0003TM-00; Sun, 18 Jun 2000 23:43:46 +0200 Date: Sun, 18 Jun 2000 23:43:46 +0200 From: Adrian Chadd To: Alfred Perlstein Cc: arch@freebsd.org Subject: Re: accept filters Message-ID: <20000618234346.I13112@zoe.bastard.co.uk> References: <20000618140412.F18462@fw.wintelcom.net> <20000618162502.A619@prism.flugsvamp.com> <20000618142743.G18462@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000618142743.G18462@fw.wintelcom.net>; from bright@wintelcom.net on Sun, Jun 18, 2000 at 02:27:43PM -0700 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jun 18, 2000, Alfred Perlstein wrote: > * Jonathan Lemon [000618 14:20] wrote: > > On Sun, Jun 18, 2000 at 02:04:12PM -0700, Alfred Perlstein wrote: > > > http://people.freebsd.org/~alfred/accf.diff > > > > This part I somewhat dislike: > > > > struct socket { > > struct vm_zone *so_zone; /* zone we were allocated from */ > > short so_type; /* generic type, see socket.h */ > > @@ -112,6 +114,9 @@ > > /* NB: generation count must not be first; easiest to make it last. */ > > so_gen_t so_gencnt; /* generation count */ > > void *so_emuldata; /* private data for emulators */ > > + struct accept_filter *so_accept_filter; > > + void *so_accept_filter_arg; /* saved filter args */ > > + char *so_accept_filter_str; /* saved user args */ > > }; > > > > Isn't there a better way of doing this than adding more elements > > to every socket? Especially since this only applies to listen() > > sockets? > > I could make it just one pointer to a struct that holds all three? > > Or I can take out the passing of arguments to accept filters, but > I thought otherwise people would complain that it isn't > bloated^H^H^H^H^H^H^Hmodular enough. And it would also annoy me > because it was difficult to do... I like the idea as a whole, and I like the idea of having it as one pointer to a struct where applicable. Neat one. Adrian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message