aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/doc/src/snmpa_mib_data.xml
blob: 462112ac71c6d7380f126d83452adae0dbb8b747 (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
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2013</year><year>2013</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>snmpa_mib_data</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmpa_mib_data.xml</file>
  </header>

  <module>snmpa_mib_data</module>
  <modulesummary>Behaviour module for the SNMP agent mib-server 
  data module.</modulesummary>
  <description>
    <p>This module defines the behaviour of the SNMP agent mib-server 
    data module. A <c>snmpa_mib_data</c> compliant module 
    must export the following functions: </p>
    <list type="bulleted">
      <item>
        <p>new/1</p>
      </item>
      <item>
        <p>close/1</p>
      </item>
      <item>
        <p>sync/1</p>
      </item>
      <item>
        <p>load_mib/4</p>
      </item>
      <item>
        <p>unload_mib/4</p>
      </item>
      <item>
        <p>lookup/2</p>
      </item>
      <item>
        <p>next/3</p>
      </item>
      <item>
        <p>register_subagent/3</p>
      </item>
      <item>
        <p>unregister_subagent/2</p>
      </item>
      <item>
        <p>which_mib/2</p>
      </item>
      <item>
        <p>which_mibs/1</p>
      </item>
      <item>
        <p>whereis_mib/2</p>
      </item>
      <item>
        <p>backup/2</p>
      </item>
      <item>
        <p>dump/2</p>
      </item>
      <item>
        <p>info/1,2</p>
      </item>
      <item>
        <p>code_change/2</p>
      </item>
    </list>
    <p>The semantics of them and their exact signatures are explained
    below. </p>

    <marker id="handle_error"></marker>
  </description>
  <funcs>
    <func>
      <name>new(Storage) -> State</name>
      <fsummary>Create new (mib-storage) instance</fsummary>
      <type>
        <v>Storage = mib_storage()</v>
        <v>State = term()</v>
      </type>
      <desc>
        <p>Create a new mib-storage instance. </p>

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

    <func>
      <name>close(State) -> void()</name>
      <fsummary>Close the mib-storage</fsummary>
      <type>
        <v>State = term()</v>
      </type>
      <desc>
        <p>Close the mib-storage.</p>

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

    <func>
      <name>sync(State) -> void()</name>
      <fsummary>Synchronize to disc</fsummary>
      <type>
        <v>State = term()</v>
      </type>
      <desc>
        <p>Synchronize (write to disc, if possible) the data to disc. 
	This depends on the <c>mib_storage</c> option, and will only have 
	an effect if the mib-storage option has an actual disc component 
	(such as dets, or ets with a file). </p>

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

    <func>
      <name>load_mib(State, Filename, MeOverride, TeOverride) -> {ok, NewState} | {error, Reason}</name>
      <fsummary>Load a mib into the mib-server</fsummary>
      <type>
        <v>State = NewState = term()</v>
        <v>Filename = filename()</v>
        <v>MeOverride = boolean()</v>
        <v>TeOverride = boolean()</v>
        <v>Reason = already_loaded | term()</v>
      </type>
      <desc>
        <p>Load the mib specified by the <c>Filename</c> argument 
	into the mib-server. 
	The <c>MeOverride</c> and <c>TeOverride</c> arguments 
	specifies how the mib-server shall handle duplicate mib- and trap-
	entries. </p>

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

    <func>
      <name>unload_mib(State, Filename) -> {ok, NewState} | {error, Reason}</name>
      <fsummary>Unload mib from the mib-server</fsummary>
      <type>
        <v>State = NewState = term()</v>
        <v>Filename = filename()</v>
        <v>Reason = not_loaded | term()</v>
      </type>
      <desc>
        <p>Unload the mib specified by the <c>Filename</c> argument 
	from the mib-server. </p>

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

    <func>
      <name>lookup(State, Oid) -> Reply</name>
      <fsummary>Find the mib-entry corresponding to the Oid</fsummary>
      <type>
        <v>State = term()</v>
        <v>Reply = {variable, ME} | {table_column, ME, TEOid} | {subagent, SAPid, SAOid} | [false, Reason}</v>
        <v>Oid = TEOid = SAOid = oid()</v>
        <v>SAPid = pid()</v>
        <v>ME = me()</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Find the mib-entry corresponding to the Oid. 
	If it is a variable, the Oid must be 
	<Oid for var>.0 
	and if it is a table, Oid must be 
	<table>.<entry>.<col>.<any>.</p>
	<!-- FIX -->
      </desc>
    </func>
  </funcs>
  
</erlref>