From owner-freebsd-net Tue Feb 27 10:50:40 2001 Delivered-To: freebsd-net@freebsd.org Received: from urban.iinet.net.au (urban.iinet.net.au [203.59.24.231]) by hub.freebsd.org (Postfix) with ESMTP id 2E49137B71B for ; Tue, 27 Feb 2001 10:50:35 -0800 (PST) (envelope-from julian@elischer.org) Received: from elischer.org (i078-108.nv.iinet.net.au [203.59.78.108]) by urban.iinet.net.au (8.8.7/8.8.7) with ESMTP id CAA01636; Wed, 28 Feb 2001 02:50:08 +0800 Message-ID: <3A9BF6B7.703C3A3@elischer.org> Date: Tue, 27 Feb 2001 10:49:27 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Satyajeet Seth Cc: net@freebsd.org Subject: Re: Problem in configuring netgraph References: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Satyajeet Seth wrote: > > Hi > > I tried the example at: > http://www.freebsd.org/cgi/cvsweb.cgi/src/share/man/man4/ng_bpf.4 > > When I type: > > tcpdump -ddd ether dest xx:xx:xx:xx:xx:xx > > in a telnet session the command gave the raw BPF instructions, as > expected. > > However, at the system console the same command gave the message: > > fxp0: promiscuous mode enabled > tcpdump: syntax error > xp0: promiscuous mode disabled > > Could you suggest what could be wrong? > > I also tried the following: > > 1. reboot > 2. ping -f & > 3. nghook -a fxp0: lower > Now I get identical packets. > > 4. ngctl mkpeer fxp0: bpf divert bhook > > 5. ngctl name fxp0:divert bpf0 > > 6. ngctl msg bpf0: setprogram { thisHook="bhook" ifMatch="hook2" > ifNotMatch="hook1" bpf_prog_len=1 bpf_prog=[ { code=6 } ] } > > Now all the packets are sent to hook1. > 7. nghook -a bpf0: hook1 > gives packets differing from point 3. how different? > > 8. ping to any machine on the lan does not work. > By default the upper and lower hooks of fxp0 are effectively connected. Our setup also does the > same. > > Could you suggest why the ping does not work? because the incoming packets are still being diverted to the bpf node. > > Thanks > Satya > -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message