Type checking in MibLeaf::set
Hans Bouwers
j.bouwers____rohill.nl
Mon May 12 13:37:22 CEST 2003
Hello agentpp-folks,
I wonder how I can do type-checking in a set-request.
I tried
if (MibLeaf::get_syntax() != vb.get_syntax())
return SNMP_ERROR_WRONG_TYPE;
in the overloaded Mibleaf::set(const Vbx& vb) member, but vb.get_syntax
always returns the sam e MibLeaf::get_syntax.
Even when the MibLeaf-object is sNMP_SYNTAX_INT32 and i want to set its
value, with an Snmp-manager, to a string, eg "Test".
I also tried this in the
MibLeaf::prepare_set_request(Agentpp::Request* poRequest, int& iIndex)
member, same results.
Any hints appreciated.
Gr, Hans
More information about the AGENTPP
mailing list