Hi
if snmpget/set request contains multiple oids, I have to send oid wise
error response to denote in that request which oid went wrong
In mib2c code generated by mib2c.scalar.conf, i am calling one method
callServer(requests).
In callServer(request), if the requested oid is not the last oid in the
varbind i am storing request informations and simply returning from the
callServer to handler_XXX. if the requested oid is last in the varbind i
am calling one server to get/set the values for all the requested oid as
a single request to that server and getting the response.
From the response i am giving response for snmpget/set request as
follows,
if(requested oid is not the last one)
{
store_request_info()
var = requests->agent_req_info->asp->pdu->variables;
}
else
for(i=0;var !=NULL; i++)
{
if( i th oid got response)
snmp_set_var_typed_value(var,TYPE,*(val+i),strlen(*(val+i)));
else
//return SNMP_ERR_GENERR;
netsnmp_request_set_error(requests,SNMP_ERR_GENERR);
var = var->next_variable;
}
In this case it always says last oid as the error even middle one had
error value for set/get
i had used netsnmp_set_request_error() also i am getting the same..
Can i send error message by using snmp_set_var_typed_value() or is there
any API so that i can send the var pointer(requests->agent_req_info->asp
->pdu->variables) to set the error for particular oid in the request.
by
Sam
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders