Re :Re: Re :Re: How can I set contextName instead of default NULL

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" ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2008
girish
 
Posts: n/a
Default Re :Re: Re :Re: How can I set contextName instead of default NULL

--===============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 ;        & 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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&=
nbsp;&nbsp; Well I tried adding these lines in subagent code<br />&nbsp;&nb=
sp; reg =3D netsnmp_create_handler_registration(myobject,&nbsp ;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp; myobject_handler,oid=
,oid_len,HANDLER_CAN_RWRITE);<br />&nbsp;&nbsp;&nbsp; reg-&gt;contextName =
=3D strdup("mycontext");<br />&nbsp;&nbsp;&nbsp; netsnmp_register_handler(r=
eg);<br /><br />and tried sending snmpget command with mycontext as the con=
textName <br />snmpget&nbsp; -v 3 -u myuser -n mycontext -l authNoPriv -a M=
D5 -A my_password&nbsp; 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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0