1snmpm_network_interface(3) Erlang Module Definition snmpm_network_interface(3)
2
3
4

NAME

6       snmpm_network_interface - Behaviour module for the SNMP manager network
7       interface.
8

DESCRIPTION

10       This module defines the behaviour of the manager network  interface.  A
11       snmpm_network_interface  compliant  module  must  export  the following
12       functions:
13
14         * start_link/2
15
16         * stop/1
17
18         * send_pdu/7
19
20         * inform_response/4
21
22         * note_store/2
23
24         * info/1
25
26         * get_log_type/1
27
28         * set_log_type/2
29
30         * verbosity/2
31
32       The semantics of them and their exact signatures are explained below.
33
34       Legacy API function send_pdu/7 that has got separate IpAddr  and  Port‐
35       Number arguments still works as before for backwards compatibility rea‐
36       sons.
37

EXPORTS

39       start_link(Server, NoteStore) -> {ok, Pid} | {error, Reason}
40
41              Types:
42
43                 Server = pid()
44                 NoteStore = pid()
45
46              Start-link the network interface process.
47
48              Server is the pid of the managing process.
49
50              NoteStore is the pid of the note-store process.
51
52       stop(Pid) -> void()
53
54              Types:
55
56                 Pid = pid()
57
58              Stop the network interface process.
59
60       send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo) -> void()
61
62              Types:
63
64                 Pid = pid()
65                 Pdu = pdu()
66                 Vsn = 'version-1' | 'version-2' | 'version-3'
67                 MsgData = term()
68                 Domain = transportDomainUdpIpv4 | transportDomainUdpIpv6
69                 Addr = {inet:ip_address(), inet:port_number()}
70                 ExtraInfo = term()
71
72              Request the network interface process (Pid)  to  send  this  pdu
73              (Pdu).
74
75              ExtraInfo  is  some  opaque  data  that  is passed to the net-if
76              process. It originates from the ExtraInfo parameter in the calls
77              to  the  synchronous get-request, asynchronous get-request, syn‐
78              chronous get-next-request, asynchronous  get-next-request,  syn‐
79              chronous  set-request  and  asynchronous  set-request functions.
80              Whether the net-if process chooses to use this is implementation
81              dependent.  The  net-if  process  included  in  this application
82              ignores it.
83
84       inform_response(Pid, Ref, Addr, Port) -> void()
85
86              Types:
87
88                 Pid = pid()
89                 Ref = term()
90                 Addr = address()
91                 Port = integer()
92
93              Instruct the network interface  process  to  send  the  response
94              (acknowledgment) to an inform-request.
95
96              Ref  is  something  that  can  be  used  to identify the inform-
97              request, e.g. request-id of the inform-request.
98
99              Addr and Port identifies  the  agent,  from  which  the  inform-
100              request originated.
101
102       note_store(Pid, NoteStore) -> void()
103
104              Types:
105
106                 Pid = pid()
107                 NoteStore = pid()
108
109              Change  the pid of the note-store process. This is used when the
110              server re-starts the note_store (e.g. after a crach).
111
112       info(Pid) -> [{Key, Value}]
113
114              Types:
115
116                 Pid = pid()
117
118              The info returned is basically up to the implementer to  decide.
119              The  implementation  provided  by this application provides info
120              about memory allocation and various socket information.
121
122              The info returned by this function  is  returned  together  with
123              other  info  collected  by the manager when the info function is
124              called (tagged with the key net_if).
125
126       verbosity(Pid, Verbosity) -> void()
127
128              Types:
129
130                 Pid = pid()
131                 Verbosity = verbosity()
132
133              Change the verbosity of the network interface process.
134
135       get_log_type(Pid) -> {ok, LogType} | {error, Reason}
136
137              Types:
138
139                 Pid = pid()
140                 LogType = atl_type()
141                 Reason = term()
142
143              The Audit Trail Log is managed by the network interface process.
144              So, it is this process that has to return the actual log-type.
145
146       set_log_type(Pid, NewType) -> {ok, OldType} | {error, Reason}
147
148              Types:
149
150                 Pid = pid()
151                 NewType = OldType = atl_type()
152                 Reason = term()
153
154              The Audit Trail Log is managed by the network interface process.
155              So, it is this process that has to do the actual changing of the
156              type.
157
158              See set_log_type for more info.
159
160
161
162Ericsson AB                        snmp 5.8         snmpm_network_interface(3)
Impressum