SnmpKit.MIB.Builtin (snmpkit v2.0.1)

Name/OID table and curated syntax metadata for the standard objects SnmpKit knows without loading any MIB file (SNMPv2-MIB, IF-MIB, IP-MIB, TCP-MIB, UDP-MIB, HOST-RESOURCES-MIB, BRIDGE-MIB, Q-BRIDGE-MIB, DOCS-IF-MIB and friends).

This is the single built-in name table: SnmpKit.SnmpMgr.MIB seeds its registry from name_to_oid/0 and SnmpKit.MIB.Registry resolves over it statically. The curated syntax/1 metadata is a stopgap for objects whose MIB has not been compiled.

Summary

Functions

Enumeration labels (%{value => label}) for a built-in object, or nil.

Everything the formatter needs for a built-in object: syntax base, textual convention, DISPLAY-HINT and enumerations, with the textual convention's hint and labels filled in from SnmpKit.MIB.Syntax.

Name to OID map for the built-in objects.

Curated syntax metadata (%{base, textual_convention, display_hint}) for a base name.

INDEX object names of a built-in conceptual row (ifEntry -> ["ifIndex"]), or nil.

Functions

enumerations(base_name)

@spec enumerations(String.t()) :: %{required(integer()) => String.t()} | nil

Enumeration labels (%{value => label}) for a built-in object, or nil.

meta(base_name)

@spec meta(String.t()) :: map()

Everything the formatter needs for a built-in object: syntax base, textual convention, DISPLAY-HINT and enumerations, with the textual convention's hint and labels filled in from SnmpKit.MIB.Syntax.

module_for(base_name)

name_to_oid()

@spec name_to_oid() :: %{required(String.t()) => [non_neg_integer()]}

Name to OID map for the built-in objects.

syntax(base_name)

@spec syntax(String.t()) :: map()

Curated syntax metadata (%{base, textual_convention, display_hint}) for a base name.

table_indexes(entry_name)

@spec table_indexes(String.t()) :: [String.t()] | nil

INDEX object names of a built-in conceptual row (ifEntry -> ["ifIndex"]), or nil.