This is a discussion on Re :Re: Re :Re: How can I set contextName instead of default NULL within the SNMP Users forums, part of the Networking and Network Related category; --===============1450555265== Content-Type: multipart/alternative; boundary="=_98921580472b8439e8fe269cac76331e" --=_98921580472b8439e8fe269cac76331e Content-Type: text/plain; charset="ISO-8859-1" ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1450555265==
Content-Type: multipart/alternative; boundary="=_98921580472b8439e8fe269cac76331e" --=_98921580472b8439e8fe269cac76331e Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi Dave, &nb sp; Well I tried adding these lines in subagent code reg = netsnmp_create_handler_registration(myobject,  ; & nbsp; myobject_handler,oid,oid_len,HANDLER_CAN_RWRITE);& nbsp; reg->contextName = strdup("mycontext"); netsnmp_register_handler(reg);and tried sending snmpget command with mycontext as the contextName snmpget -v 3 -u myuser -n mycontext -l authNoPriv -a MD5 -A my_password localhost myobject.0and got the response as no such object found. Also I modified snmpd.conf as belowaccess mygroup "mycontext"but still its giving same problem. Its not registring with context name. Also we tried adding this line register_snmpEngine_scalars_context("mycontext"); in the subagent initialization code but its the same problem. Wat could be the reason. Please give some inputs Regards, Girish --=_98921580472b8439e8fe269cac76331e Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hi Dave,<br /> & nbsp; &= nbsp; Well I tried adding these lines in subagent code<br /> &nb= sp; reg =3D netsnmp_create_handler_registration(myobject,  ; = &n bsp; myobject_handler,oid= ,oid_len,HANDLER_CAN_RWRITE);<br /> reg->contextName = =3D strdup("mycontext");<br /> netsnmp_register_handler(r= eg);<br /><br />and tried sending snmpget command with mycontext as the con= textName <br />snmpget -v 3 -u myuser -n mycontext -l authNoPriv -a M= D5 -A my_password localhost myobject.0<br />and got the response as n= o such object found. <br />Also I modified snmpd.conf as below<br />access = mygroup "mycontext"<br />but still its giving same problem. Its not registr= ing with context name. <br /><br />Also we tried adding this line register_= snmpEngine_scalars_context("mycontext"); in the subagent initialization cod= e but its the same problem. Wat could be the reason. Please give some input= s<br /><br /><br><br>Regards,<br /> Girish<br><Table border=3D0 Width=3D644 Height=3D57 cellspacing=3D0 cellpad= ding=3D0 style=3D'font-family:Verdana;font-size:11px;line-height:15px;'><TR= ><td><a href=3D'http://adworks.rediff.com/cgi-bin/AdWorks/click.cgi/www.red= iff.com/signature-home.htm/1050715198@Middle5/2025654_2018477/2025376/1?PAR= TNER=3D3&OAS_QUERY=3Dnull target=3Dnew '><img src =3Dhttp://imadworks.redif= f.com/cgi-bin/AdWorks/adimage.cgi/2025654_2018477/creative_2025376.gif alt= =3D'Skoda Fabia' border=3D0></a></td></TR></Table> --=_98921580472b8439e8fe269cac76331e-- --===============1450555265== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============1450555265== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users --===============1450555265==-- |