>     sprintf(value, "%d", auth);
>     snmp_add_var(pdu, auth_OID, auth_OID_len, 'i', value);

That's probably where the problem is.
You need to pass a pointer to the actual (binary) value - not a printable
version of it.

Try
      snmp_add_var(pdu, auth_OID, auth_OID_len, 'i', &value);
instead.

>     
>     for (port = 0; port < NUM_IF; ++port) {
>         link_OID[link_OID_len-1] = port+1;
>         sprintf(value, "%d", links[port]);
>         
>         snmp_add_var(pdu, link_OID, link_OID_len, 'i', value);

Same again here.
Try
          snmp_add_var(pdu, link_OID, link_OID_len, 'i', &links[port]);


Dave



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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

Reply via email to