[AGENT++] Re: AGENTPP Digest, Vol 4, Issue 5

kor liha liah at cs.bgu.ac.il
Sun May 9 11:23:19 CEST 2004


On Fri, 7 May 2004 agentpp-request at agentpp.org wrote:

> Send AGENTPP mailing list submissions to
> 	agentpp at agentpp.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://agentpp.org/mailman/listinfo/agentpp
> or, via email, send a message with subject or body 'help' to
> 	agentpp-request at agentpp.org
> 
> You can reach the person managing the list at
> 	agentpp-owner at agentpp.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AGENTPP digest..."
> 
> 
> Today's Topics:
> 
>  1. newbie MibTable question (Hong Chen)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 6 May 2004 18:58:21 -0700
> From: "Hong Chen" <hchen at portrait.com>
> Subject: [AGENT++] newbie MibTable question
> To: <agentpp at agentpp.org>
> Message-ID: <LHEBLJHLBMEHMKNNECHMOEBDCAAA.hchen at portrait.com>
> Content-Type: text/plain;	charset="iso-8859-1"
> 
> hi folks,
> 
> This is a newbie question about MibTable.
> 
> I have a table defined as this :
> 
> devEntry {
> 	devIndex,-- index
> 	devName, -- read-only
> 	...
> 	devLock -- read-write
> }
> 
> All the device information can be retrieved from a system config file.
> 'devLock' is the only object that could be set ( otherwise it should be
> fairly easy to use 'MibStaticTable' and 'MibStaticLeaf')
> 
> What I want to do is to create an instance for each device from the system
> config file when snmp agent is started up. Once the agent is up, I may do a
> snmpset against devLock object.
> 
> To implement this, I define the classes
> class devEntry : public MibTable {
> ...
> };
> 
> class devName : public MibLeaf {
> ...
> };
> 
> class devLock : public MibLeaf {
> ...
> };
> 
> To add the instances to the devTable,
> 
> devEntry* pDevEntry = new devEntry(...);
> 
> MibTableRow pRow = pDevEntry->add_row(...);
> pRow->add(new devName(...)...);
> pRow->add(new devLock(...)...);
> ...
> mib.add(pDevEntry);
> ...
> 
> I guess this is not quite right as I don't see the devName, devLock objects
> added when the agent is started up, and a snmpwalk don't find the objects.
> 
> Should I use other method to add these pre-loaded data, like
> MibTable::add_col() ?
> 
> thanks in advance
> hong
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://agentpp.org/mailman/listinfo/agentpp
> 
> 
> End of AGENTPP Digest, Vol 4, Issue 5
> *************************************
> 




More information about the AGENTPP mailing list