From owner-freebsd-net@FreeBSD.ORG Fri Mar 19 05:42:32 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A52B16A4CE; Fri, 19 Mar 2004 05:42:32 -0800 (PST) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6059E43D31; Fri, 19 Mar 2004 05:42:31 -0800 (PST) (envelope-from glebius@cell.sick.ru) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.9/8.12.8) with ESMTP id i2JDgSQE039852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Mar 2004 16:42:29 +0300 (MSK) (envelope-from glebius@cell.sick.ru) Received: (from glebius@localhost) by cell.sick.ru (8.12.9/8.12.6/Submit) id i2JDgSt1039851; Fri, 19 Mar 2004 16:42:28 +0300 (MSK) Date: Fri, 19 Mar 2004 16:42:28 +0300 From: Gleb Smirnoff To: harti@freebsd.org Message-ID: <20040319134228.GB39787@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , harti@freebsd.org, Ruslan Ermilov , julian@freebsd.org, archie@freebsd.org, freebsd-net@freebsd.org References: <200403072302.i27N2StR008804@freefall.freebsd.org> <20040308102033.GA66247@cell.sick.ru> <20040308212939.GB30394@ip.net.ua> <20040308214820.GA68803@cell.sick.ru> <20040309065356.GA55139@ip.net.ua> <20040309185957.GB74537@cell.sick.ru> <20040316230130.GA20251@cell.sick.ru> <20040319115814.E41950@beagle.fokus.fraunhofer.de> <20040319123329.GA39103@cell.sick.ru> <20040319141700.J42356@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20040319141700.J42356@beagle.fokus.fraunhofer.de> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org Subject: Re: Nodes having common properties. Was: kern/63864: [patch] new control message for ng_iface(4) - getifindex X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2004 13:42:32 -0000 On Fri, Mar 19, 2004 at 02:24:47PM +0100, Harti Brandt wrote: H> From the point of code duplication and extendibility both approaches are H> equivalent. In the second case you have the same three lines in the rcvmsg H> function of every node that supports a given familiy (this is reduceable H> to 1 line by defining appropriate macros), in the first one you have the H> same line in every constructor. Perhaps I made not clear that the message H> handling function for the familiy is not in the node's code nor in the H> netgraph base code, but in a family file (in both cases) and module. I understand, now. If ng_process_family_xxx_msg() is out of node, than you are right - approeaches are equivalent. H> But I have no strong opinion: either way does it as long as it allows H> multiple interfaces to a given node. OK, let's wait for reply from someone in Cc: :) -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE