I've already read several articles about this question, but none of them solve my problem.
Briefly, in my NSApplicationDelegate, I called a function pcap_loop, pcap_loop needs a function pointer as callback, the callback signature is
void got_packet(u_char *, const struct pcap_pkthdr *, const u_char *)
I want to pass one of the NSApplicationDelegate's method as callback, so I can use these data in my app, somebody suggest me using "SEL + IMP", but I can't pass the self to callback, also somebody suggest "block", not work.
So, any idea?
Thanks!
selfpointer.