Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-19-2006, 10:28 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 28

Rep: Reputation: 15
types of error's when capturing packets using pcap library


I read that the pcap_next() function in pcap library will capture packets till an error occurs. I am intrested in knowing the types of errors that may cause this function to stop capturing the packets.
If any body know the answer , please reply

thanks and regards
Old 01-21-2006, 08:55 AM   #2
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
From this link:

NULL is returned if an error occured, or if no packets were read from a live capture (if, for example, they were discarded because they didn't pass the packet filter, or if, on platforms that support a read timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read), or if no more packets are available in a ``savefile.'' Unfortunately, there is no way to determine whether an error occured or not.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Capture Raw Packets (no Decode) with PCAP kidskc Programming 1 11-02-2005 05:54 PM
doubt in pcap library (n/w prog) live_dont_exist Programming 0 05-10-2005 09:42 PM
pcap library jagman Programming 1 04-27-2005 08:35 AM
VoIP Packets capturing in linux fastian Linux - Networking 1 03-25-2005 12:34 PM
capturing ethernet packets shrike_912 Programming 5 08-02-2004 02:46 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration