Hello,

I am trying to use the pfring and implement the pf_ring socket cluster. In
order to achieve this do I need use pfring_open and pfring_set_cluster for
each thread?.


Here is how I am trying to achieve it.

every thread will have it's own pfring pointer and in each thread

if((thread[id]->pd = pfring_open(device, promisc, snaplen, 0)) == NULL)
 {
      printf("pfring_open error\n");
      return(-1);
 }

 int rc = pfring_set_cluster(thread[id]->pd, 55);
 printf("pfring_set_cluster returned %d\n", rc);

pfring_enabkle_ring(thread[id]->pd);

while(1) {
 if(shutdown) {
 break;
 }

if(ret_val = pfring_recv(thread[id]->pd, &pkt_data, 0, &pkt_hdr,0)) > 0 {
//process packet
}

}

can you please let me know the above implementation will achieve the
pf_ring socket cluster mode ?.

Thanks
Krish
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to