Re: Help, please. Is there something wrong with this code?

2004-08-25 Thread Dave Shield
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.

Re: Help, please. Is there something wrong with this code?

2004-08-25 Thread cnelson
You need to pass a pointer to the actual (binary) value - not a printable version of it. snmp_add_var(pdu, auth_OID, auth_OID_len, 'i', value); Thanks but: x.c:1022: warning: passing arg 5 of `snmp_add_var' from

Re: Help, please. Is there something wrong with this code?

2004-08-25 Thread Dave Shield
Well, no. I really appreciate your quick feedback and explanation but now I'm worse off than I was. Before, my set routine got called n times for port 1, now it doesn't get called at all! Arggghhh - I'm a pillock! I've just spotted that you're talking about snmp_add_var, which is one of

Help, please. Is there something wrong with this code?

2004-08-20 Thread cnelson
I'm trying to manipulate ifLinkUpDownTrapEnable values. I used mib2c to create a ifXTable module and I can get and set values with snmpget and snmpset just fine. Now I'm trying to write a utility routine to update all the values with one call. I've got something like: //