Simulating anomalous agent behavior


One of our customers had an interesting problem and wanted to model
a device anomaly where the device agent responds correctly for most
variables, but for some variables, the agent does not respond.


Using a modeling script that looks like the following helped him
model this anomaly.



set myIP [SA_getmyip]
SA_settcldebugflag 1
SA_settcldebugfile tcl_${myIP}.dbg


%getvalue_action  1.3
set curr_oid [ SA_getcuroid ]
switch -glob $curr_oid {
{*} { SA_seterrorstatus 9999 }



Setting the errorstatus to a special value of 9999 tells the
simulator to drop the response.  All requests to the interfaces
table in MIB2 are dropped, but the agent will respond correctly
to get requests for the other variables in its variable file.