This is a discussion on Re: Agentx subagent registering within the SNMP Users forums, part of the Networking and Network Related category; --===============1468193953== Content-Type: multipart/alternative; boundary="----=_Part_10748_18885916.1204124541207" ------=_Part_10748_18885916.1204124541207 Content-Type: text/plain; charset=ISO-8859-1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1468193953==
Content-Type: multipart/alternative; boundary="----=_Part_10748_18885916.1204124541207" ------=_Part_10748_18885916.1204124541207 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Dave, Thanks again for your help. I have changed the registering of system in system_mib.c as follow: from: REGISTER_MIB("mibII/system", system_variables, variable1, system_variables_oid); to: register_mib_context( "mibII/system", (struct variable *)system_variables, sizeof(struct variable1), sizeof(system_variables)/sizeof(struct variable1), system_variables_oid, sizeof(system_variables_oid)/sizeof(oid), DEFAULT_MIB_PRIORITY, 0, 0, NULL, "sub1", -1, 0); I have try first to check it in the master agent, and I got the following response: SNMPv2-MIB::sysDescr.0 = No Such Object available on this agent at this OID. Other nodes in the MIB I can get as usual. Any idea why ? I hope I don't need to change the registering of all the modules in the MIB. Omri > > On 26/02/2008, oknets10 <oknets10@gmail.com> wrote: > > Hello Dave, > > > > Thank you for your help. > > I see in FAQ:codeing 22, how I register a MIB with a non default > context. > > Can you direct me how to change the context of the standard MIB2 in the > > original snmpd ? > > You will need to change the code for each MIB module that you want to > register in this non-standard context. The FAQ entry describes what > the registration code should look like. > > Most of these modules are under 'agent/mibgroup/mibII', though > some of them have been split off into separate directories (again, > all under 'agent/mibgroup') > > Dave > ------=_Part_10748_18885916.1204124541207 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div>Hello Dave,</div> <div> </div> <div>Thanks again for your help.</div> <div>I have changed the registering of system in system_mib.c as follow:</div> <div>from:</div> <div> REGISTER_MIB("mibII/system", system_variables, variable1, system_variables_oid);</div> <div>to:</div> <div> register_mib_context( "mibII/system",<br> &nb sp;   ; & nbsp; (struct variable *)system_variables, sizeof(struct variable1),<br>   ; & nbsp; &nb sp; sizeof(system_variables)/sizeof(struct variable1),<br> &n bsp; &nbs p; system_variables_oid,<br> & nbsp; &nb sp;   ;   ; sizeof(system_variables_oid)/sizeof(oid),<br> &nbs p; &n bsp; DEFAULT_MIB_PRIORITY, 0, 0, NULL,<br>   ; & nbsp; &nb sp; "sub1", -1, 0);</div> <div> </div> <div> </div> <div>I have try first to check it in the master agent, and I got the following response:</div> <div><font size="2"> <p>SNMPv2-MIB::sysDescr.0 = No Such Object available on this agent at this OID.</p> <p>Other nodes in the MIB I can get as usual.</p> <p>Any idea why ?</p> <p>I hope I don't need to change the registering of all the modules in the MIB.</p> <p>Omri</p></font><br></div> <div class="gmail_quote"> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div class="Ih2E3d"><br>On 26/02/2008, oknets10 <<a href="mailto:oknets10@gmail.com">oknets10@gmail.co m</a>> wrote:<br>> Hello Dave,<br>><br>> Thank you for your help.<br>> I see in FAQ:codeing 22, how I register a MIB with a non default context.<br> > Can you direct me how to change the context of the standard MIB2 in the<br>> original snmpd ?<br><br></div>You will need to change the code for each MIB module that you want to<br>register in this non-standard context. The FAQ entry describes what<br> the registration code should look like.<br><br> Most of these modules are under 'agent/mibgroup/mibII', though<br>some of them have been split off into separate directories (again,<br>all under 'agent/mibgroup')<br> <font color="#888888"><br>Dave<br></font></blockquote></div><br> ------=_Part_10748_18885916.1204124541207-- --===============1468193953== 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 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============1468193953== 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 --===============1468193953==-- |