Re: Opaque types

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 03/12/2007, Violette Moulin <[email protected]> wrote:
>         case MODE_SET_ACTION:
>               myFloat =
> atof(netsnmp_strdup_and_null(requests->requestvb->
> val.string, requests->requestvb->val_len));
>         break;

No - the Net-SNMP library has already converted the value into
a float.   Try

     myFloat = *requests->requestvb->val.float



> $ snmpset -v 1 -c private localhost myFloat.0 s 2.5
> myFloat.0: Bad variable type (Type of attribute is Opaque, not OCTET STRING)

Try
     snmpset -v 1 -c private localhost myFloat.0  F  2.5

Dave

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.