LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 04-25-2005, 09:04 AM   #1
jagman
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.
thanks
 
Old 04-27-2005, 08:35 AM   #2
shivaligupta
Member
 
Registered: Oct 2004
Posts: 45

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

suppose u have added a line in ur code like

pcap_t *pd;
signal(SIGINT,cleanup);

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
pcap_breakloop(pd);

This way packet capturing will stop.
 
  


Reply


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


All times are GMT -5. The time now is 08:52 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration