Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2001 19:48:10 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Stuart Eichert <seichert@coopcomp.com>
Cc:        net@freebsd.org
Subject:   Re: Am I missing something?
Message-ID:  <Pine.BSF.4.21.0106271946380.91536-100000@InterJet.elischer.org>
In-Reply-To: <20010627111222.A9434@gourdy.coopcomp.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106271946380.91536-100000>