[AGENT++] Asynchronous interface in SNMP++

Jochen Katz katz at agentpp.com
Sun Feb 29 22:41:07 CET 2004


Hi Marek,

> One more question: the Pdu class models all possible Pdu types (Request,
> Response, Trap, etc.) and contains a sum of all possible fields. Why does
> not it hold nonRepeaters and maxRepetitions for GetBulk? A user has to
> provide these values for Snmp::get_bulk() but it would be more consistent to
> add such properties to the Pdu class (otherwise response() should have
> contained parameters for setting error status and index, etc.).

this decission was made from HP: The Pdu class should not contain any 
SNMP version specific data. As nonRepeaters and maxRepetitions are only 
for snmpv2, they were not added to Pdu class. But as I already broke 
this HP decission for SNMPv3, I could break it one more time...

> To complete
> this thread, I would also add that it would be helpful for a user to have
> static factory methods for creation of Pdu of the required type (e.g.,
> Snmp::create_response(const Vb* vbs, int error_status, int error_index),
> etc.). This would enable to make sure that all required fields for a given
> Pdu type have been initialized.

Good suggestion, but I would/will add them to the Pdu class.

 > [ sync/async performance tests]

Did you test using one Snmp object or did each thread use its own Snmp 
object?

> I believe that fixing this behavior would not be that difficult (do not
> press you to do it immediately, just theoretizing ;-) ) - the threads should
> be waiting on a semaphore/event type object untill the event processing
> thread wakes them up (and no more need to walk the list of events) or the
> timeout expires. The event list could be replaced with a hashtable indexed
> with the request_id. Etc. Under this model, I would expect the difference in
> performance to be a lot smaller (say 10%).

I do fully agree, that the event code must be completely rewritten. At 
the moment I just don't have the time to do it...

Regards,
   Jochen





More information about the AGENTPP mailing list