From owner-freebsd-arch Sun Jun 18 14:28: 6 2000 Delivered-To: freebsd-arch@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id A7B6637B525 for ; Sun, 18 Jun 2000 14:28:04 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e5ILRhM15877; Sun, 18 Jun 2000 14:27:43 -0700 (PDT) Date: Sun, 18 Jun 2000 14:27:43 -0700 From: Alfred Perlstein To: Jonathan Lemon Cc: arch@FreeBSD.ORG Subject: Re: accept filters Message-ID: <20000618142743.G18462@fw.wintelcom.net> References: <20000618140412.F18462@fw.wintelcom.net> <20000618162502.A619@prism.flugsvamp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000618162502.A619@prism.flugsvamp.com>; from jlemon@flugsvamp.com on Sun, Jun 18, 2000 at 04:25:02PM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * 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... -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message