From owner-freebsd-current@FreeBSD.ORG Mon Sep 6 20:26:42 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EA5A10656A3 for ; Mon, 6 Sep 2010 20:26:42 +0000 (UTC) (envelope-from listas@secover.com.br) Received: from hm1315-19.locaweb.com.br (hm1315-19.locaweb.com.br [201.76.49.149]) by mx1.freebsd.org (Postfix) with ESMTP id CC6718FC13 for ; Mon, 6 Sep 2010 20:26:41 +0000 (UTC) Received: from hm2084.locaweb.com.br (189.126.112.73) by hm1315-38.locaweb.com.br (PowerMTA(TM) v3.5r15) id hgl7820nvfo6 for ; Mon, 6 Sep 2010 17:26:28 -0300 (envelope-from ) Received: from [189.126.112.73] (localhost [127.0.0.1]) by hm2084.locaweb.com.br (Postfix) with ESMTP id AF97E440133; Mon, 6 Sep 2010 17:26:28 -0300 (BRT) Received: from cl03.mobimail.com (hm2443.locaweb.com.br [187.45.209.25]) by hm2084.locaweb.com.br (Postfix) with ESMTP id A3A63440263; Mon, 6 Sep 2010 17:26:26 -0300 (BRT) Received: from [189.105.97.73] (account listas@secover.com.br HELO [192.168.1.2]) by hm2443.cl03.mobimail.com (CommuniGate Pro SMTP 5.2.16) with ESMTPSA id 95341208; Mon, 06 Sep 2010 17:26:21 -0300 Message-ID: <4C854E6A.1030504@secover.com.br> Date: Mon, 06 Sep 2010 17:26:18 -0300 From: Anderson Eduardo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Luigi Rizzo References: <4C825094.5040204@secover.com.br> <20100905155311.GA48095@onelab2.iet.unipi.it> In-Reply-To: <20100905155311.GA48095@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Checked: YES, Locaweb Anti-spam Cc: freebsd-current@freebsd.org Subject: Re: Using ipfw table names instead of numbers. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2010 20:26:42 -0000 Em 5/9/2010 12:53, Luigi Rizzo escreveu: > On Sat, Sep 04, 2010 at 10:58:44AM -0300, Anderson Eduardo wrote: >> Hello developers, >> >> I use the ipfw firewall with many tables and, I would like of able to >> use it with name/alias instead of just numbers. >> >> E.g: >> >> lab# ipfw table 1 name lanetwork >> Setting table 1 to lanetwork >> lab# ipfw table lanetwork add 192.168.0.0/24 >> lab# ipfw table lanetwork list >> 192.168.0.0/24 0 >> lab# >> >> I think a good idea a patch to do that. > > if you have a patch feel free to post it. > the main issue is that internally, for efficiency reason, > the name must be translated to a number anyways, so before implementing > it one must decide where the name-number translation table is stored > and how it is managed > The same applies to any name vs. number issue in ipfw/dummynet > Service, protocol and host names solve these issues because there > is a well defined place for the translation table. But, for instance, > hostname mappings are static (translated at rule insertion time) > whereas one might want a more dynamic behaviour (e.g. refresh > whenever the DNS response expires). > > cheers > luigi Luigi, I did some changes just in user-land, I didn't touch in kernel. I will check if I can do that, I'm not a good developer. Thanks. --=20 Anderson Eduardo Diretor Geral Tel.: +55 (71) 3641-6450 Secover - Servi=E7os em Tecnologia e Seguran=E7a da Informa=E7=E3o http://www.secover.com.br