[AGENT++] Dynamic row creation problem
somenath.pal at wipro.com
somenath.pal at wipro.com
Thu Jan 10 07:40:31 CET 2008
Hi ,
I found the problem.
Actually I did not used the latest version of AGENT++ and SNMP++ and in
the earlier version of AGENT++ there is bug which is fixed in latest
version of AGENT++.
In the function int MibTable::check_creation(Request* req, int& ind)
(mib.cpp) the type of new_row_status is unint32
uint32 new_row_status = 0;
So req->get_value(i).get_value(new_row_status); is calling the int
Vb::get_value(unsigned long &i) const (vb.cpp) and it is returning error
from this particular function .
In the latest version of the code it is changed to
int new_row_status = 0;
req->get_value(i).get_value(new_row_status);
Regards,
Somenath
>-----Original Message-----
>From: Frank Fock [mailto:fock at agentpp.com]
>Sent: Thursday, January 10, 2008 5:25 AM
>To: Somenath Pal (WT01 - TES-Access Networks)
>Cc: agentpp at agentpp.org
>Subject: Re: [AGENT++] Dynamic row creation problem
>
>Hi,
>
>Are you using the latest AGENT++ and SNMP++ version?
>There is nothing special to implement to support
>the RowStatus TC except adding a snmpRowStatus instance
>to the table.
>
>Best regards,
>Frank
>
>somenath.pal at wipro.com wrote:
>>
>>
>> Hi All,
>>
>>
>>
>> I am developing SNMP agent using Agent++ . We have requirement which
>> says manager should be able to create row in MIB table dynamically.
>>
>>
>>
>> I have the table as mentioned bellow
>>
>>
>>
>> TrapRegistrationManagersEntry ::= SEQUENCE {
>>
>> TrapRegistrationManagersIPAddress
>>
>> IpAddress,
>>
>> TrapRegistrationManagersTrapReceivingPort
>>
>> Integer32,
>>
>> TrapRegistrationManagersTrapVersion
>>
>> SNMPversion,
>>
>> TrapRegistrationManagersTrapCommunity
>>
>> DisplayString,
>>
>> TrapRegistrationManagersTrapV3Users
>>
>> DisplayString,
>>
>> TrapRegistrationManagersReceiveAlarm
>>
>> TruthValue,
>>
>> TrapRegistrationManagersReceiveEvent
>>
>> TruthValue ,
>>
>> TrapRegistrationManagersRowStatus RowStatus
>>
>> }
>>
>>
>>
>> Now while trying to create the row using NetSnmp manger it is
failing.It
>> throws the error
>>
>> Error in packet.
>>
>> Reason: wrongValue (The set value is illegal or unsupported in some
way)
>>
>>
>>
>> While trying to find the problem I found the
>>
>> In the function "int MibTable::check_creation(Request* req, int&
ind)"
>> it is failing
>>
>>
>>
>> I investigate further down and found that in the bellow mentioned
code
>>
>> uint32 new_row_status = 0;
>>
>> req->get_value(i).get_value(new_row_status);
>>
>> Value of new_row_status is 0 while I am passing 4 from manager .
>>
>>
>>
>> I have a feeling that I am missing something . Please let me know
what
>> I am missing?
>>
>> And is there some thing needed to be implemented to support creation
of
>> dynamic row in MIB table?
>>
>>
>>
>> Please help.
>>
>>
>>
>> Regards,
>>
>> Somenath
>>
>>
>>
>>
>>
>>
>> The information contained in this electronic message and any
attachments
>to this message are intended for the exclusive use of the addressee(s)
and
>may contain proprietary, confidential or privileged information. If you
are
>not the intended recipient, you should not disseminate, distribute or
copy
>this e-mail. Please notify the sender immediately and destroy all
copies of
>this message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient
>should check this email and any attachments for the presence of
viruses.
>The company accepts no liability for any damage caused by any virus
>transmitted by this email.
>>
>> www.wipro.com
>>
>> _______________________________________________
>> AGENTPP mailing list
>> AGENTPP at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/agentpp
>
>--
>AGENT++
>http://www.agentpp.com
>http://www.mibexplorer.com
>http://www.mibdesigner.com
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
More information about the AGENTPP
mailing list