Re: How to change default MIB directory location?

This is a discussion on Re: How to change default MIB directory location? within the SNMP Coders forums, part of the Networking and Network Related category; --===============0181745167== Content-Type: multipart/alternative; boundary="0-719598919-1179930230=:30176" Content-Transfer-Encoding: 8bit --0-719598919-1179930230=:30176 ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-23-2007
Need Help
 
Posts: n/a
Default Re: How to change default MIB directory location?

--===============0181745167==
Content-Type: multipart/alternative; boundary="0-719598919-1179930230=:30176"
Content-Transfer-Encoding: 8bit

--0-719598919-1179930230=:30176
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


I am currently using the mibs-for-dummies configuration to generate my NetSnmp code since I was told this configuration hides most of the NetSnmp internal processing from the user. As a result, I have not updated the code to call the "init_mib()" routine so I am not sure what that is.

I would be more interested in knowing why the "--with-mibdirs" configure option does nto work and why adding the "mibdirs" line to the snmp.conf does not work either.


Erik Earle <erikearle@yahoo.com> wrote: don't use init_mib()

call add_mibdir() and then init_mib_internals()
instead.

This is what init_mib() actually does using the
environment vars as args to add_mibdir().

look at the man page for mib_api for more info.



__________________________________________________ __________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/...ures_spam.html


Need Help <snmpnoob@yahoo.com> wrote: I understand the default directory to look for MIB files is the following:

/usr/local/share/snmp/mibs


However, I would like to change this to another location. If I set the MIBDIRS environment variable as follows, then I can get it to find the MIB file in a new provided location:


export MIBDIRS= +"/export/home/myname/snmp/usr/local/share/snmp/mibs"


However, I do not want to use the environment variable to make this setting, so I tried the following two setups but nothing worked:


a) I tried including the following option in the "configure" command:

--with-mibdirs="/export/home/myname/snmp/usr/local/share/snmp/mibs"


b) I tried setting the following in the "snmp.conf" file:

mibdirs /export/home/myname/snmp/usr/local/share/snmp/mibs


Question:

Why does (a) and (b) not work for me?

**NOTE: I am not using "snmpd" to start the agent, but rather I am starting a specialized agent called "ocStbHostAVInterfaceTable". Is this a problem ... or should two options above still work regardless? Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://us.rd.yahoo.com/evt=48516/*ht...invite.asp?a=7 hot CTA = Join Yahoo!'s user panel -------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/...______________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders




---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
--0-719598919-1179930230=:30176
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<br>I am currently using the mibs-for-dummies configuration to generate my NetSnmp code since I was told this configuration hides most of the NetSnmp internal processing from the user.&nbsp; As a result, I have not updated the code to call the "init_mib()" routine so I am not sure what that is. &nbsp; <br><br>I would be more interested in knowing why the "--with-mibdirs" configure option does nto work and why adding the "mibdirs" line to the snmp.conf does not work either.<br> <br> <br><b><i>Erik Earle &lt;erikearle@yahoo.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> don't use init_mib()<br><br>call add_mibdir() and then init_mib_internals()<br>instead.<br><br>This is what init_mib() actually does using the<br>environment vars as args to add_mibdir().<br><br>look at the man page for mib_api for more info.<br><br><br>
<br>______________________________________________ ______________________________________<br>Sucker-punch spam with award-winning protection. <br>Try the free Yahoo! Mail Beta.<br>http://advision.webevents.yahoo.com/mailbeta/features_spam.html<br></blockquote><br><br><b><i>Need Help &lt;snmpnoob@yahoo.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> I understand the default directory to look for MIB files is the following:<br><br>&nbsp; /usr/local/share/snmp/mibs<br><br><br>However, I would like to change this to another location.&nbsp;&nbsp; If I set the MIBDIRS environment variable as follows, then I can get it to find the MIB file in a new provided location:<br><br><br>&nbsp;&nbsp;&nbsp; export MIBDIRS= +"/export/home/myname/snmp/usr/local/share/snmp/mibs"<br><br><br>However, I do not want to use the environment variable to make this setting, so I tried the following two setups but
nothing worked:<br><br><br>a) I tried including the following option in the "configure" command:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --with-mibdirs="/export/home/myname/snmp/usr/local/share/snmp/mibs"<br>&nbsp;<br><br>b) I tried setting the following in the "snmp.conf" file:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mibdirs&nbsp; /export/home/myname/snmp/usr/local/share/snmp/mibs<br><br><br>Question:<br><br>Why does (a) and (b) not work for me?<br><br>**NOTE:&nbsp; I am not using "snmpd" to start the agent, but rather I am starting a specialized agent called "ocStbHostAVInterfaceTable".&nbsp; Is this a problem ... or should two options above still work regardless?<div> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://us.rd.yahoo.com/evt=48516/*ht...invite.asp?a=7 hot CTA = Join Yahoo!'s user panel
-------------------------------------------------------------------------<br>This SF.net email is sponsored by DB2 Express<br>Download DB2 Express C - the FREE version of DB2 express and take<br>control of your XML. No limits. Just data. Click to get it now.<br>http://sourceforge.net/powerbar/db2/_______________________________________________<br >Net-snmp-coders mailing list<br>Net-snmp-coders@lists.sourceforge.net<br>https://lists.sourceforge.net/lists/listinfo/net-snmp-coders<br></div></blockquote><br><p>
<hr size=1><a href="http://us.rd.yahoo.com/evt=48226/*http://new.toolbar.yahoo.com/toolbar/features/norton/index.php">Get the free Yahoo! toolbar</a> and rest assured with the added security of spyware protection.

--0-719598919-1179930230=:30176--


--===============0181745167==
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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--===============0181745167==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============0181745167==--

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 12:52 AM.


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