snmpm_user

Behaviour module for the SNMP manager user.

This module defines the behaviour of the manager user.
A snmpm_user compliant module
must export the following functions:

handle_error/3

handle_agent/4

handle_pdu/4

handle_trap/3

handle_inform/3

handle_report/3

The semantics of them and their exact signatures are explained
below.

Note that if an agent is registered using the old, no longer
documented, functions (using Addr and Port), the old variant of the
callback functions, handle_pdu, handle_trap, handle_inform and
handle_report, will be called.

Functions

handle_error(ReqId, Reason, UserData) -> Reply

This function is called when the manager needs to
communicate an "asynchronous" error, to the user:
e.g. failure to send an asynchronous message (i.e. encoding
error), a received message was discarded due to security
error, the manager failed to generate a response message to
a received inform-request, or when receiving an unexpected
PDU from an agent (could be an expired async request).

If ReqId is less then 0, it means that this
information was not available to the manager (that info was
never retrieved before the message was discarded).