On 04 Mar 2016, at 15:00, Robert Story <rst...@freesnmp.com> wrote:
> On Sun, 27 Dec 2015 14:41:23 +0100 Dirk-Willem wrote:

> DWVG> I’ve got an AgentX module that watches for specific multicast
> DWVG> traffic, pulls a few bits out; and updates some counters
> DWVG> accordingly. Consequentely I run the AgentX in non-blocking
> DWVG> mode; as to (also) be able attend to the socket in parallel
> DWVG> to handing SNMP requests. 
> DWVG> 
> DWVG> Code below works splendidly:
> DWVG> [...]
> DWVG>  
> DWVG> However it obviously spins fast in this while(1){} loop;
> DWVG> which is all the more a shame as both SNMP bulkwalks and
> DWVG> multicast packets only come in every 100 seconds or slower.
> DWVG> 
> DWVG> What is the proper way to put a select() or poll() or similar
> DWVG> onto the agent (file descriptor) ? And are there any
> DWVG> caveats ? Or is there some way to register a handler on a fd
> DWVG> separately ?
> 
> Sorry for the delayed response. register_readfd() should do what you want.

I’ve got that working splendidly from raw/native C code.

Fair to assume that it is not accessible from the NetSNMP::Agent() world of 
perl ?

Dw



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to