[AGENT++] Adding New MIB

Vikram Bhuskute vikrambhuskute at gmail.com
Mon Jun 1 16:44:51 CEST 2009


Hi ,
       Would like to know about adding a MIB definition in the code. After
doing some traps
i would now want to to get /set for my private mibs.

1. I want to add new v3 Mibs  I did following


mib.add(new V3SpringGroup() ) in a file

and then


V3SpringGroup::V3SpringGroup(void): MibGroup(" 1.3.6.1.4.1.11111")
{
    v3MP *v3mp = v3MP::I;
    USM *usm = 0;
    if (v3mp)
      usm = v3mp->get_usm();

     add(new V3SpringLeaf1(v3mp));

}


V3SpringLeaf1::V3SpringLeaf1(const v3MP *mp)
  : MibLeaf( " 1.3.6.1.4.1.11111.1.0", READONLY, new SnmpInt32(2)), v3mp(mp)
{}

void V3SpringLeaf1::get_request(Request* req, int index)
{
  long time, boots;

   *((OctetStr*)value) = v3mp->get_local_engine_id();

  MibLeaf::get_request(req, index);
}



However I couldn't see the Mib while a getnext request from snmpwalk as well
as from another manager.


2)  getnext lists  entries done using "addview" . But they are just traps
right ? they wont contain object type ,value etc  ?

Could someone help in this regard


regards

Vikram



More information about the AGENTPP mailing list