[AGENT++] Intercept and manipulate PDU question.....
Frank Fock
fock at agentpp.com
Wed Jun 16 23:36:09 CEST 2004
Hi Alexander,
alexander link wrote:
>Hi all.
>
>Situation:
>I would like to set the value of one MIB object (e.g. objectA ) only if the value of another object (e.g. objectB)
>matches a certain condition.
>
>Problem:
>Is there any possiblity to intercept and manipulate the received PDU without diving into the agent++ api? Can I
>
>
Yes of course, but I would not call it intereception. If value of
objectA is to be changed,
then simply check value of objectB by overwriting the
objectA::prepare_set_request method.
If objectB is allowed to be set in the same request, you will also have
to check if there is a value
in the Request in another sub-request set for that objectB.
>furthermore introduce a new (private) return error which can be applied to the response PDU? This could be
>
>
Yes, you can return any error code you want, but that's no longer SNMP then.
I would rather (strongly) recommend using inconsistentValue instead as
error code.
>useful because I could let the NMS know that some condition does not allow to set the value of a MIB object.
>
>Maybe there is something about SNMP I have not clearly understood.
>Please let me know.
>
>Regards
>Alexander Link
>
>
Best regards,
Frank
More information about the AGENTPP
mailing list