snmpa_mib_storage(3)

NAME
snmpa_mib_storage - Behaviour module for the SNMP agent mib storage.

DESCRIPTION

This module defines the behaviour of the SNMP agent mib storage.

The mib storage is used by the agent to store internal mib- related information. The mib storage module is used by several entities, not just the mib-server.

A snmpa_mib_storage compliant module must export the following functions:

    • open/5

    • close/1

    • read/2

    • write/2

    • delete/1

    • delete/2

    • match_object/2

    • match_delete/2

    • tab2list/1

    • info/1

    • info/2

    • sync/1

    • backup/2

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

DATA TYPES

mib_storage_fields() :: [atom()].
mib_storage_table_id() :: term().
mib_storage_table_type() :: set | bag.

CALLBACKS

backup(TabId, Dir)

    Perform a backup of the mib-storage table.

    What this means, if anything, is implementation dependent.
close(TabId)

    Close the mib-storage table.
delete(TabId)

    Delete an entire mib-storage table.
delete(TabId, Key)

    Delete a record from the mib-storage table.
info(TabId)

    Retrieve implementation dependent mib-storage table information.
match_delete(TabId, Pattern)

    Search the mib-storage table for record that match the specified pattern and then delete them. The records deleted are also returned.
match_object(TabId, Pattern)

    Search the mib-storage table for record that match the specified pattern.
open(Name, RecName, Fields, Type, Options)

    Create or open a mib storage table.

    Note that the RecordName and Fields arguments my not be used in all implementations (they are actually only needed for mnesia-based implementations).

    Note also that the Options argument comes from the options config option of the mib-storage config option, and is passed on as is.
read(TabId, Key)

    Read a record from the mib-storage table.
sync(TabId)

    Synchronize the mib-storage table.

    What this means, if anything, is implementation dependent.
tab2list(TabId)

    Return all records in the mib-storage table in the form of a list.
write(TabId, Record)

    Write a record to the mib-storage table.