[Winpcap-users] how to de-register handler
Gianluca Varenni
gianluca.varenni at cacetech.com
Tue Apr 8 17:28:12 GMT 2008
The packet is not actually registered inside the library. When you call pcap_loop (or pcap_dispatch), pcap_loop blocks and internally uses the packet handler you provided to hand off packets to your application. As soon as pcap_loop/pcap_dispatch returns (for a reason or another), the packet handler that you provided is no longer used by the WinPcap library (it's NOT stored internally).
My humble suggestion is to use pcap_next_ex instead of pcap_loop/dispatch. It provides the same functionality, but it's IMHO much easier to understand and use.
Have a nice day
GV
----- Original Message -----
From: Har Yash Bahadur
To: winpcap-users at winpcap.org
Sent: Monday, April 07, 2008 2:24 AM
Subject: [Winpcap-users] how to de-register handler
Hi all,
I register my specific packet handler using the API "packet_loop" during the init of my app. When I have to terminate I try "pcap_breakloop", but it doesn't seem to de-register the handler from the Winpcap lib.
Any clues?
TIA
Haryash
Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer ****************************
"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
**********************************************************************
---------------------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20080408/c85da381/attachment.htm
More information about the Winpcap-users
mailing list