From owner-freebsd-net@FreeBSD.ORG Mon Apr 19 01:12: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 357AE16A4CE for ; Mon, 19 Apr 2004 01:12:36 -0700 (PDT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5977843D2F for ; Mon, 19 Apr 2004 01:12:35 -0700 (PDT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i3J8GfGI010529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Apr 2004 11:16:43 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i3J8CPjC040987; Mon, 19 Apr 2004 11:12:25 +0300 (EEST) (envelope-from ru) Date: Mon, 19 Apr 2004 11:12:25 +0300 From: Ruslan Ermilov To: Julian Elischer Message-ID: <20040419081225.GG39799@ip.net.ua> References: <200404191316.46089.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EDJsL2R9iCFAt7IV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: Daniel O'Connor 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:12:36 -0000 --EDJsL2R9iCFAt7IV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 19, 2004 at 01:02:31AM -0700, Julian Elischer wrote: >=20 >=20 > On Mon, 19 Apr 2004, Daniel O'Connor wrote: >=20 > > 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 interes= ted in > > > > using netgraph to run snort on the combined traffic rather than hav= ing 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-ethe= rnet > > > > node :( > > > > > > > > Does anyone know if/how you can do it? (Specifically for gif) > > > > > > How about nf_gif(4)? > >=20 > > Hmm, I see the man page, but no module.. Ahh, it doesn't appear to be b= uilt by=20 > > default.. > >=20 > > And it's not on my -stable box, guess I should do a manual merge :) > >=20 >=20 > there are some basic differences between netgraph nodes in -current and= =20 > in 4.x > check out the differences in a few nodes (e.g. ng_sample.c)=20 >=20 > to see what they are. >=20 > 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. >=20 > 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. >=20 While we're on this topic, I wonder if you have plans to get rid of non-funcional diffs for ng_sample.[ch] between RELENG_4 and HEAD? If not, I could do it, and send you a patch (for RELENG_4) for review. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --EDJsL2R9iCFAt7IV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAg4npUkv4P6juNwoRAte5AJ4k+85uEeVcK5pjwe3NE64RYldjOACfSkzR 1FqD0CORVurqxO0Oga3rKYA= =Angx -----END PGP SIGNATURE----- --EDJsL2R9iCFAt7IV--