SNMP Manager Programmer's Guide
SNMP Manager Programmer’s Guide–134249
6-1
6
Encoding and Decoding Packets
Before you transmit an SNMP request or trap packet, it needs to be encoded into a 
format that can be interpreted by the receiving entity.  Manager Services supports two 
encoding formats:
•
BER (Basic Encoding Rules) encoding. BER encoding is a standard way to encode 
ASN.1 information as octet strings. BER-encoded packets can be transmitted over 
any transport protocol that the receiving entity supports. All agents and managers 
are able to interpret information encoded using BER encoding.
•
IPC (Interprocess Communication) encoding. IPC encoding is a way to encode 
information so that it can be interpreted by NonStop Kernel processes. You can use 
IPC encoding for requests you send to NonStop agents. IPC encoding provides the 
best encoding/decoding performance on NonStop Kernel systems.
You use a Manager Services function to BER-encode or IPC-encode a request or trap 
packet from a structure of type SNMP_PKT_T into an EBUFFER_T buffer.  When you 
receive a response or trap packet, you receive it into an EBUFFER_T buffer and use a 
Manager Services function to decode the buffer contents into an SNMP_PKT_T 
structure so you can interpret it. 
This section summarizes the attributes of buffers described by the structure 
EBUFFER_T, then provides an overview of Manager Services functions for 
manipulating them, both in the context of packet encoding and decoding and in general. 
Finally, this section describes the Manager Services buffer management and encoding 
and decoding functions: 
Functions for managing EBUFFER_T 
buffers
EBufferClean()
EBufferClone()
EBufferInitialize()
EBufferNext()
EBufferPreLoad()
EBufferRemaining()
EBufferReset()
EBufferSetup()
EBufferStart()
EBufferUsed()
SNMP_memory_alloc()
Functions for encoding packets SNMP_Encode_Packet()
tdm_SNMP_Encode_Packet()
Function for decoding packets SNMP_Decode_Packet_WER()










