[Winpcap-users] how to reset pcap filter expression every 30 seconds for a live call
magarpatta at hotmail.com
Wed Aug 10 02:04:15 PDT 2011
Hi,we are working on a C/C++ application, where we can get calls from more than one source.I am trying to capture packets and count the packets based on the endpoint pair's e.g.A->BC->BD->Bas you can see, above we can get calls to B from A,C and D and we would like to count individual bandwidth from A-> B, A->C, A->DUser at any time can changes the endpoint pair as shown above, to handle this scenariowe would like to reset the filter expression in pcap_setfilter( ) after a given time(mostly 30 seconds)we were not able to find anyway, to dynamically reset the filter expression and had to do it on our ownwe are using pcap_loop with -1 option, which makes it run in infinite loop, after every 30 seconds we are calling pcap_close( ) from the callback method ofpcap_loop( ), as of now this causes a crash in the application. can someone suggest a way to reset the filter expression?I looked on Google and found that we can use pcap_breakloop( ) to terminate the infinite pcap_loop( )but could not find any good pcap_breakloop( ) example.any help would be appreciated.thanks,m
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Winpcap-users