aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/doc/src/snmpm_network_interface.xml
blob: e4a66ceef2bd7722a11f37c623e323079cd17270 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2004</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    
    </legalnotice>

    <title>snmpm_network_interface</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmpm_network_interface.xml</file>
  </header>
  <module since="">snmpm_network_interface</module>
  <modulesummary>Behaviour module for the SNMP manager network interface.</modulesummary>
  <description>
    <p>This module defines the behaviour of the manager network
      interface. A <c>snmpm_network_interface</c> compliant module 
      must export the following functions: </p>
    <list type="bulleted">
      <item>
        <p><seealso marker="#start_link">start_link/2</seealso></p>
      </item>
      <item>
        <p><seealso marker="#stop">stop/1</seealso></p>
      </item>
      <item>
        <p><seealso marker="#send_pdu">send_pdu/7</seealso></p>
      </item>
      <item>
        <p><seealso marker="#inform_response">inform_response/4</seealso></p>
      </item>
      <item>
        <p><seealso marker="#note_store">note_store/2</seealso></p>
      </item>
      <item>
        <p><seealso marker="#info">info/1</seealso></p>
      </item>
      <item>
        <p><seealso marker="#get_log_type">get_log_type/1</seealso></p>
      </item>
      <item>
        <p><seealso marker="#set_log_type">set_log_type/2</seealso></p>
      </item>
      <item>
        <p><seealso marker="#verbosity">verbosity/2</seealso></p>
      </item>
    </list>
    <p>The semantics of them and their exact signatures are explained
      below. </p>

    <p>Legacy API function <c>send_pdu/7</c> that has got separate
      <c>IpAddr</c> and <c>PortNumber</c> arguments still works as before
      for backwards compatibility reasons.</p>

    <marker id="start_link"></marker>
  </description>

  <funcs>
    <func>
      <name since="">start_link(Server, NoteStore) -> {ok, Pid} | {error, Reason}</name>
      <fsummary>Start-link the network interface process</fsummary>
      <type>
        <v>Server    = pid()</v>
        <v>NoteStore = pid()</v>
      </type>
      <desc>
        <p>Start-link the network interface process.</p>
        <p><c>Server</c> is the pid of the managing process.</p>
        <p><c>NoteStore</c> is the pid of the note-store process.</p>

        <marker id="stop"></marker>
      </desc>
    </func>

    <func>
      <name since="">stop(Pid) -> void()</name>
      <fsummary>Stop the network interface process</fsummary>
      <type>
        <v>Pid = pid()</v>
      </type>
      <desc>
        <p>Stop the network interface process.</p>

        <marker id="send_pdu"></marker>
      </desc>
    </func>

    <func>
      <name since="">send_pdu(Pid, Pdu, Vsn, MsgData, Domain, Addr, ExtraInfo) -> void()</name>
      <fsummary>Request the network interface process to send this pdu</fsummary>
      <type>
        <v>Pid = pid()</v>
        <v>Pdu = pdu()</v>
        <v>Vsn = 'version-1' | 'version-2' | 'version-3'</v>
        <v>MsgData = term()</v>
        <v>Domain = transportDomainUdpIpv4 | transportDomainUdpIpv6</v>
	<v>Addr = {<seealso marker="kernel:inet#type-ip_address">inet:ip_address(), inet:port_number()</seealso>} </v>
        <v>ExtraInfo = term()</v>
      </type>
      <desc>
        <p>Request the network interface process (<c>Pid</c>) to send
          this pdu (<c>Pdu</c>).</p>
        <p><c>ExtraInfo</c> is some opaque data that is passed to the
          net-if process. It originates from the <c>ExtraInfo</c>
          parameter in the calls to the 
          <seealso marker="snmpm#sync_get">synchronous get-request</seealso>, 
          <seealso marker="snmpm#async_get">asynchronous get-request</seealso>,
          <seealso marker="snmpm#sync_get_next">synchronous get-next-request</seealso>, 
          <seealso marker="snmpm#async_get_next">asynchronous get-next-request</seealso>,
          <seealso marker="snmpm#sync_set">synchronous set-request</seealso>
          and 
          <seealso marker="snmpm#async_set">asynchronous set-request</seealso>
          functions. 
          Whether the net-if process chooses
          to use this is implementation dependent. The net-if process
          included in this application ignores it. </p>

        <marker id="inform_response"></marker>
      </desc>
    </func>

    <func>
      <name since="">inform_response(Pid, Ref, Addr, Port) -> void()</name>
      <fsummary>Send the inform-request ack</fsummary>
      <type>
        <v>Pid = pid()</v>
        <v>Ref = term()</v>
        <v>Addr = address()</v>
        <v>Port = integer()</v>
      </type>
      <desc>
        <p>Instruct the network interface process to send the response
          (acknowledgment) to an inform-request.</p>
        <p><c>Ref</c> is something that can be used to identify the 
          inform-request, e.g. request-id of the inform-request.</p>
        <p><c>Addr</c> and <c>Port</c> identifies the agent, from 
          which the inform-request originated.</p>

        <marker id="note_store"></marker>
      </desc>
    </func>

    <func>
      <name since="">note_store(Pid, NoteStore) -> void()</name>
      <fsummary>Change the verbosity of the network interface process</fsummary>
      <type>
        <v>Pid       = pid()</v>
        <v>NoteStore = pid()</v>
      </type>
      <desc>
        <p>Change the pid of the note-store process.
          This is used when the server re-starts the note_store 
          (e.g. after a crach).</p>

        <marker id="info"></marker>
      </desc>
    </func>

    <func>
      <name since="">info(Pid) -> [{Key, Value}]</name>
      <fsummary>Return information about the running network interface process</fsummary>
      <type>
        <v>Pid = pid()</v>
      </type>
      <desc>
        <p>The info returned is basically up to the implementer to decide. 
          The implementation provided by this application provides info about 
          memory allocation and various socket information.</p>
        <p>The info returned by this function is returned together with other
          info collected by the manager when the
          <seealso marker="snmpm#info">info</seealso> function is called 
          (tagged with the key <c>net_if</c>).</p>

        <marker id="verbosity"></marker>
      </desc>
    </func>

    <func>
      <name since="">verbosity(Pid, Verbosity) -> void()</name>
      <fsummary>Change the verbosity of the network interface process</fsummary>
      <type>
        <v>Pid       = pid()</v>
        <v>Verbosity = verbosity()</v>
      </type>
      <desc>
        <p>Change the verbosity of the network interface process.</p>

        <marker id="get_log_type"></marker>
      </desc>
    </func>

    <func>
      <name since="">get_log_type(Pid) -> {ok, LogType} | {error, Reason}</name>
      <fsummary>Get the Audit Trail Log type</fsummary>
      <type>
        <v>Pid     = pid()</v>
        <v>LogType = atl_type()</v>
        <v>Reason  = term()</v>
      </type>
      <desc>
        <p>The Audit Trail Log is managed by the network interface process.
          So, it is this process that has to return the actual log-type. </p>
<!--
        <p>See
          <seealso marker="snmpm#get_log_type">get_log_type</seealso>
          for more info. </p>
-->

        <marker id="set_log_type"></marker>
      </desc>
    </func>

    <func>
      <name since="">set_log_type(Pid, NewType) -> {ok, OldType} | {error, Reason}</name>
      <fsummary>Change the Audit Trail Log type</fsummary>
      <type>
        <v>Pid     = pid()</v>
        <v>NewType = OldType = atl_type()</v>
        <v>Reason  = term()</v>
      </type>
      <desc>
        <p>The Audit Trail Log is managed by the network interface process.
          So, it is this process that has to do the actual changing of the
          type. </p>
        <p>See
          <seealso marker="snmpm#set_log_type">set_log_type</seealso>
          for more info. </p>
      </desc>
    </func>

  </funcs>

  
</erlref>