Robert Story (Users) wrote:
On Wed, 02 Jun 2004 14:38:58 -0300 Alexandre wrote:
AG> I hope this is not:
AG> AG> $ snmpget -v2c -c public rosalinda 1.3.6.1.4.1.10.1.2.0
AG> SNMPv2-SMI::enterprises.10.1.2.0 = ""
AG> $ snmpset -v2c -c foderosa rosalinda 1.3.6.1.4.1.10.1.2.0 s "1234567890"
AG> Error in packet.
AG> Reason: wrongLength (The set value has an illegal length from what the AG> agent expects)
If you are using this code:
On Fri, 28 May 2004 14:51:52 -0300 Alexandre wrote: AG> netsnmp_watcher_info *winfo = netsnmp_create_watcher_info( AG> notificationEmail, AG> 255,//strlen(notificationEmail), AG> ASN_OCTET_STR, AG> WATCHER_FIXED_SIZE);
note that you said the string had a FIXED size of 255. So the agent is expecting you to set new values that are 255 bytes long.
I already thougth about this possibility .
The error above ("wrongLength") appeared with the following code:netsnmp_handler_registration *reg = netsnmp_create_handler_registration( "notificationEmail", NULL, notificationEmail_oid, OID_LENGTH(notificationEmail_oid), HANDLER_CAN_RWRITE);
netsnmp_watcher_info *winfo = netsnmp_create_watcher_info( notificationEmail, strlen(notificationEmail), ASN_OCTET_STR, WATCHER_FIXED_SIZE); winfo->data_size = strlen( notificationEmail ); //winfo->max_size = sizeof( notificationEmail ); netsnmp_register_watched_scalar(reg, winfo);
------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Net-snmp-users mailing list [EMAIL PROTECTED] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
