Re :Subagent does not register its context
"girish" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <1211482769.S.4667.26904.f4mail-235-212.rediffmail.com.old.1211520724.16417@webmail.rediffmail.com> |
while registering your mib or a single oid register that oid with the context name you want.Like this: netsnmp_handler_registration *reg; netsnmp_register_scalar(reg = netsnmp_create_handler_registration ("myId", handle_myId, myId_oid, OID_LENGTH(myId_oid), HANDLER_CAN_RONLY)); reg->contextName = strdup("mycontext"); netsnmp_register_handler(reg);Regards,GirishOn Thu, 22 May 2008 12:25:04 -0400 Ric
hard Freedman wrote What do I need to put into my configuration file(s)? I'm running net-snmp 5.4.1. I want to register an OID for a subagent with a particular context (because I need
to register the same OID for other subagents with other contexts). It works for snmpv1, but of course my application requires it to work for snmpv3. After trying everything -- I am very new to SNMP -- I finally got the Master Agent to forward the request to the subagent when I copied the createUser line from snmpd.conf to subagent1.conf. It works, but with a blank context. I set the context in my subagent by using this code (which came from a Solaris demo_module_6): myreg = netsnmp_create_handler_registration( "elementName", get_elementCallback, element_oid, OID_LENGTH(element_oid), HANDLER_CAN_RONLY); myreg->contex
tName = "myContext"; netsnmp_register_read_only_instance(myreg); but the subagent message to the Master Agent does not include the context string, so of course the Master Ag
ent is unable to recognize that a GET should be forwarded to my subagent. Instead it decides VACM_NOSUCHCONTEXT. What do I need to configure to make this happen? The following command, as I said, works with v1 or with no context: snmpget -r 1 -mALL -v 3 -u myuser -n "context" -l authNoPriv -A "my_password" localhost .elementName Richard Freedman ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://list
s.sourceforge.net/lists/listinfo/net-snmp-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users