C++ to C call: argument of type 'void (MyClass::)(u_char*,)' does not match 'void (*)(u_char*)'
<p>my rusty C++ skills got a fail after:</p>

<pre><code>#include &lt;pcap.h&gt;
...
void Sniff::pcap_listen() {
 pcap_t *loc;
 char *dev;
 dev = pcap_lookupdev(errbuf);
 loc = pcap_open_live(dev,BUFSIZ,0,-1,errbuf);
 pcap_loop(loc,-1,pcap_callback,NULL);
}
</code></pre>

<blockquote>
  <p>error: argument of type ‘void
  (Sniff::)(u_char*, const pcap_pkthdr*,
  const u_char*)’ does not match ‘void
  (*)(u_char*, const pcap_pkthdr*, const
  u_char*)’</p>
</blockquote>

<p>Adding/removing 'static' definition in .h: no effect.</p>

<p>++ another problem:</p>

<pre><code>listener = g_thread_create(pcap_listen, NULL, FALSE, NULL);
</code></pre>

<p>Lot of variations of ::, &amp;, this .. was tested, most informative message was:</p>

<blockquote>
  <p>src/main.cpp:281: error: argument of
  type ‘void* (Sniff::)(void*)’ does not
  match ‘void* (<em>)(void</em>*)’</p>
</blockquote>
