From owner-freebsd-net@FreeBSD.ORG Mon Mar 8 22:54:05 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 DED6116A4CE; Mon, 8 Mar 2004 22:54:05 -0800 (PST) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C904643D1D; Mon, 8 Mar 2004 22:54:04 -0800 (PST) (envelope-from ru@ip.net.ua) Received: from heffalump.office.ipnet (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.10/8.12.9) with ESMTP id i296vR1t042481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Mar 2004 08:57:29 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.office.ipnet (8.12.11/8.12.11) id i296ruf3055185; Tue, 9 Mar 2004 08:53:56 +0200 (EET) (envelope-from ru) Date: Tue, 9 Mar 2004 08:53:56 +0200 From: Ruslan Ermilov To: Gleb Smirnoff , julian@freebsd.org, archie@freebsd.org, freebsd-net@freebsd.org Message-ID: <20040309065356.GA55139@ip.net.ua> References: <200403072302.i27N2StR008804@freefall.freebsd.org> <20040308102033.GA66247@cell.sick.ru> <20040308212939.GB30394@ip.net.ua> <20040308214820.GA68803@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline In-Reply-To: <20040308214820.GA68803@cell.sick.ru> User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: 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: Tue, 09 Mar 2004 06:54:06 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 09, 2004 at 12:48:20AM +0300, Gleb Smirnoff wrote: > On Mon, Mar 08, 2004 at 11:29:39PM +0200, Ruslan Ermilov wrote: > R> > I have one more idea. Currently we have got 3 interface nodes: ng_= ether, ng_iface, > R> > ng_eiface. 2 of them already support "getifindex" message, imagine I= (or someone else) send > R> > you patch tomorrow, which adds support to ng_eiface. OK, now all thr= ee support. May be > R> > in future some new interface nodes will be developed. > R> >=20 > R> > Imagine the following: you have node, which is connected to some g= eneric > R> > interface (it doesn't know which node type exactly). This node wants= to > R> > determine interface index of attached interfac. It would send 3 "get= ifindex" messages with 3 > R> > different cookies. Two of messages will always fail, and one return.= This is not nice. > R> >=20 > R> > What I suggest: create a new semi-generic cookie NGM_GENERICIFACE_CO= OKIE, which will be > R> > supported by all interface nodes. Put NGM_GENERICIFACE_GETIFINDEX me= ssage under > R> > NGM_GENERICIFACE_COOKIE case brackets. If you like this idea, please= reply me. And I'll send > R> > patches. > R> >=20 > R> How do you think "ngctl msg ng0: getifindex" works? ;) >=20 > So, you suggest to use ASCII message in situation described above? IMHO, = ASCII messages were=20 > invented for human interface purposes, not for node interaction. >=20 OK, how about sending a NGM_NODEINFO message to the node, and picking up XXX for (NGM_XXX_COOKIE, NGM_XXX_GET_IFNAME) based on the returned type? Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFATWoEUkv4P6juNwoRAhnmAJ9aN+qcR0Ccsk61ldBZrc4RqyUrQgCdGdJQ ojZgAuxOoOGp70cTmR8+zT4= =zrDb -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v--