Date: Wed, 4 Apr 2001 11:12:09 +0400 From: "Andrey Simonenko" <simon@comsys.ntu-kpi.kiev.ua> To: <freebsd-hackers@freebsd.org> Subject: Is it possible to use some BPF filters in one process, in some threads? Message-ID: <007801c0bcd6$90784c00$6d36120a@comsys.ntukpi.kiev.ua>
next in thread | raw e-mail | index | archive | help
Hi I want to add BPF support to IPA (/usr/ports/sysutils/ipa). But I want to use one process for some BPF filters. I'm going to use pcap(3) library, because it understands human filter requests in pcap_compile(3). So, here is my question. Is it possible to use some pcap_dispatch(3) functions in one process? I need to use pcap_dispatch(3) only for counting number of bytes, I don't need to check network packets. If it possible to use some pcap_dispatch(3) functions and BPF filters will not lose network packets (on fast network traffic), how is it better to implemet this? I am not sure that it will be correct to call somehow pcap_dispatch(3) functions in loop and here is my second question. Is it possible to use pcap(3) routines in different threads? Is pcap(3) library thread safe? Thanks in advice. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?007801c0bcd6$90784c00$6d36120a>