? Agent++ & MIB

Frank Fock Frank.Fock____t-online.de
Mon May 28 20:02:50 CEST 2001


Hi Vinay,

Please find my answer inline:

"Kumar, Vinay 2" wrote:

> Table::Table (string anOID): MibTable (anOID.c_str(), 0, FALSE)
> {
> instance = this;                                //col  =
> add_col (new Property (parameter1));    //1
> add_col (new Property (parameter2));    //2
> add_col (new Property (parameter3));    //3
> add_col (new Property (parameter4));    //4
> add_col (new Property (parameter5));    //5
> }
> ///////////
> void Table::AddRow (char* numRow)
> {
>     add_row (numRow);
> }
> ///////////
> void mainProcedure(Mib* mib)
> {
> Table *T = new Table("1.3.6.1.4.1.555.55");
> t->AddRow("1"); //row = 1
> t->AddRow("2"); //row = 2
> mib->add(T);
> }
> //////////
>
> ?how do i show this structure in the MIB file.

It seems that your qustion is a basic one. Did you read
already "Understanding SNMP MIBs" by D. Perkins?
It is a really good book and it explains tables thoroughly.

>
> ?what OID i give if i want to access 5th column of the 2nd row.
>

You should create your table with:
Table *T = new Table("1.3.6.1.4.1.555.55.1");
because AGENT++ needs the OID of the ENTRY object.

With the above  you would access the 5th column of the 2nd row with:
1.3.6.1.4.1.555.55.1.5.2

Best regards,
Frank




More information about the AGENTPP mailing list