RFC1157 and/or RFC1905 should be studied carefully before using this module.
This module contains functions for encoding and decoding of
SNMP protocol data units (PDUs). In short, this module converts a
list of bytes to Erlang record representations and vice versa.
The record definitions can be found in the file
snmp/include/snmp_types.hrl
.
Encoding and decoding must be done explicitly when writing your own Net if process.
dec_message([byte()]) -> Message
Message = #message
Decodes a list of bytes into an SNMP Message.
dec_message_only([byte()]) -> Message
Message = #message
Decodes a list of bytes into an SNMP Message, but does not decode the data part of the Message. This means data is still a list of bytes, normally an encoded Pdu.
Pdu = #pdu
Decodes a list of bytes into an SNMP Pdu.
enc_message(Message) -> [byte()]
Message = #message
Encodes a message record to a list of bytes.
enc_message_only(Message) -> [byte()]
Message = #message
Message
is a record where the data
field is
assumed to be encoded (a list of bytes).
Pdu = #pdu
Encodes an SNMP Pdu into a list of bytes.