20132013 Ericsson AB. All Rights Reserved. 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. snmpa_mib_data snmpa_mib_data.xml
snmpa_mib_data Behaviour module for the SNMP agent mib-server data module.

This module defines the behaviour of the SNMP agent mib-server data module. A snmpa_mib_data compliant module must export the following functions:

new/1

close/1

sync/1

load_mib/4

unload_mib/4

lookup/2

next/3

register_subagent/3

unregister_subagent/2

which_mib/2

which_mibs/1

whereis_mib/2

backup/2

dump/2

info/1,2

code_change/2

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

new(Storage) -> State Create new (mib-storage) instance Storage = mib_storage() State = term()

Create a new mib-storage instance.

close(State) -> void() Close the mib-storage State = term()

Close the mib-storage.

sync(State) -> void() Synchronize to disc State = term()

Synchronize (write to disc, if possible) the data to disc. This depends on the mib_storage 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).

load_mib(State, Filename, MeOverride, TeOverride) -> {ok, NewState} | {error, Reason} Load a mib into the mib-server State = NewState = term() Filename = filename() MeOverride = boolean() TeOverride = boolean() Reason = already_loaded | term()

Load the mib specified by the Filename argument into the mib-server. The MeOverride and TeOverride arguments specifies how the mib-server shall handle duplicate mib- and trap- entries.

unload_mib(State, Filename) -> {ok, NewState} | {error, Reason} Unload mib from the mib-server State = NewState = term() Filename = filename() Reason = not_loaded | term()

Unload the mib specified by the Filename argument from the mib-server.

lookup(State, Oid) -> Reply Find the mib-entry corresponding to the Oid State = term() Reply = {variable, ME} | {table_column, ME, TEOid} | {subagent, SAPid, SAOid} | [false, Reason} Oid = TEOid = SAOid = oid() SAPid = pid() ME = me() Reason = term()

Find the mib-entry corresponding to the Oid. If it is a variable, the Oid must be .0 and if it is a table, Oid must be ....