Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jul 2003 12:38:04 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        dsze@engmail.uwaterloo.ca
Subject:   Re: Question about bridging code
Message-ID:  <Pine.BSF.4.21.0307091237080.22588-100000@InterJet.elischer.org>
In-Reply-To: <20030709193353.GA17128@Odin.AC.HMC.Edu>

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


On Wed, 9 Jul 2003, Brooks Davis wrote:

> On Wed, Jul 09, 2003 at 03:23:52PM -0400, kw3wong@engmail.uwaterloo.ca wrote:
> > Hi guys,
> > 
> > My first attempts at hacking FreeBSD kernel code has not been very fruitful, so 
> > I'm hoping someone with more experience and knowhow might be able to point out 
> > the mistakes that I'm making.
> > 
> > Firstly, let me explain what I'm trying to do. I'm currently working on a 
> > University project that performs some type of transformation (compression, 
> > security, string replacement, etc) on packets as they pass through the system. 
> > The current setup has the FreeBSD machine configured as a router, and the 
> > transformation is performed on packets that are routed. This is done via divert 
> > sockets and everything is fine and dandy, we're getting great results from this 
> > setup.
> > 
> > However, what we want to do next is to have the machine setup as a ethernet 
> > bridge instead, and the transformation is to be performed on the bridged 
> > packets. Unfortunately, as most of you probably know, divert sockets do not 
> > work with bridges as of yet.
> 
> Since you are paying the price of pulling all packets into userland
> anyway, I'd suggest you just do the bridging in userland.  You can use
> bpf to send and recieve packets on each interface and then bridge and
> process them in your application.  I did this a while back and the whole
> thing took about 1400 lines of code.  Unfortunalty, I can't release the
> code, but it only took a few hours to write and debug the bridging part.

how come no-one knows about netgraph.. the framework designed to do
exactly this? :-)
It's only been in use for 6 years..



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