[AGENT++] Intercept and manipulate PDU question.....

Frank Fock fock at agentpp.com
Fri Jun 18 09:28:12 CEST 2004


Hi Alexander,

You can use the Request::search_value method:
http://www.agentpp.com/doc3.x/classRequest.html#a15

Best regards,
Frank

alexander link wrote:

>Hi Frank,
>
>I think you're right.
>Can you give a hint on how to check for the (possible) second sub-request.
>I know that protocol specification allows this operation but I simply do not know where to begin when using 
>agent++ api.
>
>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
>
>_________________________________________________________________
>www.ebay.de Hier Finden Sie Auktionen und Festpreisangebote!
>
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://agentpp.org/mailman/listinfo/agentpp
>  
>





More information about the AGENTPP mailing list