SNMP Subagent Programmer's Guide

Fault-Tolerant Hello World Program
2-28 119728—SNMP Subagent Programmer’s Guide
Programming Tutorials
Figure 2-3. Logic Flow for Fault-Tolerant Hello World
mgmt_init_env()
mgmt_new_instance()
mgmt_read_nowait()
(Set up connections
for each agent
specified)
206
mgmt_poll()
(Process SNMP
request)
Stop
NO
AWAITIOX
(Detect I/O operation
completion)
Did I/O
operation
complete
?
Is input from
an agent
?
Did a
timeout occur
?
FILE_GETINFO_
(Determine why I/O did
not complete)
YES
Start
NO
Is input from
an agent
?
Mark agent
connection
invalid
Any living
agents
?
YES
NO
Identify
the agent
YES
Success
?
NO
YES
Do trap and
message
processing
YES
mgmt_read_nowait()
(Initiate nowait read
from agent)
NO
Success
?
YES
NO
NO
YES
NO
Print
message