sending error from mib2c code for multiple oid in single request
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
snmpset on sysContact and sysLocation gives notWritable
Hi snmpset on sysContact and sysLocation gives notWritable error, if i have entry for this in snmpd.conf The query and response is: snmpset -v2c -c private localhost sysLocation.0 s temp Error in packet. Reason: notWritable (That object does not support modification) Failed object: RFC1213-MIB::sysLocation.0 - once i comment the line "syslocation India" in snmpd.conf file and restart the snmp demon the sysLocation is successfully set with the value. The same hold true for sysContact also. Do i have to remove sysContact line and sysLocation line in snmpd.conf file? If yes, How this values can be initialized ? If no, why i am getting "notWritable" ( I had tested community string and all other parameter in the set request by giving set on sysName) is failing to set? by Kanda --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Sending notification to particular manager
Hi I have to send sanity notification to multiple managers who are registered for trap/inform. This sanity notification needs to be send to each manager at different time interval. Let say if two managers A and B registered for sanity notification.Both managers A and B can configure different time interval to receive the sanity notification. Also, if a particular manager is not able to receive the sanity notification, i should be able to reduce the interval time only for that manager. Since Net-SNMP doesn't support notification-filtering, is there a simple way to support the above use case? with regards Kanda --- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
sending V3 traps
Hi To send v1/v2 trap/inform net-snmp uses community string, trapsink trap2sink informsink configured in the snmpd.conf. In case of V3, we don't have any information stored in it? (In net-snmp 5.2.1). "snmpconf -g basic_setup" command is not asking any information about V3 trap configuration. To send V3 trap/inform we need to have username, pass phrase , security level etc... Though snmp FAQ says that this can be configured through snmpsess, but there is no information about how to put this in snmpd.conf. how we can configure snmpsess in the snmpd.conf ? Is there other way to configure/send V3 traps/inform? by Kanda --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
trapsess configuration for v3
Hi I have to configure V3 usename / passpharse to send v3 traps. I am using trapsess directive in snmpd.conf file. I had tried "trapsess -Ci -v 3 -u myuser -a MD5 -A mypassword -l authNoPriv localhost" by putting this line in snmpd.conf file. After this when i restart my snmpd in the log file it say following error message. (i am running snmptrapd and i had configured same user in snmptrapd.conf) "/usr/local/share/snmp/snmpd.conf: line 169: Error: snmpd: failed to parse this line or the remote trap receiver is down. Possible cause: snmpd: snmpd_parse_config_trapsess(): Timeout" I had tried "trapsess myuser MD5 mypassword authNoPriv localhost" also, it is giving error. How i can configure the trapsess for v3? Am i missing any parameter ? Is there any other directive i can use to send v3 trap? by Kanda --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
