From owner-freebsd-net@FreeBSD.ORG Mon Apr 19 01:02:36 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5129016A4CE for ; Mon, 19 Apr 2004 01:02:36 -0700 (PDT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1022943D1F for ; Mon, 19 Apr 2004 01:02:36 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc11) with ESMTP id <2004041908023501300fdd9be>; Mon, 19 Apr 2004 08:02:35 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id BAA97315; Mon, 19 Apr 2004 01:02:33 -0700 (PDT) Date: Mon, 19 Apr 2004 01:02:31 -0700 (PDT) From: Julian Elischer To: "Daniel O'Connor" In-Reply-To: <200404191316.46089.doconnor@gsoft.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: Netgraph and non-ethernet nodes? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2004 08:02:36 -0000 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" >