Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2004 01:02:31 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Netgraph and non-ethernet nodes?
Message-ID:  <Pine.BSF.4.21.0404190058490.97098-100000@InterJet.elischer.org>
In-Reply-To: <200404191316.46089.doconnor@gsoft.com.au>

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


On Mon, 19 Apr 2004, Daniel O'Connor wrote:

> On Mon, 19 Apr 2004 13:09, Brooks Davis wrote:
> > On Mon, Apr 19, 2004 at 12:56:24PM +0930, Daniel O'Connor wrote:
> > > The recent emails about the bridge code from NetBSD made me interested in
> > > using netgraph to run snort on the combined traffic rather than having to
> > > run 2 copies (since we tunnel our class C using gif over IP over
> > > ethernet), however I can't see how to hook netgraph into a non-ethernet
> > > node :(
> > >
> > > Does anyone know if/how you can do it? (Specifically for gif)
> >
> > How about nf_gif(4)?
> 
> Hmm, I see the man page, but no module.. Ahh, it doesn't appear to be built by 
> default..
> 
> And it's not on my -stable box, guess I should do a manual merge :)
> 

there are some basic differences between netgraph nodes in -current and 
in 4.x
 check out the differences in a few nodes (e.g. ng_sample.c) 

to see what they are.

in particular... in 4.x and earlier, the mbuf and metadaa are handled
separatly as arguments to things but in 5.x
they are both held in (well a pointer is in..) a struct item.

which is passed around... the item structure needs to be freed if you
destroy it and there are macros to extract the mbuf and metadata
from the item. This is because in 5.x we often need to queue teh packet
including metadata and the 'item' is what is queued.




> Thanks for the hint :)
> 
> -- 
> Daniel O'Connor software and network engineer
> for Genesis Software - http://www.gsoft.com.au
> "The nice thing about standards is that there
> are so many of them to choose from."
>   -- Andrew Tanenbaum
> GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
> 



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