GetNext index problem

This is a discussion on GetNext index problem within the SNMP Users forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --===============1041979081== content-class: urn:content-classes:message Content-Type: multipart/alternative; ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-11-2007
Rotem Tzuk
 
Posts: n/a
Default GetNext index problem

This is a multi-part message in MIME format.

--===============1041979081==
content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C83BD8.B10E3172"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C83BD8.B10E3172
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi
=20
I have implemented a MIB that includes a table.
I use the iterator functions as shown in the example MIB.
I have 2 rows in my table each refers to a file that holds the data.
My iterator handlers set the appropriate file name in the
my_data_context.=20
I extract the file name in the MIB handler by calling
netsnmp_extract_iterator_context.
=20
When I run snmpwalk I get all my data as expected - both rows are there.
=20
When I try to get a specific index by calling
snmpgetnext -v2c -c public localhost MY-MIB::myValue.1
or=20
snmpgetnext -v2c -c public localhost MY-MIB::myValue.2
=20
I always get the first value - for some reason the index is ignored.
=20
Tracing the MIB handler - file name extracted form
netsnmp_extract_iterator_context is always the first file.
My MIB handler is called only once (which is OK).
=20
=20
Can you provide some hint for wrong implementation of table indexing or
better way to call snmpgetnext?
=20
=20
thanks in advance
Rotem
=20
=20






=20

------_=_NextPart_001_01C83BD8.B10E3172
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6000.16546" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D928441809-11122007>Hi</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D928441809-11122007>I have =
implemented a=20
MIB that includes a table.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D928441809-11122007>I use =
the <FONT=20
color=3D#010001>iterator </FONT>functions as shown in the example=20
MIB.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>I have=20
2 rows in my table each refers to a file that holds the=20
data.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>My=20
iterator handlers set the appropriate file name in the my_data_context.=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>I=20
extract the file name in the MIB handler by calling <FONT =
color=3D#010001=20
size=3D2>netsnmp_extract_iterator_context.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>When I=20
run <FONT face=3D"Times New Roman">snmpwalk</FONT> I get all my data as =
expected -=20
both rows are there.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>When I=20
try to get a specific index by calling</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007>snmpgetnext -v2c -c public localhost=20
MY-MIB::myValue.1</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>or=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007>snmpgetnext -v2c -c public localhost=20
MY-MIB::myValue.2</SPAN></FONT></DIV></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007>&nbsp;I always get the first value - for some =
reason=20
the index is ignored.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007>Tracing the MIB handler - file name extracted =
form=20
netsnmp_extract_iterator_context is always the first =
file.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN =
class=3D928441809-11122007>My MIB=20
handler is called only once (which is OK).</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#010001 size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D928441809-11122007>Can =
you provide some=20
hint for wrong implementation of table indexing or better way to call=20
snmpgetnext?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D928441809-11122007>thanks =
in=20
advance</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D928441809-11122007>Rotem</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D928441809-11122007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial=20
size=3D2></FONT><FONT face=3DArial color=3D#010001 =
size=3D2></FONT><BR><BR><BR><BR><BR>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C83BD8.B10E3172--


--===============1041979081==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
--===============1041979081==
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

--===============1041979081==--

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 04:56 AM.


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