This is a discussion on MacAddress index handling within the SNMP Coders forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. ------_=_NextPart_001_01C67995.EA3E4AC9 Content-Type: text/plain; charset="us-ascii&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
------_=_NextPart_001_01C67995.EA3E4AC9 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, In MIB I have a table defined with three index of type integer.MacAddress.integer. I had generated code using mib2c.create-dataset.conf ( version : net-snmp-5.2.1 in Linux ). When I am sending snmpget as myColumn.1.6.170.170.170.170.170.170.1 in agent/helper/table.c snmpd log prints index as 1 , AA AA AA AA AA AA and 1, but if I send as myColumn.1.170.170.170.170.170.170.1 in agent/helper/table.c snmpd prints 1, " " and 1.=20 In the second case ( 1.170.170.170.170.170.170.1 , with out giving the index length ) table handler is not called and for the snmpget request I getting reply as "No Such Instance currently exists at this OID" As per my understanding for fixed string index ( MacAddress is OCTECT-STRING of type 6 ), no need to give the length ( 6) as prefix. If I give MacAddress index with length mib2c table handler get called for get/set queries, but if I give with out index mib2c handler is not called and returned error for get/set queries ) In snmpget/snmpset request do I have to give index in some other format for MacAddress? =20 Do I have to change any code to support get/set call if length is not prefixed for MacAddress index ? I had searched for some sample MacAddress index tables , I am not able to find the same , Please some one point a place where I can get details ? Thanks in advance ... =20 -SIGTERM Santhosh ------_=_NextPart_001_01C67995.EA3E4AC9 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.5.7638.1"> <TITLE>MacAddress index handling</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Arial">Hi,</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN = LANG=3D"en-us"> <FONT SIZE=3D2 = FACE=3D"Arial">In MIB I have a table defined with three index of type = integer.MacAddress.integer.</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN = LANG=3D"en-us"> <FONT SIZE=3D2 = FACE=3D"Arial">I had generated code using mib2c.create-dataset.conf = ( version : net-snmp-5.2.1 in Linux ). When I</FONT><FONT SIZE=3D2 = FACE=3D"Arial"> am sending snmpget as = myColumn.1.6.170.170.170.170.170.170.1 in agent/helper/table.c snmpd log = prints index as 1 , AA AA AA AA AA AA and 1, but if I send as = myColumn.1.170.170.170.170.170.170.1 in agent/helper/table.c snmpd = prints 1, “ “ and 1. </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">In = the s</FONT><FONT SIZE=3D2 FACE=3D"Arial">econd case ( = 1.170.170.170.170.170.170.1 , with out giving the index length ) table = handler is not called and for the snmpget request I getting reply as = “</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">No Such Instance currently = exists at this OID</FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">”</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">As = per my understanding for fixed string index ( MacAddress is = OCTECT-STRING of type 6 ), no need to give the length ( 6) as prefix. If = I give MacAddress index with length mib2c table handler get called for = get/set queries, but if I give with out index mi</FONT><FONT SIZE=3D2 = FACE=3D"Arial">b</FONT><FONT SIZE=3D2 FACE=3D"Arial">2c handler is not = called and returned error for get/set queries )</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">In = snmpget/snmpset request do I have to give index in some other format for = MacAddress? </FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Do I = have to change any code to support get/set call if length is not = prefixed for MacAddress inde</FONT><FONT SIZE=3D2 FACE=3D"Arial">x = ?</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I had = searched for some sample MacAddress index tables , I am not able to find = the same , Please some one point a place where I can get details = ?</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Arial">Thanks in advance …</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Arial"></FONT></SPAN><SPAN LANG=3D"en-us"></SPAN><SPAN = LANG=3D"en-us"> </SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"></SPAN><A NAME=3D""><SPAN = LANG=3D"en-us"></SPAN></A></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Arial">-SIGTERM</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"><FONT SIZE=3D2 = FACE=3D"Arial">Santhosh</FONT></SPAN></P> <P ALIGN=3DLEFT><SPAN LANG=3D"en-us"></SPAN></P> </BODY> </HTML> ------_=_NextPart_001_01C67995.EA3E4AC9-- ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642 _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |