SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-5
Managers Supporting UDP Only
decoding as well as packet transmission and receipt by using functions defined in 
snmpfsc and declared in the header file named snmpfsh.
•
All the sample managers use common utilities for some of their MIB handling 
activities.  Common utilities are a collection of functions that are part of the 
Manager Services library, but intended to be used only as examples for some of the 
MIB object handling operations your managers need to provide. In your own 
managers, you would replace the common utility calls with calls to functions you 
write yourself as needed to support your own specific MIB handling.
•
Several lines of code appear in the source code files to ensure that they support both 
Guardian and OSS environments.
Managers Supporting UDP Only
Figure 2-1 illustrates the logic flow of SNMPGT, which handles Get packets.
The logic flow of the other two UDP-only managers, SNMPTRAP and SNMPMON, is 
very similar, except those two managers use only one encoded-packet buffer and one 
packet structure.  SNMPTRAP only sends traps, and SNMPMON only receives packets.
Managers Supporting UDP and IPC
These managers perform activities related to packet encoding, decoding, and transport 
by using functions defined in snmpfsc. Figure 2-2 illustrates the logic flow that 
managers supporting UDP and IPC use. The main control block of these managers 
Figure 2-1. Logic Flow of Manager Supporting UDP Only
201
Declare two buffers, for 
encoded request and response
Declare two packet structures, for 
unencoded request and response
Parse invocation parametersCreate UDP socketInitialize request packet
Bind variable bindings 
to  request packet
BER-encode request packet 
into encoded-request buffer
Transmit encoded-request buffer
Receive response  
into encoded-response buffer
Decode response 
into response packet structure
Print request packet
Print response packet
Start
Stop










