From owner-freebsd-ipfw@FreeBSD.ORG Sun Jan 10 22:06:17 2010 Return-Path: Delivered-To: ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85BD01065670 for ; Sun, 10 Jan 2010 22:06:17 +0000 (UTC) (envelope-from gelraen.ua@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 15E0F8FC12 for ; Sun, 10 Jan 2010 22:06:16 +0000 (UTC) Received: by bwz5 with SMTP id 5so13364951bwz.3 for ; Sun, 10 Jan 2010 14:06:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=wqbDwOa2vyrXD2vczT1Mp24bYHdTvaYGiscSBzGdXEU=; b=jz0etz3OZEPDkuaMLEfZ7khkJvWI9ZAqNuq0+Cdpgnrf303XxyzTzHtsGJIOIflon0 mPTjQRpFh1peT+RoZDLOgUPGVA7kiR01zuXu0/PbgBDoJy60FDMSNjek8n921xCBPd+f dky7onRT2FNaaajdFRwtBo7VlN1W8B8XqtoTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=BDBXdLlrgX14g57o8JYGYMZPdytLzr3WtZnq6St7ONkt1xMWy3753kjS9YNLsfrFyc A0ZSYaDkI6gMGp0TD++H9RCcBmx1h4/Jr62cB0/MF6T756NhwiMOpCc5fgpoTCsMKHI9 PUokjPpv1wifXUq55OwEwyCiA8gVlynK12gyU= MIME-Version: 1.0 Received: by 10.204.9.4 with SMTP id j4mr1635178bkj.160.1263159777112; Sun, 10 Jan 2010 13:42:57 -0800 (PST) In-Reply-To: <20091209183821.GA40814@onelab2.iet.unipi.it> References: <20091209183821.GA40814@onelab2.iet.unipi.it> From: Maxim Ignatenko Date: Sun, 10 Jan 2010 23:42:37 +0200 Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: ipfw@freebsd.org Subject: Re: RFC: new ipfw options X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 22:06:17 -0000 2009/12/9 Luigi Rizzo : > 3. a hash version of 'table's > > =C2=A0 Right now ipfw tables are implented as routing tables, which is > =C2=A0 great if you have to lookup a longest matching prefix, but a > =C2=A0 bit overkill if you care only for ports or jail ids, and > =C2=A0 totally uninteresting if you want to lookup flow ids, > =C2=A0 or generic sequence of bytes. My plan here is to reuse the > =C2=A0 ipfw hash tables to make them available for 'ipfw table ...' > =C2=A0 commands. To avoid code and syntax bloat, I'd use the number > =C2=A0 0..TABLE_MAX-1 for the existing prefix tables, and > =C2=A0 TABLE_MAX..2TABLE_MAX-1 for the new hash tables. > > comments welcome > I think better use another name ('htable' for example) instead of overloading the old one. And thanks for great ideas.