[AGENT++] MibLeaf subclassing

Robert Kapeller robert.kapeller at siemens.com
Tue Jun 8 11:25:13 CEST 2004


Hi!

I want to intercept certain SET-requests to scalar objects.
I tried this by creating a subclass of MibLeaf:

class calmMibLeaf : public MibLeaf  {
   // Constructor...
   virtual void set_value(...);
}

and override all the set_value(...) - methods:

void calmMibLeaf::set_value(...) {
	// Do something
	LOG(calmMibLeaf set_value() called);
	MibLeaf::set_value();
}


The calmMibLeaf-objects are created and added to my mib-object:

  calmCurrNotifyID = new calmMibLeaf(CALM_CURR_NOTIFY_ID, READWRITE, new Gauge32(0)); 

  mib->add(calmCurrNotifyID);

When I set the value from the command linde via snmpSet ... I can see, that the derived methods 
in calmMibLeaf are never called.

How can I intercept SNMP SET-requests? Or did I just make a programming fault?

I use agent++ V3.5.14

thank you in advance - robert.




More information about the AGENTPP mailing list