There is an example async app on the net-snmp page.

http://net-snmp.sourceforge.net/tutorial/tutorial-5/toolkit/asyncapp/asyncap
p.c

I used this code to figure out how to perform
asynchronous sends in my own project.

Mathew Bielejeski
http://www.neon.com
 
Message: 1
Date: Tue, 14 Nov 2006 21:11:48 +0100
From: Alef Veld <[EMAIL PROTECTED]>
Subject: Re: synchronous versus asynchronous
To: Steve Friedl <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

So basically if i understand correctly async is using select with  
nonblocking sockets and a large set of file descriptors? I assume you  
use that since you stated that net-snmp is not thread-safe. And in  
addition you just send a whole bunch of udp sendto's in a event loop?

that's really something i would like to have. basically i want to  
write a function that does async snmp and in that same function it  
calculates the netblock it needs to snmp to by supplying a net/prefix  
as argument.

However, i feel really stupid when looking at the net-snmp library or  
even example code. It seems bloody complicated :-). I'm now using a  
modified version of the sync demo app to use with snmpv1 (Seems to  
work for snmpv2 to?) but as stated before, it sucks up cpu bigtime if  
it finds a host who it cannot connect to.

Greets, and thanks,
Alef
On Nov 14, 2006, at 7:53 PM, Steve Friedl wrote:




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to