From owner-freebsd-hackers Fri Dec 22 9:49:39 2000 From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 22 09:49:27 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 76DBC37B400; Fri, 22 Dec 2000 09:49:26 -0800 (PST) Received: from curve.dellroad.org (curve.dellroad.org [10.1.1.30]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id JAA43179; Fri, 22 Dec 2000 09:49:25 -0800 (PST) Received: (from archie@localhost) by curve.dellroad.org (8.11.0/8.11.0) id eBMHnPG81236; Fri, 22 Dec 2000 09:49:25 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200012221749.eBMHnPG81236@curve.dellroad.org> Subject: Re: [Re: New netgraph features?] In-Reply-To: <20001222074211.20124.qmail@nw174.netaddress.usa.net> "from John Smith at Dec 22, 2000 00:42:11 am" To: John Smith Date: Fri, 22 Dec 2000 09:49:25 -0800 (PST) Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Smith writes: > >- We'd need to enhace the definition of a netgraph address > > to include, say, an IP address, eg.: > > > > $ ngctl msg 192.168.1.12:foo: blah blah > > Well, I was thinking about this. I would like to share > this pre-idea and to receive your opinions. > I have one question here. Why should it be limited > to UDP... (or whatever protocol)? Are we going to > loose something, if we, say, create special node > for 'netgraph tunneling' (so that it may ot may not > be included into a running kernel) then connect > this node to another one, which will be used for > 'transport' layer. Such a node could possibly be > used to encode/decode the inter-netgraph messages. > Other nodes' names then should include > the transport layer address. This way I think we > won't get limited to one protcol... Your idea of being protocol agnostic is more general.. however, there is a slightly larger problem I didn't mention before. Address syntax is parsed by the base code (ng_base.c). The syntax of an address is not something an individual node gets to decide.. so there are two possibilities.. You could do multi-host netgraph using a "private" addressing scheme, simply by defining a control message that contained inside it an IP address (or whatever), a netgraph address on the remote machine, and a payload control message. Then write a node that knows how to (de)encapsulate these control messages and send/recv them over the network. But then you have something like this: $ ngctl msg relaynode: { ip=192.168.1.12 addr="foo:" ... } instead of this: $ ngctl msg 192.168.1.12:foo: blah blah To get the "cooler" case #2 behavior, there would need to be "global" knowledge of the addressing scheme, which is of course tied into the delivery protocol because the generalized netgraph address must contain a protocol address (IP address or whatever). Now.. we do have a syntax for describing a struct sockaddr of any type (eg, ng_ksocket(4) node). So the protocol address could just be an ASCII struct sockaddr and that would be as general as it gets. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message