This is a discussion on Re: mib2c linker errors ifTable within the SNMP Users forums, part of the Networking and Network Related category; --===============0246859771== Content-Type: multipart/alternative; boundary="----=_Part_7838_30375994.1202190036927" ------=_Part_7838_30375994.1202190036927 Content-Type: text/plain; charset=ISO-8859-1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0246859771==
Content-Type: multipart/alternative; boundary="----=_Part_7838_30375994.1202190036927" ------=_Part_7838_30375994.1202190036927 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi , I want to have a subagent to master net-snmp agent. Dircectory structure is ~/net-snmp-5.4.1 and I have wriiten my mib module simple-MIB in /usr/local/share/snmp/mibs directory and checked with snmptranslate command. I am generating C files using mib2c tool in ~/simpleTable . I created my module and generated using mib2c tool. $ mib2c -c mib2c.mfd.conf simple-MIB::simpleTable It generated .c and .h files In simpleTable_data_access.c assigned some defalut values int simpleName_len=30; char simpleName[255]; int simpleAddress_len=10; char simpleAddress [255]; int simpleLocation_len=10; char simpleLocation_len[255]; In fact I have to read from some file and fill the values . But here just assigned some values. When I done with make command , I got the executable , simpleTable When I do ./simpleTable , ./simpleTable: symbol lookup error: ./simpleTable: undefined symbol: netsnmp_cache_create I have kept an entry in /usr/local/share/snmp/snmpd.conf master agentx and the agent is running with command /usr/local/sbin/snmpd Please help me in resloving this issue. Thanks, Pranesh On Feb 1, 2008 9:14 PM, Dave Shield <D.T.Shield@liverpool.ac.uk> wrote: > On 01/02/2008, Pranesh Kulkarni <praneshvk@gmail.com> wrote: > > May be this sounding simple to you , please help me in this regard, > > It's not a matter of being "simple" or complex. > The problem is that you are not giving us sufficient > information to work with. > > You say that: > > > Using mib2c tool , I generated code for the scalar and table and then > > configured , make and make install > > But *how* did you run configure? > What was the exact command that you used? > What were the names files produced by mib2c, and where did you put them? > > Similarly: > > > if I issue snmpget it replies , No Such Instance currently exists at > this OID > > That's omitting all of the useful information. > What was the exact "snmpget" command that you used? > It sounds as if you supplied at least one OID to retrieve, > but what was it? And how does this fit into the structure > of your MIB, or the initialisation that you've got in your C code? > > > None of us can read your mind. And we don't have access to > your private files. If you don't tell us exactly what you've tried > (including the details - not something vague like "issue snmpget"), > then there is no way on earth that we can even start to guess > what might be wrong! > > > The more detail you can provide, the greater the chance of > someone being able to help. > > Dave > ------=_Part_7838_30375994.1202190036927 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi ,<br><br><br>I want to have a subagent to master net-snmp agent.<br><br>Dircectory structure is<br><br>~/net-snmp-5.4.1<br> and<br>I have wriiten my mib module simple-MIB in /usr/local/share/snmp/mibs directory and checked with snmptranslate command.<br> I am generating C files using mib2c tool in ~/simpleTable .<br><br>I created my module and generated using mib2c tool.<br> $ mib2c -c mib2c.mfd.conf simple-MIB::simpleTable<br> <br> It generated .c and .h files<br><br> In simpleTable_data_access.c assigned some defalut values<br> int simpleName_len=30;<br> char simpleName[255];<br> int simpleAddress_len=10;<br> char simpleAddress [255];<br> int simpleLocation_len=10;<br> char simpleLocation_len[255];<br><br>In fact I have to read from some file and fill the values . But here just assigned some values.<br> <br> &nbs p; When I done with make command , I got the executable , simpleTable<br><br> When I do<br> ./simpleTable ,<br> ./simpleTable: symbol lookup error: ./simpleTable: undefined symbol: netsnmp_cache_create<br> <br><br> I have kept an entry in /usr/local/share/snmp/snmpd.conf<br> master agentx<br><br> and the agent is running with command<br> &nb sp; /usr/local/sbin/snmpd<br><br> Please help me in resloving this issue.<br> <br><br>Thanks,<br>Pranesh<br><br><br><br><br><d iv class="gmail_quote">On Feb 1, 2008 9:14 PM, Dave Shield <<a href="mailto:D.T.Shield@liverpool.ac.uk">D.T.Shiel d@liverpool.ac.uk</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On 01/02/2008, Pranesh Kulkarni <<a href="mailto:praneshvk@gmail.com">praneshvk@gmail. com</a>> wrote:<br></div><div class="Ih2E3d">> May be this sounding simple to you , please help me in this regard,<br> <br></div>It's not a matter of being "simple" or complex.<br>The problem is that you are not giving us sufficient<br>information to work with.<br><br>You say that:<br><div class="Ih2E3d"><br>> Using mib2c tool , I generated code for the scalar and table and then<br> > configured , make and make install<br><br></div>But *how* did you run configure?<br>What was the exact command that you used?<br>What were the names files produced by mib2c, and where did you put them?<br><br>Similarly:<br> <div class="Ih2E3d"><br>> if I issue snmpget it replies , No Such Instance currently exists at this OID<br><br></div>That's omitting all of the useful information.<br>What was the exact "snmpget" command that you used?<br> It sounds as if you supplied at least one OID to retrieve,<br>but what was it? And how does this fit into the structure<br>of your MIB, or the initialisation that you've got in your C code?<br><br><br>None of us can read your mind. And we don't have access to<br> your private files. If you don't tell us exactly what you've tried<br>(including the details - not something vague like "issue snmpget"),<br>then there is no way on earth that we can even start to guess<br> what might be wrong!<br><br><br>The more detail you can provide, the greater the chance of<br>someone being able to help.<br><font color="#888888"><br>Dave<br></font></blockquote></div><br> ------=_Part_7838_30375994.1202190036927-- --===============0246859771== 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/ --===============0246859771== 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 --===============0246859771==-- |