SNMP Subagent Programmer's Guide
SNMP Subagent Programmer’s Guide—119728 2-1
2
Programming Tutorials
This section discusses the eight sample subagents that are packaged with the NonStop 
SNMP Subagent Toolkit:
•
Hello World sample program. This simple subagent displays a message whenever 
it receives a request from an SNMP manager. It also generates a trap when an 
SNMP manager alters the value of one of its MIB objects.
•
Nowaited Hello World program. This subagent enhances the Hello World 
program to perform other activities while it awaits input from an SNMP manager.
•
Fault-Tolerant Hello World program. This subagent enhances the Nowaited 
Hello World program to interact with several NonStop agents.
•
Static Directory program. This subagent illustrates how to manage a tabular MIB 
object whose entries never change.
•
Dynamic Directory program. This subagent enhances the Static Directory 
program to manage tables whose entries change over time.
•
Indexed Trap Generator program. This subagent demonstrates how to use 
indexed MIB objects in traps and manage tables with multivalued indexes.
•
System Time Manager. This subagent uses its own access functions to perform 
Get and Set operations on the system time.
•
Security Checker. This subagent enhances the Nowaited Hello World program to 
authenticate manager requests before processing them.
Sample Files
For each sample subagent, the following files can be found in the Install subvolume:
C source code The subagent source code. Source code file names end in c.  Refer 
to Section 4, “Writing Subagent Logic,” for reference information 
about encoding subagent logic in C language programs.
MIB 
definition
The input file for GDMOC, the MIB compiler. MIB definitions file 
names end in smi.  Refer to Section 3, “Writing and Compiling 
MIBs,” for reference information about encoding and compiling 
MIBs.
TACL routine A routine that creates an executable subagent from the subagent 
source code and MIB definition. TACL routine names end in m. 
Refer to Section 5, “Creating Executable Subagents,” for a 
description of the operations the routines perform.










