From owner-freebsd-net@FreeBSD.ORG Mon Dec 29 02:30:00 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C78881065670 for ; Mon, 29 Dec 2008 02:30:00 +0000 (UTC) (envelope-from gerryw@compvia.com) Received: from mail01.compvia.com (mail01.compvia.com [12.147.132.91]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF978FC08 for ; Mon, 29 Dec 2008 02:30:00 +0000 (UTC) (envelope-from gerryw@compvia.com) Received: from [10.10.20.11] ([10.10.20.11]) by mail01.compvia.com (Kerio MailServer 6.5.1) for freebsd-net@freebsd.org; Sun, 28 Dec 2008 19:59:57 -0600 To: freebsd-net@freebsd.org From: "Gerry Weaver" Message-ID: <20081229015957.4fe4d0ac@mail01.compvia.com> Date: Sun, 28 Dec 2008 19:59:57 -0600 X-Mailer: Kerio MailServer 6.5.1 WebMail X-User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1) Gecko/20081007 Firefox/3.1b1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: pfil + if_bridge hooks not being called X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 29 Dec 2008 02:30:00 -0000 Hello All, I am working on a driver to collect some network statistics using pfil. = I have set up a bridge and set net.link.bridge.pfil=5Fmember=3D1 via sysctl. I have ad= ded hooks for=20 incoming and outgoing packets. I also put a third adapter into the syste= m for=20 dev/managment purposes. My hooks are only being called for outgoing pack= ets on the management (non bridge) interface. I have been searching for info= rmation about what I may have overlooked, but I can't find anything concrete. Is= there=20 something else that I need to do to see packets on the bridge member int= erfaces and incoming packets in general=3F=20 I'm using FreeBSD 7.0-RELEASE. struct pfil=5Fhead *pfh=5Finet; pfh=5Finet =3D pfil=5Fhead=5Fget(PFIL=5FTYPE=5FAF, AF=5FINET); if(pfh=5Finet =3D=3D NULL) { uprintf("ERROR: Cannot get pfil head\n"); return ENOENT; } pfil=5Fadd=5Fhook(packets=5Fin, NULL, PFIL=5FIN | PFIL=5FWAITOK, pfh= =5Finet); pfil=5Fadd=5Fhook(packets=5Fout, NULL, PFIL=5FOUT | PFIL=5FWAITOK, pfh= =5Finet); ... Thanks in advance, Gerry