read-only parameters with my Mib Browser. However, writing (set) does not work. I've put printf() statements in
my write callback function to see where it goes off the rails, but none print. This suggests that it's not even getting
to write callback function.
I have Wireshark running, and it sees the set command, and it records it as going to the right OID. But no response. There
are numerous retries by the browser before it gives up.
This is the Write Table definition for the parameter I'm focusing on:
Code: Select all
SNMPWRITEFUNC( excWGSwitch,
"1.3.6.1.4.1.30679.1.2.2.1.2.2.2.0",
ASN_typeString,
WriteFuncexcWGSwitch,
WRITE_COMMUNITY_MASK );
Code: Select all
int WriteFuncexcWGSwitch( snmp_typeString var, int bTest )
{
printf("WGCmd\r\n");
if ( bTest )
{/* Test the value here */
if ( !strlen(var) ) {
printf("Zero Len\r\n");
return SNMP_SET_FAIL;
}
if ( !isdigit(*var) || !isalpha(*(var+1)) ) {
printf("Bad Cmd: %s\r\n", var);
return SNMP_SET_FAIL;
}
}
else
{/* Set the value here */
xudpWGSwitchControl( (char*)var );
}
return SNMP_SET_OK;
}