Re: mib2c linker errors ifTable

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


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-05-2008
Pranesh Kulkarni
 
Posts: n/a
Default Re: mib2c linker errors ifTable

--===============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>&nbsp;and<br>I have wriiten my mib module simple-MIB&nbsp; in /usr/local/share/snmp/mibs directory and checked with snmptranslate command.<br>
&nbsp;I am generating C files using mib2c tool in ~/simpleTable .<br><br>I created my module and generated using mib2c tool.<br>&nbsp;$ mib2c -c mib2c.mfd.conf simple-MIB::simpleTable<br>&nbsp;<br>&nbsp;It generated .c and .h files<br><br>&nbsp;In simpleTable_data_access.c assigned some defalut values<br>
&nbsp;&nbsp;&nbsp; int simpleName_len=30;<br>&nbsp;&nbsp;&nbsp; char simpleName[255];<br>&nbsp;&nbsp;&nbsp; int simpleAddress_len=10;<br>&nbsp;&nbsp;&nbsp; char simpleAddress [255];<br>&nbsp;&nbsp;&nbsp; int simpleLocation_len=10;<br>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; When I done with make command , I got the executable , simpleTable<br><br>&nbsp;&nbsp;&nbsp;&nbsp; When I do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./simpleTable ,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./simpleTable: symbol lookup error: ./simpleTable: undefined symbol: netsnmp_cache_create<br>
<br><br>&nbsp;&nbsp;&nbsp; I have kept an entry in /usr/local/share/snmp/snmpd.conf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; master agentx<br><br>&nbsp;&nbsp;&nbsp; and the agent is running with command<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp; /usr/local/sbin/snmpd<br><br>&nbsp;&nbsp;&nbsp; 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 &lt;<a href="mailto:D.T.Shield@liverpool.ac.uk">D.T.Shiel d@liverpool.ac.uk</a>&gt; 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 &lt;<a href="mailto:praneshvk@gmail.com">praneshvk@gmail. com</a>&gt; wrote:<br></div><div class="Ih2E3d">&gt; May be this sounding simple to you , please help me in this regard,<br>
<br></div>It's not a matter of being &quot;simple&quot; 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>&gt; &nbsp; Using mib2c tool , I generated code for the scalar and table and then<br>
&gt; &nbsp; 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>&gt; &nbsp; if I issue snmpget it replies , &nbsp;No Such Instance currently exists at this OID<br><br></div>That's omitting all of the useful information.<br>What was the exact &quot;snmpget&quot; command that you used?<br>
It sounds as if you supplied at least one OID to retrieve,<br>but what was it? &nbsp; 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. &nbsp;And we don't have access to<br>
your private files. &nbsp; If you don't tell us exactly what you've tried<br>(including the details - not something vague like &quot;issue snmpget&quot;),<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==--

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:36 PM.


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