SNMP Manager Programmer's Guide
Introduction to Manager Services
SNMP Manager Programmer’s Guide–134249
1-16
Defining Manager Logic
Here is some additional information about the logic components highlighted in 
Figure 1-11:
Library 
header files 
You always include seven library header files. They contain the 
definitions of structures and prototypes of functions the library 
uses to process packets.  Section 3 describes the header files.
Packet 
structure 
declarations
You declare library structures needed by library functions, such 
as SNMP_PKT_T, the structure for unencoded packet 
information. Section 3 provides information on important data 
structures as well as on general-purpose data types and defines 
available for your use. 
User interface 
logic
You write the logic for accepting user input or arguments 
describing resource management requests.
MIB object 
handling 
You write the logic for resolving resource descriptions into 
representations your manager needs to build packets. The MIB 
compiler, described in Section 4, provides some assistance in this 
area, primarily for managers that perform MIB browsing.
Packet 
initialization
You use the library function SNMP_Create_Request() to 
initialize request packets and SNMP_Create_Trap() to initialize 
trap packets. Section 5 describes these functions in detail.
Binding 
variable 
bindings
Associating variable bindings with packets is a process known as 
binding.  You bind variable bindings to Get and GetNext request 
packets using the library function SNMP_Bind_Null(). You bind 
variable bindings to Set or Trap packets using the library function 
that supports MIB variables of specific SNMP types. For 
example, you use SNMP_Bind_Integer() to bind variable 
bindings for MIB objects of type INTEGER. Section 5 describes 
all the binding functions.
Setting up 
buffer for 
encoded 
packet
Before encoding a request or trap packet for transmission to an 
agent or manager, respectively, you initialize a buffer for holding 
the encoded packet.  Section 6 describes the library functions, 
such as EBuffer_Setup(), that are used to set up and manage 
encoded-packet buffers.
Encoding 
packet
You encode the packet into the encoded-packet buffer in a format 
that can be interpreted by the target agent or manager. The 
library function SNMP_Encode_Packet encodes the packet using 
BER encoding, whereas tdm_SNMP_Encode_Packet() can be 
used to either BER-encode or IPC-encode the packet.  Section 6 
describes the two packet encoding functions.
Transmitting 
and receiving 
packet
When communicating with NonStop agents and managers and 
sending and receiving IPC-encoded packets, you use file system 
calls. When sending and receiving BER-encoded packets, you 
use calls supporting the transport protocol by which the target 
entity can be addressed.  Section 7 provides some information on 
this topic.










