How to pass multiple user arguments to a callback function?
Hello,
My question specifically relates to: pcap_loop
and the uchar pointer which is used to pass the user argument.
But I think my question relates more to my understanding (or lack of) C pointers.
The problem that I have is that I want to pass two user arguments and I can't see how to accomplish that.
The call that I'm making at present (which works), only passes one user argument
Code:
pcap_loop(handle , -1 , process_packet , (u_char*)activity_list);
Where is a structure (linked list) which I populate with the info that I wish to capture in the function.
However, I'd like to be able to pass another structure, which contains info that I can use to customise the behaviour of the process_packet function; and this structure would be completely different to the activity_list structure.
After some suggestions or suggested readings.
From my reading of the man page I think this is assumed knowledge, which is why it isn't covered in detail.
Cheers
VW