Hello.
I'm writing a packet sniffer in C++ using libpcap-0.9.4.
I've tried to use a class function member as a callback for
pcap_loop(), but the compiler complains that arguments don't
match. The code is something like this (I have simplified it):
8-
class X
{
The buttom of the problem is this:
You excpect libpcap to call X::dumper in
the context of an instance of class X.
(The real first parameter of X::dumper
is a variable named this of the type X*.)
But the libpcap API is not defining a
`void (X::)(u_char*, const pcap_pkthdr*, const
u_char*)'
Ury Segal wrote:
The buttom of the problem is this:
You excpect libpcap to call X::dumper in
the context of an instance of class X.
(The real first parameter of X::dumper
is a variable named this of the type X*.)
But the libpcap API is not defining a
`void (X::)(u_char*, const