[AGENT++] mib table
Frank Fock
fock at agentpp.com
Tue May 12 16:55:00 CEST 2009
Hi,
The MIB specification is incorrect. Please check and correct
it with
http://www.agentpp.com/mibtools/mibtools.html
It seems that you have used modified an existing AGENT++
MIB. If you do so, please also remove any references to
AGENT++ and do not use the name "agentpp" in your MIBs!
Best regards,
Frank
manny rai wrote:
> hi,
> i have implemented a simple mib table.
> class TestTable:public MibTable
> {
> public:
> TestTable();
> void get_request(Request*,int);
> };
> TestTable::TestTable():MibTable("1.3.6.1.4.1.5353.6.1",3,TRUE)
> {
> add_col(new DiskSize("1"));
> }
>
> void TestTable::get_request(Request* req,int ind)
> {
> MibTable::get_request(req,ind);
>
> }
>
>
> there is a DiskSize class which implement MibLeaf class
>
> DiskSize::DiskSize(const Oidx& id,unsigned long _size):MibLeaf(id, READWRITE, new SnmpInt32(_size))
> {
> size = _size;
> }
>
> void DiskSize::get_request(Request* req, int ind)
> {
> *((SnmpInt32*)value) = size;
> MibLeaf::get_request(req, ind);
> }
>
> MibEntryPtr DiskSize::clone()
> {
> MibEntryPtr other = new DiskSize(oid,rand());
> ((DiskSize*)other)->replace_value(value->clone());
> ((DiskSize*)other)->set_reference_to_table(my_table);
> return other;
> }
>
> ////////////////////////////////
> than i have added this tables object into mib
> TestTable *tt = new TestTable();
> MibTableRow *mr=NULL;
> mr = tt->add_row("1");
> mr = tt->add_row("2");
> mr = tt->add_row("3");
> mib->add(tt);
>
>
> ********this all working fine but when i am trying to access third party snmp manager.only first rows value is comming.......
> i am giving MIB file that i have written for snmp manager
>
>
> AGENTPP-TABLE DEFINITIONS ::= BEGIN
> IMPORTS
> enterprises,
> MODULE-IDENTITY,
> OBJECT-IDENTITY
> FROM SNMPv2-SMI;
> agentppTableMIB MODULE-IDENTITY
> LAST-UPDATED "200405151012Z" -- May 15, 2004 10:12:00 AM
> ORGANIZATION "AGENT++"
> CONTACT-INFO
> DESCRIPTION
> "Global registration MIB module for the AGENT++
> framework."
>
> -- 1.3.6.1.4.1.5353.1.1.1 -- ::= { enterprises 5353 1 1 1 }
>
> agentppTableThree OBJECT-IDENTITY
> STATUS current
> DESCRIPTION
> "The root of the sub-tree assigned to AGENT++."
> -- 1.3.6.1.4.1.5353 -- ::= { enterprises 5353 }
> agentppTableExpr OBJECT-IDENTITY
> STATUS current
> DESCRIPTION
> "Sub-tree for experimental definitions."
> -- 1.3.6.1.4.1.5353.6 -- ::= { agentppTableThree 6 }
>
> agentppTestSharedTable OBJECT-TYPE
> SYNTAX SEQUENCE OF AgentppTestSharedEntry
> MAX-ACCESS not-accessible
> STATUS current
> DESCRIPTION
> "This table is implemented by AgentX subagents
> to test behavior of index allocation for shared tables.
> "
> -- 1.3.6.1.4.1.5353.6.1 -- ::= { agentppTableExpr 1 }
>
> agentppTestSharedEntry OBJECT-TYPE
> SYNTAX AgentppTestSharedEntry
> MAX-ACCESS not-accessible
> STATUS current
> DESCRIPTION
> "A row of a shared table. Each row is allocated and
> registered in random intervals."
> INDEX {
> agentppTestSharedTableIndex }
> -- 1.3.6.1.4.1.5353.6.1.1 -- ::= { agentppTestSharedTable 1 }
>
> AgentppTestSharedEntry ::= SEQUENCE {
> agentppTestSharedTableDisk Integer32,
> }
>
> agentppTestSharedTableDisk OBJECT-TYPE
> SYNTAX Integer32
> MAX-ACCESS read-write
> STATUS current
> DESCRIPTION
> "row will be delayed before it is processed."
> DEFVAL { 0 }
> -- 1.3.6.1.4.1.5353.6.1.1.1 -- ::= { agentppTestSharedEntry 1 }
> END
>
>
>
> kindly help me,
> thanks
>
>
> Own a website.Get an unlimited package.Pay next to nothing.*Go to http://in.business.yahoo.com/
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
--
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the AGENTPP
mailing list