From owner-freebsd-net Wed Jun 27 18:24:12 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 32F6337B405 for ; Wed, 27 Jun 2001 18:24:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id TAA91579; Wed, 27 Jun 2001 19:48:10 -0700 (PDT) Date: Wed, 27 Jun 2001 19:48:10 -0700 (PDT) From: Julian Elischer To: Stuart Eichert Cc: net@freebsd.org Subject: Re: Am I missing something? In-Reply-To: <20010627111222.A9434@gourdy.coopcomp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 27 Jun 2001, Stuart Eichert wrote: > In the past (under FreeBSD 3.0 and 3.3) I implemented a new networking > protocol, that ran over Ethernet(and nothing else for that matter). I > put a new ETHERTYPE into ethernet.h(0x0801 for the record). In addition > I modified the switch statements in if_ethersubr.c:ether_output and > if_ethersubr.c:ether_input to recognize this type and act accordingly. > In addition I modified sys/socket.h to add an additional address family > and protocol family for my protocol. From there I implemented the protocol > in a separate directory, made some changes in the conf directory and then > I was able to compile a new kernel with support for my protocol. > > This is cool and all (and yes I have updated it to work in 4.3), but I don't > like the idea that anyone who wants to try out this protocol and any associated > programs has to recompile an entire kernel. I would much prefer to create > a kernel module that someone can load, test, and then unload. I don't think > that I can do this however, because of the ethernet routines in if_ethersubr.c. > These routines do not allow for the dynamic addition of new ETHERTYPES. > I guess one could screw around with netgraph or tap(though I really know next > to nothing about them), but that would not allow me to plug the protocol > in below the socket layer. You can extensibly add a protocol to the socket layer from a module.. the ng_socjet node type does so.. (as an example) so you can prototype the entire protocol using ng_ether at the bottom and a socket at the top. similar to how ng_ether or divert sockets do it. > > Is there no way to make a kernel module that will allow for the > dynamic addition of ethernet protocols or am I just missing something? > > -- > ------------ > Stuart Eichert > Cooperative Computers, Inc. > seichert@coopcomp.com > (650)938-0730 x 15 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message