Hi Tom

On 01/28/2010 11:48 AM, Tom Carly wrote:

Luca,

 

In the mean time I tried with pfring_enable_ring and that seems to work as well. The doc says not to use this. Is there a difference (performance?) with using

Are you using filters? Can you post me the code fragments you use (I just need the sequence of pfring_xxx) so I can understand why you need to call pfring enable

pfring_get_selectable_fd?

No the performance is the same. Bear in mind than it's faster to actively wait rather than poll()-ing

Cheers Luca

 

Thanks,

 

Tom

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Luca Deri
Sent: donderdag 28 januari 2010 11:40
To: [email protected]
Subject: Re: [Ntop-misc] non-blocking pfring_recv

 

On 01/26/2010 01:05 PM, Tom Carly wrote:

Hi,

 

I am trying to call pfring_recv with wait_for_incoming_packet = 0 because I don’t want my application to be blocked if no packets are arriving. Though, it seems that I cannot longer receive packets doing that. The result of pfring_recv is always smaller than 0. If I put the parameter to 1, I get all packets.

Any idea what could be wrong?


Tom
if you don't like blocking, then set wait to 0 but do call pfring_get_selectable_fd() obtain a file description and call a select or poll in order to be notified when there are packets available

Cheers Luca


 

Thanks,

 

Tom Carly

 

 

 


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

 


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

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

Reply via email to