Set Problem
Nuñez Correas, Fernando <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello. Now Im development my subagent in windows xp sp2 and visual studio 2005.
In this subagent, I create a handler registration, like this:
reginfo = netsnmp_create_handler_registration("Convertidor1", convertidor1_handler,Convertidor_oid, OID_LENGTH(Convertidor_oid), HANDLER_CAN_RONLY);
netsnmp_register_scalar_group(reginfo, CONVERTIDOR_FRECUENCIA, CONVERTIDOR_ALARMA1);
I have created a function convertidor1_handler where I generate my data and them shipment in some case, for example MODE_GET, MODE_GETBULK, etc... This work perfect, I build and run my project and there isn't any problem. With mib browser, I load my mib and response perfect with the GET command.....
But there is a problem with MOD_SET_ACTION, if I use this code:
case MODE_SET_ACTION:
for (request=requests; request; request=request->next)
{
requestvb = request->requestvb;
subid = requestvb->name[OID_LENGTH(Convertidor_oid)];
switch (subid)
{
case CONVERTIDOR_FRECUENCIA:
frecuencia1= (int) *(requests->requestvb->val.integer);
break; }
}
break;
In the mib browser, If I do set oid with a integer, it say me: Set Failed.
Did I forget something???????
If I register a OID with netsnmp_register_int_instance, I can set or get perfect....
Thank you.
Fernando Núñez Correa
C/ Mar Egeo 4, Pol. Industrial nº1
San Fernando de Henares
28830 - Madrid (ESPAÑA-SPAIN)
Tel: +34 91 626 93 38
Fax: +34 91 626 88 90
[email protected]
www.indra.es/space
www.indra.es/espacio
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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
image001.gif
(image/gif, 2.3 KB) - not displayed