request id
Frank Fock
Frank.Fock____t-online.de
Sun Sep 30 23:16:51 CEST 2001
Hello Alex,
Normally, there is no need to set the request ID. As its
name says, it should be unique. This can be best ensured
by SNMP API. If you want to create your own request
IDs, you may subclass Snmp and override MyMakeReqId().
Best regards,
Frank
Alex Finogenov wrote:
> Hello again,
>
> I just went with a debugger through the manager. Before sending a request
> snmp++ invokes Snmp::snmp_engine() which calls Snm::MyMakeReqId() in
> uxsnmp.cpp. The latter is the culprit: it sets the request id to
> MIN_RID=1000, which is a macro, so it is not possible to change.
>
> Is there a reason that an application code is not allowed to set the request
> id?
>
> Alex
>
> > -----Original Message-----
> > From: Alex Finogenov
> > Sent: Sunday, September 30, 2001 10:21 AM
> > To: 'agentpp-dl____agentpp.com'
> > Subject:
> >
> >
> > Hi,
> >
> > Using snmp++, I wrote a simple manager to test my SNMP agent.
> >
> > For some reason I am having a problem setting a request ID.
> > In the manager I call
> >
> > ...
> > Pdu pdu;
> >
> > ::set_request_id(&pdu, ++requestId);
> >
> > ...
> >
> > Then I insert a varbind list, and finally call
> >
> > Snmp::get(pdu, target);
> >
> > Everything seems to work fine except that the request ID that
> > the agent receives starts always from 1000 regardless of the
> > values set in the manager.
> >
> > Can you suggest what might be wrong?
> >
> > Thanks,
> > Alex
> >
--
Frank Fock - AGENT++
Email: fock____agentpp.com
Fax: +49 7195 177108
More information about the AGENTPP
mailing list