-----Original Message----- From: Prakash [mailto:[email protected]] Sent: Tuesday, April 06, 2010 8:11 PM To: 'Dave Shield' Cc: '[email protected]' Subject: RE: Registering a Table
Hi Dave, I attached my code. I am getting the list when I use the oid up to column id. snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.11456.3.3.1.2 snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.11456.3.3.1.3 I tried to get the sub-tree list of abcModule and abcTable. snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.11456 SNMPv2-SMI::enterprises.11456 = No Such Object available on this agent at this OID snmptable -v 2c -c public -Os localhost ABC-MIB::abcTable Was that a table? abcTable please tell me where I am wrong. Thanks. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield Sent: Tuesday, April 06, 2010 4:43 PM To: PrakashRaju Meka Cc: [email protected] Subject: Re: Registering a Table On 5 April 2010 12:03, Prakash <[email protected]> wrote: > How to register a table in subagent. > snmpwalk is not working for my table > > here is my code.. If you wish assistance, can you please post (as an attachment), the *full* text of your MIB module code file - not just fragments of it. That way we can try compiling it into a working agent framework and see what might be going wrong. I don't have the time to try and re-create the bits that you haven't bothered to include. Dave
abcTable.c
Description: Binary data
abcTable.h
Description: Binary data
Makefile
Description: Binary data
snmp-subagent.c
Description: Binary data
ABC-MIB DEFINITIONS ::= BEGIN
IMPORTS
RowStatus
FROM SNMPv2-TC
OBJECT-GROUP, NOTIFICATION-GROUP
FROM SNMPv2-CONF
enterprises, MODULE-IDENTITY, OBJECT-TYPE, Integer32,
NOTIFICATION-TYPE
FROM SNMPv2-SMI;
abcModule MODULE-IDENTITY
LAST-UPDATED "201002021512Z"
ORGANIZATION "Organization"
CONTACT-INFO "Contact-info"
DESCRIPTION "Description"
REVISION "201002021512Z"
DESCRIPTION "Sample ABC"
::= {enterprises 11456}
abc OBJECT IDENTIFIER
::= {abcModule 3}
abcID OBJECT-TYPE
SYNTAX Integer32(1 .. 25)
MAX-ACCESS read-write
STATUS current
DESCRIPTION "abcID"
::= {abc 1}
abcName OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION "abcName"
::= {abc 2}
--
-- ABC Table
--
abcTable OBJECT-TYPE
SYNTAX SEQUENCE OF AbcEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table Description"
::= {abc 3}
abcEntry OBJECT-TYPE
SYNTAX AbcEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Row Description"
INDEX {abcIndex}
::= {abcTable 1}
AbcEntry ::= SEQUENCE {
abcIndex Integer32,
abcValue OCTET STRING,
abcSize Integer32
}
abcIndex OBJECT-TYPE
SYNTAX Integer32(1 .. 25)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "ABCIndex"
::= {abcEntry 1}
abcValue OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Column Description"
DEFVAL {"Saven"}
::= {abcEntry 2}
abcSize OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Column Description"
DEFVAL {1024}
::= {abcEntry 3}
--
-- XYZ Table
--
xyzTable OBJECT-TYPE
SYNTAX SEQUENCE OF XyzEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table Description"
::= {abc 4}
xyzEntry OBJECT-TYPE
SYNTAX XyzEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Row Description"
INDEX {abcIndex, xyzIndex}
::= {xyzTable 1}
XyzEntry ::= SEQUENCE {
xyzIndex Integer32,
xyzValue OCTET STRING,
xyzSize Integer32
}
xyzIndex OBJECT-TYPE
SYNTAX Integer32(1 .. 25)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "ABCIndex"
::= {xyzEntry 1}
xyzValue OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Column Description"
DEFVAL {"Pennar"}
::= {xyzEntry 2}
xyzSize OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Column Description"
DEFVAL {1024}
::= {xyzEntry 3}
END
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
