snmpa_mib_storage(3erl)
π snmpa_mib_storage π
This is the snmpa_mib_storage(3erl) page β Erlang module definition, bestie. Itβs the behaviour module for the SNMP agent mib storage. Come get the tea ββ¨
πΈ NAME πΈ
snmpa_mib_storage β Behaviour module for the SNMP agent mib storage.
π¦ DESCRIPTION π¦
Okay so this module defines the behaviour of the SNMP agent mib storage. No cap.
The mib storage is what the agent uses to store internal mib-related information. The mib storage module is used by several entities β not just the mib-server, bestie. Itβs giving main character energy across the agent π
A snmpa_mib_storage compliant module must export these functions:
open/5close/1read/2write/2delete/1delete/2match_object/2match_delete/2tab2list/1info/1sync/1backup/2
The semantics of them and their exact signatures are explained below. Periodt π
π CALLBACK FUNCTIONS π
The source says: The following functions must be exported from a mib-server data callback module: Then it rolls straight into EXPORTS. Keeping that exact section order, bestie π«Ά
π EXPORTS π
π open/5
Module:open(Name, RecordName, Fields, Type, Options) -> {ok, TabId} | {error, Reason}
Types:
Name = atom()RecordName = atom()Fields = [atom()]Type = set | bag()Options = list()TabId = term()Reason = term()
Create or open a mib storage table. Slay.
Heads up: theRecordNameandFieldsarguments might not be used in all implementations β they're actually only needed for mnesia-based implementations. No shade, just facts π
Also note that the Options argument comes from the options config option of the mib-storage config option, and is passed on as is. Iconic config pipeline behavior.
π§ close/1
Module:close(TabId) -> void()
Types:
State = term()
Close the mib-storage table. (Yes, the type block says State = term() while the signature says TabId β thatβs literally what the page has, bestie π Iβm not fixing it.)
π¦ read/2
Module:read(TabId, Key) -> false | {value, Record}
Types:
TabId = term()Key = term()Record = tuple()
Read a record from the mib-storage table. Lowkey straightforward π
π write/2
Module:write(TabId, Record) -> ok | {error, Reason}
Types:
TabId = term()Record = tuple()Reason = term()
Write a record to the mib-storage table. Ate.
π delete/1
Module:delete(TabId) -> void()
Types:
TabId = term()
Delete an entire mib-storage table. Whole table? Gone. Periodt.
π«Ά delete/2
Module:delete(TabId, Key) -> ok | {error, Reason}
Types:
TabId = term()Key = term()Reason = term()
Delete a record from the mib-storage table. Just one, bestie.
π match_object/2
Module:match_object(TabId, Pattern) -> Recs | {error, Reason}
Types:
TabId = term()Pattern = match_pattern()Recs = [tuple()]Reason = term()
Search the mib-storage table for records that match the specified pattern. Vibe check: pattern in, matching records out β¨
π₯ match_delete/2
Module:match_delete(TabId, Pattern) -> Recs | {error, Reason}
Types:
TabId = term()Pattern = match_pattern()Recs = [tuple()]Reason = term()
Search the mib-storage table for records that match the specified pattern, then delete them. The records deleted are also returned. So itβs find, delete, and show receipts β iconic.
πΈ tab2list/1
Module:tab2list(TabId) -> Recs
Types:
TabId = term()Recs = [tuple()]
Return all records in the mib-storage table in the form of a list. The whole table, served on a list platter π
π info/1
Module:info(TabId) -> {ok, Info} | {error, Reason}
Types:
TabId = term()Info = term()Reason = term()
Retrieve implementation dependent mib-storage table information. Iykyk β what βinfoβ means depends on the implementation.
π sync/1
Module:sync(TabId) -> void()
Types:
TabId = term()
Synchronize the mib-storage table. What this means, if anything, is implementation dependent. No cap.
β backup/2
Module:backup(TabId, BackupDir) -> ok | {error, Reason}
Types:
TabId = term()BackupDir = string()Reason = term()
Perform a backup of the mib-storage table. What this means, if anything, is implementation dependent. Backup vibes: implementationβs choice π
Sign-off π: Ericsson AB made this, the version is snmp 5.13.5, the page is snmpa_mib_storage(3erl), and the footer date slot is not present in the original β so no fake date from me, bestie. Thatβs the source/version/date sign-off energy, periodt.
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms