Hi,

I runned mib2c with the mib2c.scalar.conf file with
this mib object:

pInter OBJECT-TYPE
          SYNTAX      Integer32
          MAX-ACCESS  read-write
          STATUS      current
          DEFVAL { 1 }
          DESCRIPTION
                ""
      ::= { pDat 1 }

and it generated the code. when i do a snmget -v 2c
... i get this message the first time in the agent
(snmpd):

send response:  (build int size 0: s/b 4)
send response:  (build int size 0: s/b 4)
send response:  (build int size 0: s/b 4)
send response:  (build int size 0: s/b 4)
send response:  (build int size 0: s/b 4)
send response:  (build int size 0: s/b 4)

And in the snmpget program i get no response from
localhost. But when I set this value for the first
time, and then get it again, it works fine. I don't
know what the problem is.

How can I make it have a default value, so that in the
first get it returns a value?

I have this:
int *data=(int *) handler->myvoid;
int *data_save;
long tmp_it;

In the MODE_GET
tmp_it = *data;
snmp_set_var_typed_value(requests->requestvb,
ASN_INTEGER ,(u_char *) &tmp_it, sizeof(long));

In MODE_SET_RESERVE1 I check the type
In MODE_SET_RESERVE2 I
memdup((u_char **) & data_save,                         (u_char *) data,
sizeof(data));
and check for null
and I call netsnmp_request_add_list_data()

And in MODE_SET_ACTION I have
*data = (int) *(requests->requestvb->val.integer);

In the others cases nothing.

Can anyone tell me the mistake?

Thanks a lot for your attention.


                
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to