SNMP Subagent Programmer's Guide
Management Functions
4-24 119728—SNMP Subagent Programmer’s Guide
Writing Subagent Logic
If a subagent sends a trap at exactly the same time the NonStop agent receives a request
to process, the NonStop agent rejects the request with a noSuchName error.
Example
The following example is taken from the Hello World sample program. This program
generates a trap whenever a manager changes the value of one of its MIB objects.
Because the trap is named helloFreqChange in the MIB definition, GDMOC assigns the
name TRAP_helloFreqChange to the notification structure it generates for the trap:
if (last_freq != helloPrintFreq)
{
last_freq = helloPrintFreq;
(void)mgmt_trap(mgmt_env,&TRAP_helloFreqChange);
}