SnmpKit.SnmpLib.MIB.Utilities (snmpkit v0.6.3)
Direct port of Erlang snmpc_lib.erl utility functions to Elixir.
This is a 1:1 port of the utility functions from the official Erlang SNMP compiler from OTP lib/snmp/src/compile/snmpc_lib.erl
Original copyright: Ericsson AB 1996-2025 (Apache License 2.0)
Summary
Functions
Check if size constraint is allowed for given type (RFC 1902 compliance). Port of allow_size_rfc1902/1 from snmpc_lib.erl
Validate sub-identifier ranges. Port of check_sub_ids/3 from snmpc_lib.erl
Terminate compilation with error. Port of error/2 and error/3 from snmpc_lib.erl
Safe key lookup in list of tuples/maps. Port of key1search/2 and key1search/3 from snmpc_lib.erl
Generic lookup function with multiple criteria. Port of lookup/2 from snmpc_lib.erl
Validate and transform ASN.1 type definition. Port of make_ASN1type/1 from snmpc_lib.erl
Print error message with formatting. Port of print_error/2 and print_error/3 from snmpc_lib.erl
Determine if message should be printed based on verbosity. Port of printable/2 from snmpc_lib.erl
Register an OID entry in the OID table. Port of register_oid/4 from snmpc_lib.erl
Resolve symbolic OID references to numeric OIDs. Port of resolve_oids/1 from snmpc_lib.erl
Set directory path helper. Port of set_dir/2 from snmpc_lib.erl
Validate bit definitions for BITS syntax. Port of test_kibbles/2 from snmpc_lib.erl
Translate symbolic name to numeric OID. Port of tr_oid/2 from snmpc_lib.erl
Update MIB entries with resolved OIDs. Port of update_me_oids/3 from snmpc_lib.erl
Configurable verbose printing. Port of vprint/6 from snmpc_lib.erl
Validate verbosity level. Port of vvalidate/1 from snmpc_lib.erl
Types
@type oid() :: [integer()]
@type oid_status() :: :resolved | :unresolved
@type verbosity() :: :silent | :warning | :info | :debug
Functions
Check if size constraint is allowed for given type (RFC 1902 compliance). Port of allow_size_rfc1902/1 from snmpc_lib.erl
Validate sub-identifier ranges. Port of check_sub_ids/3 from snmpc_lib.erl
Terminate compilation with error. Port of error/2 and error/3 from snmpc_lib.erl
Safe key lookup in list of tuples/maps. Port of key1search/2 and key1search/3 from snmpc_lib.erl
Generic lookup function with multiple criteria. Port of lookup/2 from snmpc_lib.erl
Validate and transform ASN.1 type definition. Port of make_ASN1type/1 from snmpc_lib.erl
Print error message with formatting. Port of print_error/2 and print_error/3 from snmpc_lib.erl
Determine if message should be printed based on verbosity. Port of printable/2 from snmpc_lib.erl
Register an OID entry in the OID table. Port of register_oid/4 from snmpc_lib.erl
Resolve symbolic OID references to numeric OIDs. Port of resolve_oids/1 from snmpc_lib.erl
Set directory path helper. Port of set_dir/2 from snmpc_lib.erl
Validate bit definitions for BITS syntax. Port of test_kibbles/2 from snmpc_lib.erl
Translate symbolic name to numeric OID. Port of tr_oid/2 from snmpc_lib.erl
Update MIB entries with resolved OIDs. Port of update_me_oids/3 from snmpc_lib.erl
Configurable verbose printing. Port of vprint/6 from snmpc_lib.erl
Validate verbosity level. Port of vvalidate/1 from snmpc_lib.erl