Date: Wed, 30 Aug 2006 18:22:31 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Rajkumar S <rajkumars@gmail.com> Cc: freebsd-net@FreeBSD.org Subject: Re: sending NGM_BPF_SET_PROGRAM message to a bpf node from a program Message-ID: <20060830142231.GX76666@FreeBSD.org> In-Reply-To: <64de5c8b0608300531y7ab06ea5ibde5c96aaaa6374e@mail.gmail.com> References: <64de5c8b0608300531y7ab06ea5ibde5c96aaaa6374e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 30, 2006 at 06:01:10PM +0530, Rajkumar S wrote: R> and messaging the bpf: using the following code fragment. R> R> if (NgSendMsg(cfd, "bpf:", NGM_GENERIC_COOKIE, R> NGM_BPF_SET_PROGRAM, bpf_hookprog, (sizeof R> (struct ng_bpf_hookprog) + fp.bf_len * sizeof (struct bpf_insn))) < 0) R> { R> perror ("Setup bpf program"); R> return (-1); R> } The cookie shouldn't be NGM_GENERIC_COOKIE, but should be NGM_BPF_COOKIE. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060830142231.GX76666>