From owner-freebsd-net Sat Jan 30 11:16:09 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA27382 for freebsd-net-outgoing; Sat, 30 Jan 1999 11:16:09 -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 LAA27377 for ; Sat, 30 Jan 1999 11:16:07 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id LAA08180; Sat, 30 Jan 1999 11:10:23 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma008176; Sat, 30 Jan 99 11:10:08 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id LAA09983; Sat, 30 Jan 1999 11:10:08 -0800 (PST) From: Archie Cobbs Message-Id: <199901301910.LAA09983@bubba.whistle.com> Subject: Re: netgraph... In-Reply-To: <9165.917685127@critter.freebsd.dk> from Poul-Henning Kamp at "Jan 30, 99 09:32:07 am" To: phk@critter.freebsd.dk (Poul-Henning Kamp) Date: Sat, 30 Jan 1999 11:10:08 -0800 (PST) Cc: julian@whistle.com, 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 Poul-Henning Kamp writes: > >The point is that you avoid having to parse ASCII strings > >for *every* control message. > > I simply don't understand why we can't have a single type of > controlmessage that means > > "Here is an ascii string to you from the super-user, do > whatever he tells you to, thankyou!" > > That's what I'm asking for, no more, no less. (why is this so hard to communicate) Are you saying you really don't understand, or you just weigh the priorities differently? The reason is: It's important that control message delivery between nodes be as fast as possible (read: no encoding/decoding between binary and ASCII for every message). This is so we can support situations where there are hundreds of these messages flying around per second, ie, for flow control or whatever. Maybe you don't care as much about this, but I do.. BUT, we can satisfy your need as well. We'll add a new base function: extern int ng_send_ascii_msg(node_p here, const char *path const char *asciimsg, struct ng_mesg **rptr); This function will simply do this: int ng_send_ascii_msg(ode_p here, const char *path const char *asciimsg, struct ng_mesg **rptr) { struct ng_mesg decode_msg, *decode_reply; int error; NG_MKMESSAGE(decode_msg, NGM_GENERIC_COOKIE, NGM_DECODE_MSG, asciimsg, strlen(asciimsg)); error = ng_send_msg(here, decode_msg, path, &decode_reply); if (error != 0) return(error); return (ng_send_msg(here, decode_reply, path, rptr)); } So the sender can chose how they want to encode their message. -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