[AGENT++] Unavailable variables

Frank Fock fock at agentpp.com
Thu Jul 15 12:31:32 CEST 2004


Hi Mads,

You can set the error status by using the Request instace directly:

void myMibLeaf::get_request(Request* req, int index) {
   if (...) {
      req->error(index, SNMP_ERROR_RESOURCE_UNAVAIL);
   }
...
}

To add a row in the snmpTargetAddr table you will first have to add
a row in the snmpTargetAddrParamsTable to able to reference that
entry in your row. Try creating the rows using createAndWait(5)
row status. Then you can set the values step by step. Make sure
that the TAddress and TDomain values matches.

That should do the trick.

Best regards,
Frank

Mads Møller Grønfeldt wrote:

>Hi,
> 
>If my agent get a request for a variable that isn't available at the moment( ie. a subsystem is down ), how do I indicate this to the requesting application? I guess I could use SNMP_ERROR_RESOURCE_UNAVAIL, but how do I "return" this as the answer to a get_request?
> 
>Secondly I am still having trouble adding a row to the snmpTargetAddr table, if I try to add a row using the Mib Explorer, I get Inconsistent value, wrong value, etc. Can someone please give me a walkthrough for dummies on how to add a row to this table, as I obviously doesn't get it?
> 
>Best regards
>Mads
> 
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://agentpp.org/mailman/listinfo/agentpp
>
>  
>





More information about the AGENTPP mailing list