snmp_view_based_acm_mib(3)
π¦ snmp_view_based_acm_mib β Erlang Module Definition β¨
okay bestie, pull up a chair, because we're about to talk about snmp_view_based_acm_mib(3) π (yes that's the manual page for this Erlang module, we just folded the manual name in like a lil name tag at a party π)
πΈ NAME πΈ
snmp_view_based_acm_mib β Instrumentation Functions for SNMP-VIEW-BASED-ACM-MIB π
β¨ DESCRIPTION β¨
So, the module snmp_view_based_acm_mib is the one that implements the instrumentation functions for the SNMP-VIEW-BASED-ACM-MIB, plus a whole bunch of functions for configuring the database. It's giving backstage pass energy β it's running the vibes behind the scenes π
The configuration files? Yeah, those are described in the SNMP User's Manual π (iykyk, go read it)
π DATA TYPES π
access_notify_view_name() :: snmp_framework_mib:admin_string().
NOTE: "The value of an instance of this object identifies the MIB view of the SNMP context to which this conceptual row authorizes access for notifications."
SnmpAdminString (SIZE(0..32)) π
access_read_view_name() :: snmp_framework_mib:admin_string().
NOTE: "The value of an instance of this object identifies the MIB view of the SNMP context to which this conceptual row authorizes read access."
SnmpAdminString (SIZE(0..32)) π
access_write_view_name() :: snmp_framework_mib:admin_string().
NOTE: "The value of an instance of this object identifies the MIB view of the SNMP context to which this conceptual row authorizes write access."
SnmpAdminString (SIZE(0..32)) βοΈ
context_match() :: exact | prefix.exactβ exact match of prefix and contextName π―prefixβ Only match to the prefix π±
INTEGER { exact (1), prefix (2) }
context_prefix() :: snmp_framework_mib:admin_string().
SnmpAdminString (SIZE(0..32)) π§
group_name() :: snmp_framework_mib:admin_string().
NOTE: "The name of the group to which this entry (e.g., the combination of securityModel and securityName) belongs."
SnmpAdminString (SIZE(1..32)) π―
internal_view_mask() :: null | [internal_view_mask_element()].internal_view_mask_element() :: 0 | 1.internal_view_type() :: 1 | 2.mibview() :: [{SubTree :: snmp:oid(), Mask :: internal_view_mask(), Type :: internal_view_type()}].security_name() :: snmp_framework_mib:admin_string().
NOTE: "The securityName for the principal, represented in a Security Model independent format."
SnmpAdminString (SIZE(1..32)) π
view_mask() :: [0 | 1].
The bit mask which, in combination with the corresponding instance of vacmViewTreeFamilySubtree, defines a family of view subtrees. πΈοΈ
A '1' indicates that an exact match must occur, a '0' indicates 'wild card' (any sub-identifier value matches). π
NOTE: Note that in the "external" format, each bit of each octet is represented by a "bit" in this list. That is, each octet "contains" 8 bits; so at most 8*16 = 128 bits in total.
OCTET STRING (SIZE (0..16)) π
view_name() :: snmp_framework_mib:admin_string().
NOTE: "The human readable name for a family of view subtrees."
SnmpAdminString (SIZE(1..32)) π·οΈ
view_type() :: included | excluded.
Does the corresponding instances of subtree and mask define a family of view subtrees which are included in or excluded from the MIB view? π€
INTEGER { included(1), excluded(2) }
π FUNCTIONS π
π add_access π
add_access(GroupName, Prefix, SecModel, SecLevel, Match, RV, WV,
NV) ->
{ok, Key} | {error, Reason}
when
GroupName :: group_name(),
Prefix :: context_prefix(),
SecModel :: snmp_framework_mib:security_model(),
SecLevel :: snmp_framework_mib:security_level(),
Match :: context_match(),
RV :: access_read_view_name(),
WV :: access_write_view_name(),
NV :: access_notify_view_name(),
Key :: term(),
Reason :: term().
Adds a access definition to the agent config. Equivalent to one vacmAccess-line in the vacm.conf file. π
π add_sec2group π
add_sec2group(SecModel, SecName, GroupName) ->
{ok, Key} | {error, Reason}
when
SecModel ::
snmp_framework_mib:security_model(),
SecName :: security_name(),
GroupName :: group_name(),
Key :: term(),
Reason :: term().
Adds a security to group definition to the agent config. Equivalent to one vacmSecurityToGroup-line in the vacm.conf file. π
π add_view_tree_fam π
add_view_tree_fam(ViewName, SubTree, Status, Mask) ->
{ok, Key} | {error, Reason}
when
ViewName :: view_name(),
SubTree :: snmp:oid(),
Status :: view_type(),
Mask :: null | view_mask(),
Key :: term(),
Reason :: term().
Adds a view tree family definition to the agent config. Equivalent to one vacmViewTreeFamily-line in the vacm.conf file. π³
π configure π
configure(ConfDir) -> snmp:void() when ConfDir :: string().
This function is called from the supervisor at system start-up. π
Inserts all data in the configuration files into the database and destroys all old rows with StorageType volatile. The rows created from the configuration file will have StorageType nonVolatile. ποΈβ‘οΈβ¨
All snmp counters are set to zero. 0οΈβ£
If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with the reason configuration_error. π
ConfDir is a string which points to the directory where the configuration files are found. π
The configuration file read is: vacm.conf.
π delete_access π
delete_access(Key) -> ok | {error, Reason}
when Key :: term(), Reason :: term().
Delete a access definition from the agent config. βοΈ
π delete_sec2group π
delete_sec2group(Key) -> ok | {error, Reason}
when Key :: term(), Reason :: term().
Delete a security to group definition from the agent config. βοΈ
π delete_view_tree_fam π
delete_view_tree_fam(Key) -> ok | {error, Reason}
when Key :: term(), Reason :: term().
Delete a view tree family definition from the agent config. βοΈ
π reconfigure π
reconfigure(ConfDir) -> snmp:void() when ConfDir :: string().
Inserts all data in the configuration files into the database and destroys all old data, including the rows with StorageType nonVolatile. The rows created from the configuration file will have StorageType nonVolatile. π₯
bestie this one is the aggressive one fr fr β it takes out everything old, nonVolatile rows included π
Thus, the data in the SNMP-VIEW-BASED-ACM-MIB, after this function has been called, is the data from the configuration files. πͺ
All snmp counters are set to zero. 0οΈβ£
If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with the reason configuration_error. π
ConfDir is a string which points to the directory where the configuration files are found. π
The configuration file read is: vacm.conf.
and that's the whole page, bestie!! π«Ά this was brought to you by Ericsson AB, snmp 5.20.5, on the snmp_view_based_acm_mib(3) manual page π slay, go configure those views, periodt ππΈ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms