Re: Agentx subagent registering

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


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008
oknets10
 
Posts: n/a
Default Re: Agentx subagent registering

--===============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>&nbsp;</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>&nbsp;&nbsp;&nbsp; REGISTER_MIB(&quot;mibII/system&quot;, system_variables, variable1, system_variables_oid);</div>
<div>to:</div>
<div>&nbsp;&nbsp; register_mib_context( &quot;mibII/system&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (struct variable *)system_variables, sizeof(struct variable1),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(system_variables)/sizeof(struct variable1),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; system_variables_oid,<br>&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; sizeof(system_variables_oid)/sizeof(oid),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFAULT_MIB_PRIORITY, 0, 0, NULL,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;sub1&quot;, -1, 0);</div>

<div>&nbsp;</div>
<div>&nbsp;</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 &lt;<a href="mailto:oknets10@gmail.com">oknets10@gmail.co m</a>&gt; wrote:<br>&gt; Hello Dave,<br>&gt;<br>&gt; Thank you for your help.<br>&gt; I see in FAQ:codeing 22, how I register a MIB with a non default context.<br>
&gt; Can you direct me how to change the context of the standard MIB2 in the<br>&gt; 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. &nbsp; The FAQ entry describes what<br>
the registration code should look like.<br><br>&nbsp; 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==--

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 10:46 AM.


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