From owner-freebsd-net Fri Jan 29 18:37:05 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA29145 for freebsd-net-outgoing; Fri, 29 Jan 1999 18:37:05 -0800 (PST) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA29138 for ; Fri, 29 Jan 1999 18:37:03 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id SAA00837; Fri, 29 Jan 1999 18:31:24 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma000835; Fri, 29 Jan 99 18:31:16 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id SAA04944; Fri, 29 Jan 1999 18:31:16 -0800 (PST) From: Archie Cobbs Message-Id: <199901300231.SAA04944@bubba.whistle.com> Subject: Re: netgraph... In-Reply-To: from Julian Elischer at "Jan 29, 99 05:41:40 pm" To: julian@whistle.com (Julian Elischer) Date: Fri, 29 Jan 1999 18:31:16 -0800 (PST) Cc: phk@critter.freebsd.dk, net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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