LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


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

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


hi,

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
cynthia
 
Old 01-21-2006, 07:55 AM   #2
bulliver
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:
http://www.die.net/doc/linux/man/man3/pcap.3.html

Quote:
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.
 
  


Reply



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 04:54 PM
doubt in pcap library (n/w prog) live_dont_exist Programming 0 05-10-2005 08:42 PM
pcap library jagman Programming 1 04-27-2005 07:35 AM
VoIP Packets capturing in linux fastian Linux - Networking 1 03-25-2005 11:34 AM
capturing ethernet packets shrike_912 Programming 5 08-02-2004 01:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:44 AM.

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