snmpm_network_interface_filter.3erl - Man Page

Behaviour module for the SNMP manager network-interface filter.

Description

This module defines the behaviour of the manager network interface filter. A snmpm_network_interface_filter compliant module must export the following functions:

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

The purpose of the network interface filter is to allow for filtering of messages (accept or reject) receive and send. This is done on two levels:

Note that the network interface filter is something which is used by the network interface implementation provided by the application (snmpm_net_if and snmpm_net_if_mt). The default filter accepts all messages.

A network interface filter can e.g. be used during testing or for load regulation.

Legacy network interface filter modules used arguments on the form (IpAddr, PortNumber,...) instead of (Domain, Addr, ...), and if the SNMP manager is run without changing the configuration to use transport domains the network interface filter will still get the old arguments and work as before.

Data Types

port() = integer() > 0
pdu_type() = 'get-request' | 'get-next-request' | 'get-response' | 
             'set-request' | trap | 'get-bulk-request' | 'inform-request' | 
             report | trappdu

See also the  data types in snmpa_conf.

Exports

accept_recv(Domain, Addr) -> boolean()

Types:

Domain = transportDomain()
Addr = transportAddressWithPort()

Called at the reception of a message (before any processing has been done).

For the message to be rejected, the function must return false.

accept_send(Domain, Addr) -> boolean()

Types:

Domain = transportDomain()
Addr = transportAddressWithPort()

Called before the sending of a message (after all processing has been done).

For the message to be rejected, the function must return false.

accept_recv_pdu(Domain, Addr, PduType) -> boolean()

Types:

Domain = transportDomain()
Addr = transportAddressWithPort()
PduType = pdu_type()

Called after the basic message processing (MPD) has been done, but before the pdu is handed over to the server for primary processing.

For the pdu to be rejected, the function must return false.

accept_send_pdu(Domain, Addr, PduType) -> boolean()

Types:

Domain = transportDomain()
Addr = transportAddressWithPort()
PduType = pdu_type() > 0

Called before the basic message processing (MPD) is done, when a pdu has been received from the master-agent.

For the message to be rejected, the function must return false.

Info

snmp 5.9.1 Ericsson AB Erlang Module Definition