Hi,

I have a problem writhing an thin application based on libpcap. I have
this structure in my main() function and got_packet() as callback
function:

Code:
int main(int argc, char **argv)
{
 /* ... */
 typedef struct _configuration Configuration;
 struct _configuration {
   int id;
   char title[255];
 };

 Configuration conf[2] = {
   {0, "foo"},
   {1, "bar"}};
 /* ... */
 pcap_loop(handle, num_packets, got_packet, &conf);
}

void got_packet(u_char *args, const struct pcap_pkthdr *header, const
u_char *packet)
{
 /* ... */
 printf("test: %d\n", *args[0]->id);
}
Do you see how can we edit this code in order to get the structure
conf and print it in got_packet()?

Many thanks for any help.