Re: sending NGM_BPF_SET_PROGRAM message to a bpf node from a program

2006-08-30 Thread Rajkumar S
On 8/30/06, Gleb Smirnoff <[EMAIL PROTECTED]> wrote: The cookie shouldn't be NGM_GENERIC_COOKIE, but should be NGM_BPF_COOKIE. Thanks a lot, it's working now! raj ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/fr

Re: sending NGM_BPF_SET_PROGRAM message to a bpf node from a program

2006-08-30 Thread Gleb Smirnoff
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 (

sending NGM_BPF_SET_PROGRAM message to a bpf node from a program

2006-08-30 Thread Rajkumar S
Hi, I am trying to write a program to create a bpf node and assign a bpf filter to that node. I am able to create the node and attch the node to 3 other nodes, but not settng up a bpf filter to the node. I am initialising the ng_bpf_hookprog struct using the following code: struct ng_bpf_hookpr