Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 1999 18:31:16 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        julian@whistle.com (Julian Elischer)
Cc:        phk@critter.freebsd.dk, net@FreeBSD.ORG
Subject:   Re: netgraph...
Message-ID:  <199901300231.SAA04944@bubba.whistle.com>
In-Reply-To: <Pine.BSF.3.95.990129172125.17781D-100000@current1.whistle.com> from Julian Elischer at "Jan 29, 99 05:41:40 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer writes:
> > Then ngctl could send control messages to encode and decode, while
> > 'normal' control messages between nodes stayed in binary form.
> 
> The whole idea of asking the kernel to translate a message destined for
> the kernel makes me feel a little ill.

Why?

We all would rather do the translation in user space, but that has
greater costs in terms of linkage problems (ELF sections and all
that) if you want to preserve the sensible goal of keeping the
encoding/decoding code with the rest of the node's code.

> Either the module can just translate it itself, (I'm not sure of argc/argv

I think we should clearly separate ("orthogonalize") the
encoding/decoding business from the delivery of the actual message.
Otherwise, should it become easier someday in the future to do it
in user space, it would be more difficult to extract that code
out.. not just from the node, but from all the other user programs
that may rely on it.

Orthogonality and cleanliness is always better, all things being
equal.  And here they are equal, because there's no *advantage* to
having the node translate it itself.  Remember, we're not talking
high performance operations here.

> or just a string), Or maybe it can send out a "format string" type
> template that allows an interpretter to pack structs to its
> specifications. 
> 
> e.g.
> "23=[-A %d.%d.%d.%d]->8:8:8:8"
> 
> (message 23 is recognosed by the -A flag and wants the following 4 decimal
> entities packed into 4 8bit fields)  A single standard message could
> deliver all the messages a node is expecting.  and we could probably do a
> better 'language' if we spent more than the 60 seconds I did on this one.. 
> kind of liek an RPC specification, but human->RPC rather than
> native-binary->RPC. The cost of the interpretter would be born (shared) by
> all the nodes

Blech! :-)

What happened to KISS?? Now you're talking about inventing some
crazy language.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



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