[Winpcap-users] How can I get Packet statistic using winpcap
Isara Anantavrasilp
isara.a at gmail.com
Mon Mar 6 13:24:50 GMT 2006
I also had problem with dispatcher function.
I dont really understand your question but I think you have the
problem of linking the objects.
If you write your program in OOP style (i.e. C++ style), you cannot
use dispatcher function.
Somehow VC++ does have problem with callback function and gives LINK
ERROR when you compile the program.
The solution that I found (which might not be optimal) is that to
declare dispatcher_handler to global function.
That is, it should not belong to any class. Then you can compile the program.
(pcap_loop, however, can be called within a class member.)
-- BiGGA
On 2/7/06, Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:
> Uhm, I don't understand precisely your question.
>
> Basically you need to define a callback (the dispatcher handler) that gets
> called with new statistics by pcap_loop. Alternatively, if you want to avoid
> the use of a callback, you can also use pcap_next_ex to retrieve the
> statistics directly.
>
> If you send a *small* snippet of your code on the ML, maybe we can help you
> better.
>
> Have a nice day
> GV
>
> ----- Original Message -----
> From: "jack chotikapakorn" <de_untouchable at hotmail.com>
> To: <winpcap-users at winpcap.org>
> Sent: Saturday, February 04, 2006 6:37 AM
> Subject: [Winpcap-users] How can I get Packet statistic using winpcap
>
>
> >I had read "Gathering Statistics on the network traffic" and I want to use
> >this code to my program (VC++.NET)that write by using OOP, and pcap_loop
> >function not know about "dispatcher_handler" is not pcap_handler Please
> >Help me !!! also you can Example coding for me please . I'm not good in
> >c++ programming.
> >
> > thanks a lot
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today - it's FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> > _______________________________________________
> > Winpcap-users mailing list
> > Winpcap-users at winpcap.org
> > https://www.winpcap.org/mailman/listinfo/winpcap-users
> >
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
More information about the Winpcap-users
mailing list