tcpdump mailing list archives
Re: How to use "pcap" on a router ???
From: Ury Segal <ury_segal () yahoo com>
Date: Wed, 5 Apr 2006 23:43:53 -0700 (PDT)
Hi! I'd prefer calling "pcap_open_live()" twice, set the appropriate filters (which may be different), call "get_selectable_fd()" on each pcap_t, and then use select() to pick up packets from any interface that may have some ready. That way I don't have to deal with threads. However on some situations you'd have to use threads. For example, if you have a lot of processing done per-packet and you want to take advantage of a multi-CPU machine. --- kashif <kashifj () gmail com> wrote:
Dear, I have configured my PC running RedHat Linux 9.0 into a router by turning on the ip_forwarding facility of it. It got TWO LAN cards...and if i run two instances of *pcap* one for each LAN card for capturing packets, it works fine....But i intend writing an application wherein i need the information captured by both the instances..I mean if i want to capture packets from both the LAN cards simultaneously in one application..should i use threading to accomplish this?...Any suggestion... Regards, kj - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
--ury - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- How to use "pcap" on a router ??? kashif (Apr 05)
- Re: How to use "pcap" on a router ??? Ury Segal (Apr 05)
- Re: How to use "pcap" on a router ??? Guy Harris (Apr 06)