having trouble synthesizing

steve park spark____numethods.com
Fri Sep 28 19:47:24 CEST 2001


Hi,

I'm trying to use Agent++ and some various managers (the SNMP++ browser
that came with Mellquist's book and Loriot) to test some things out.  As
you'll see, I'm pretty new to all of this, although I've done a good bit
of reading to get up to speed.

I used NuDesign's Visual Mib Designer to build a simple mib then ran the
agentgen software on the resulting MIB to build some agent++ stubs. 

In the examples there are 3 lines of code:

vacm->addNewGroup( ...
vacm->addNewAccessEntry( ...
vacm->addNewView( ...

the addNewGroup function creates a user of name "new" (according to the
comment in the example).  Uh, is there no password associated with it?
Or is it a community name?  I don't understand this very well and the
documentation has no explanation.

The second line associates the access of a group to a particular view,
while the third line defines the view, or what is viewable by the group.
Right?

OK, so then using the SNMP++ browser I can retrieve, for example, the
system description.
But if I try to set it then I get the error "Agent indicates error in
SNMP request".  This particular browser supports only up SNMPv2c  and
the community names are set to "public".  If I use the Loriot browser I
can set it to use SNMPv3 with the username "new", but none of the vacm
member functions sets a password.

Finally, at the end of the example is a chunk of code that is the
request handler:

Request *req;
whlie( run ) {
	req = reqList->receive(2);
 ...

The agentgen script created some Agent++ stubs, but I don't see how the
request processing ties in with the stubs.  The 

  mib->process_request( req );

bit of code does all the process handling, but how and when does it know
to call any of the stub functions generated by agentgen?  For example, I
created a leaf called "stringLeaf" which has member prototype

int stringLeaf::set(const Vbx& vb)

since the process_request member function calls something in the agent++
library, how does it know to call stringLeaf's set function, assuming I
wanted to set its value?

It would be handy if there was a high-level overview of how things work
- I've plowed through the examples in the agent++ distribution but I'm
still a little shady on some of the details.  Any comments or help would
be greatly appreciated.

Thanks!



steve







More information about the AGENTPP mailing list