This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

pcap_next_ex vs pcap_loop

0

I'm writing a program which reads live captures and processes them. I'm using pcap_next_ex for capturing and it returns -1 and -2 unexpectdly. Will it be nice to use pcap_loop rather than pcap_next_ex? Which one is more efficient? Is the problem associated with read time out?

asked 18 May '11, 23:30

Fitsum's gravatar image

Fitsum
1112
accept rate: 0%

edited 19 May '11, 21:24

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142

Well, this is really a [email protected] question, but:

  1. On what operating system is this?

  2. Are you calling pcap_breakloop() in your program?

  3. When pcap_next_ex() returns -1, what does pcap_geterr() return?

(19 May '11, 01:04) Guy Harris ♦♦