This is our old Q&A Site. Please post any new questions and answers at

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

accept rate: 0%

edited 19 May '11, 21:24

cmaynard's gravatar image

cmaynard ♦♦

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 ♦♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 18 May '11, 23:30

question was seen: 3,661 times

last updated: 19 May '11, 21:24

p​o​w​e​r​e​d by O​S​Q​A