Hi Morgan what about using gdb? :-) However the getopt() optstring: "ha:b:c:fvpg:w:” should be “ha:b:c:f:vpg:w:"
I added -f to the code in svn. Alfredo On 25 Jul 2014, at 03:52, Morgan Yang <[email protected]> wrote: > I added bpf filtering to the userland example pfbridge, using the example > from pfcount > > /* Adding BPF filter */ > if(bpfFilter != NULL) { > int rc = pfring_set_bpf_filter(a_ring, bpfFilter); > if(rc != 0) > printf("pfring_set_bpf_filter(%s) returned %d\n", bpfFilter, rc); > else > printf("Successfully set BPF filter '%s'\n", bpfFilter); > } > > However, when I run it, I get a segfault immediately > pfbridge[14908]: segfault at 8 ip 00000035b9681461 sp 00007fff3a4291a8 error > 4 in libc-2.12.so[35b9600000+18b000] > > I've attached modified pfbridge. > > I don't think i left out anything explicit, the bpf instructiion seemed > pretty straight foward..... > <pfbridge_mod.c>_______________________________________________ > Ntop-misc mailing list > [email protected] > http://listgateway.unipi.it/mailman/listinfo/ntop-misc
_______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
