AW: minimum implementation for smtp-set

"Nölle, Jochen" jochen.noelle____accellence.de
Wed Jun 26 09:13:17 CEST 2002


Hello Frank,

thank you for your answer. For me as a "newcomer" (and I think there are
several newcomer here) it is a problem to get started with
agent++/snmp++.

All documentation I have found already is 
- a documentation about SNMP++ from Peter Mellquist,
- your doxygen source code documentation (but there are almost very few
functions documented, only class/object relations may be extracted well
from this doc),
- some sample code like agent_copy.cpp or files in simagent folder.
Did I miss anything?

In my opinion it would help much, if you write a small description in
the sample sourcecode about the purpose of the examples and a little bit
about what it does at runtime (this could all be describe in maybe 2 or
three sentences).

I think you provide a very good source code library with many features
to serve most requirements of snmp-(agent)-developers. To make it really
perfect it would be helpful to extend source-code documentation compiled
with doxygen. There is no need to explain every function (only if the
function does not explain itself easily) but a little bit of
class-description would help many developers to use your code.

With best regards,

Jochen Noelle

-----Ursprüngliche Nachricht-----
Von: Frank Fock [mailto:Frank.Fock at t-online.de]
Gesendet: Freitag, 21. Juni 2002 19:47
An: =?iso-8859-1?Q?N=F6lle?=@t-online.de; Nölle, Jochen
Cc: agentpp-dl____fock.de
Betreff: Re: minimum implementation for smtp-set


Jochen,

Basically there is no need to implement anything.
Using a MibLeaf instance constructed with OID and
correct syntax will already provide all functionality
to support SNMP SET requests.

In addition, AgentGen generated code is ready to
use. No extra implementation is needed. If the agent
crashes in "replace_value", then the initial value is
not properly initialized or you might have modified
the generated code...

What kind of explanation of the example code do
you expect? More comments on structure? Method
calls?

Best regards,
Frank

"Nölle, Jochen" wrote:

> Hello,
>
> could someone tell me what code implementation has to be done to set a
> variable from a management system in an agent++ application?
> I tried to implement a small piece of code using MS Visual C++6.0.
> Snmp-get works but if a set-pdu has been received the application
> crashes in
> function "void MibLeaf::replace_value(SnmpSyntax* v)" in the
> delete-function. VC++ says "HEAP[AgentppTest.exe]: Invalid Address
> specified to RtlValidateHeap( 310000, 89a980 )".
>
> Previously I compiled a mib-class "my_test_mib" with the agentgen-tool
> containing an octet-string and an integer value.
>
> This is the code:
> --------------------
>  Mib mib;
>  int status;
>  Snmpx snmp(status, 163);
>
>  if(status !=SNMP_CLASS_SUCCESS)
>  {
>         return FALSE;
>  }
>  RequestList ReqList;
>
>  mib.set_request_list(&ReqList);
>  mib.add(new my_test_mib);
>  ReqList.set_snmp(&snmp);
>         for(;;)
>         {
>                 req = ReqList.receive(30);
>
>                 if(req)
>                         mib.process_request(req);
>         }
>         return TRUE;  // return TRUE  unless you set the focus to a
> control
> --------------------
>
> In my opinion, it is hard work for a newcomer, who just makes first
> steps working with snmp trying to make agent++ work because of missing
> introduction to the package. The example code comes with no
explanation
> about its functionality.
>
> Could someone give me some help?
>
> Thanks,
>
> Jochen Noelle





More information about the AGENTPP mailing list