Visit the LQ Articles and Editorials section
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 04-25-2005, 08:04 AM   #1
LQ Newbie
Registered: Feb 2005
Posts: 17

Rep: Reputation: 0
Question pcap library

Good day to all of you.
My question is about the pcap library.
I want to know how I call the pcap_breakloop to stop the function pcap_loop from grabbing packets.
I want to see an example of the pcap_breakloop function.
Old 04-27-2005, 07:35 AM   #2
Registered: Oct 2004
Posts: 45

Rep: Reputation: 15
I guess u want to know tht whn it can be used.

suppose u have added a line in ur code like

pcap_t *pd;

after that u have used pcap_loop. This will run continously. Now if in between SIGINT arises, u may want to stop capturing packets. then in ur cleanup u can pass pd and in it u can add

This way packet capturing will stop.


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
Pcap Files OriDagan Linux - Networking 0 07-15-2005 04:20 AM
doubt in pcap library (n/w prog) live_dont_exist Programming 0 05-10-2005 08:42 PM
How to specify the NIC detected by pcap wangjinyi Linux - Software 0 09-23-2004 02:42 AM
pcap data extraction black_man Linux - Networking 1 08-28-2004 08:52 AM
Questions on pcap.h Traveler_Q Programming 2 02-25-2004 03:03 PM

All times are GMT -5. The time now is 05:37 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