> To be clear, the implementation of the Event-MIB  ....
>   .... create[s] a normal snmp-requested to the localhost. I 
> found this method not efficient, because the agent must pass through 
> the "security stacks", build a snmp message and udp packet and do the 
> reverse (2 times for the local req/resp).

That's not strictly true.
The Event-MIB creates a 'callback' session looping back to the agent,
which is used for sending internal requests for the MIB values it needs.

These requests do indeed pass through the security stacks, but *don't*
actually involve building the SNMP message, or UDP packet.   The PDU
data structure is passed across directly.
   (At least, that's my reading of the snmplib/snmpCallbackDomain.c code)



> Is it possible to stay "inside" the agent, and retrieve the local 
> object directly with an internal function call?

Are you talking about retrieving a particular MIB object value, or a
general-purpose mechanism that can be used with arbitrary OIDs?
For a specific value, you could try accessing the underlying data
yourself - effectively duplicating the relevant handler code.

But the approach provided for a general-purpose mechanism is the
"callback request" as used by Event-MIB.    It involves a certain
overhead, but is significantly simpler than trying to mimic the
the necessary PDU handling within the Event-MIB handler itself.

Dave



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to