Sud g wrote:
> I am extending the agent(UCD 4.2.6) for a settable variable, i have
> written my own function write_writa, to be invoked when i set that
> particular variable, but it is not being invoked it is giving me the
> error: no such file or directory
> at the perror shown below
> case WRITA:
> *write_method = write_writa;
> perror("after call to write_writa function\n");
> return (unsigned char *) &long_ret;
> why it write_writa() is not invoked?
> i am struggling with it for long, suggest something.
It sounds like the last thing to have returned an errno before the call
to perror returned ENOENT. I doubt this has anything to do with your
The string you are passing to perror suggests a fundamental
misunderstanding about what's happening. When you execute
*write_method = write_writa;
you are not calling write_writa, rather you are assigning its address to
write_method. This address will be used by snmpd later to call
write_writa as many times as is required to complete an SNMPSET
operation. At the point you call perror, write_writa hasn't been called.
I suggest you avoid the use of perror for printing checkpoints.
I suggest you take a look at the snmp agent extension tutorial available
at the net-snmp website.
Without some idea of the contents of long_ret, or the implementation of
write_writa I doubt more constructive advice can be given.
Andrae Muys But can it generate *quantum* Haiku
<andrae.muys@...> error messages, in Latin, where each
Engineer line of the error message is a
Braintree Communications palindrome? -- Mike Vanier on perl