Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2004 08:53:56 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Gleb Smirnoff <glebius@cell.sick.ru>, julian@freebsd.org, archie@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: kern/63864: [patch] new control message for ng_iface(4) - getifindex
Message-ID:  <20040309065356.GA55139@ip.net.ua>
In-Reply-To: <20040308214820.GA68803@cell.sick.ru>
References:  <200403072302.i27N2StR008804@freefall.freebsd.org> <20040308102033.GA66247@cell.sick.ru> <20040308212939.GB30394@ip.net.ua> <20040308214820.GA68803@cell.sick.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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 three support. May be
> R> > in future some new interface nodes will be developed.
> R> > 
> R> >   Imagine the following: you have node, which is connected to some generic
> 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 "getifindex" messages with 3
> R> > different cookies. Two of messages will always fail, and one return. This is not nice.
> R> > 
> R> > What I suggest: create a new semi-generic cookie NGM_GENERICIFACE_COOKIE, which will be
> R> > supported by all interface nodes. Put NGM_GENERICIFACE_GETIFINDEX message under
> R> > NGM_GENERICIFACE_COOKIE case brackets. If you like this idea, please reply me. And I'll send
> R> > patches.
> R> > 
> R> How do you think "ngctl msg ng0: getifindex" works?  ;)
> 
> So, you suggest to use ASCII message in situation described above? IMHO, ASCII messages were 
> invented for human interface purposes, not for node interaction.
> 
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,
-- 
Ruslan Ermilov
FreeBSD committer
ru@FreeBSD.org

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFATWoEUkv4P6juNwoRAhnmAJ9aN+qcR0Ccsk61ldBZrc4RqyUrQgCdGdJQ
ojZgAuxOoOGp70cTmR8+zT4=
=zrDb
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040309065356.GA55139>