1snmpa_network_interface_filtEerrl(a3n)g Module Definsintmipoan_network_interface_filter(3)
2
3
4

NAME

6       snmpa_network_interface_filter  -  Behaviour  module for the SNMP agent
7       network-interface filter.
8

DESCRIPTION

10       This module defines the behaviour of the agent network  interface  fil‐
11       ter.  A snmpa_network_interface_filter compliant module must export the
12       following functions:
13
14         * accept_recv/2
15
16         * accept_send/2
17
18         * accept_recv_pdu/3
19
20         * accept_send_pdu/2
21
22       The semantics of them and their exact signatures are explained below.
23
24       The purpose of the network interface filter is to allow  for  filtering
25       of  messages  (accept  or reject) receive and send. This is done on two
26       levels:
27
28         * The first level is at the transport entry / exit point, i.e.  imme‐
29           diately  after  the  receipt of the message before any message pro‐
30           cessing is done (accept_recv) and immediately  before  sending  the
31           message after all message processing is done (accept_send).
32
33         * The second level is at the MPD entry / exit point, i.e. immediately
34           after the basic message processing (accept_recv_pdu) /  immediately
35           before the basic message processing (accept_send_pdu).
36
37       Note  that  the  network interface filter is something which is used by
38       the network interface implementation provided by the  application  (sn‐
39       mpa_net_if). The default filter accepts all messages.
40
41       A  network interface filter can e.g. be used during testing or for load
42       regulation. If the intended use is load regulation, see also  req_limit
43       and the function register_notification_filter.
44
45       Legacy  network  interface  filter  modules  used arguments on the form
46       (IpAddr, PortNumber,...) instead of (Domain, Addr,  ...),  and  if  the
47       SNMP  agent  is run without changing the configuration to use transport
48       domains the network interface filter will still get the  old  arguments
49       and work as before.
50

DATA TYPES

52       port() = integer() > 0
53       pdu_type() = 'get-request' | 'get-next-request' | 'get-response' |
54                    'set-request' | trap | 'get-bulk-request' | 'inform-request' |
55                    report
56
57
58       See also the  data types in snmpa_conf.
59

EXPORTS

61       accept_recv(Domain, Addr) -> boolean()
62
63              Types:
64
65                 Domain = transportDomain()
66                 Addr = transportAddressWithPort()
67
68              Called  at the reception of a message (before any processing has
69              been done).
70
71              For the message to be discarded, the function must return false.
72
73       accept_send(Domain, Addr) -> boolean()
74
75              Types:
76
77                 Domain = transportDomain()
78                 Addr = transportAddressWithPort()
79
80              Called before the sending of a message (after all processing has
81              been done).
82
83              For the message to be discarded, the function must return false.
84
85       accept_recv_pdu(Domain, Addr, PduType) -> boolean()
86
87              Types:
88
89                 Domain = transportDomain()
90                 Addr = transportAddressWithPort()
91                 PduType = pdu_type()
92
93              Called  after  the basic message processing (MPD) has been done,
94              but before the pdu is handed over to the master-agent  for  pri‐
95              mary processing.
96
97              For the pdu to be discarded, the function must return false.
98
99       accept_send_pdu(Targets, PduType) -> Reply
100
101              Types:
102
103                 Targets = targets()
104                 targets() = [target()]
105                 target() = {Domain, Addr}
106                 Domain = transportDomain()
107                 Addr = transportAddressWithPort()
108                 PduType = pdu_type() > 0
109                 Reply = boolean() | NewTargets
110                 NewTargets = targets()
111
112              Called before the basic message processing (MPD) is done, when a
113              pdu has been received from the master-agent.
114
115              For the message to be discarded all together, the function  must
116              return false.
117
118              Note that it is possible for this function to filter out targets
119              (but not to add its own) by returning an  updated  Targets  list
120              (NewTargets).
121
122
123
124Ericsson AB                        snmp 5.15 snmpa_network_interface_filter(3)
Impressum