SnmpKit.SnmpLib.PDU.Constants (snmpkit v0.3.6)
Constants and type definitions for SNMP PDU operations.
This module contains all ASN.1 tags, error codes, type definitions, and utility functions used throughout the SNMP PDU system.
Summary
Functions
Converts an error status code to its atom representation.
Converts an error status atom to its numeric code.
Normalizes an SNMP type atom.
Types
@type error_status() :: 0..5
@type message() :: %{ version: snmp_version() | non_neg_integer(), community: binary(), pdu: pdu() }
@type oid() :: [non_neg_integer()] | binary()
@type pdu() :: %{ type: pdu_type(), request_id: non_neg_integer(), error_status: error_status(), error_index: non_neg_integer(), varbinds: [varbind()], non_repeaters: non_neg_integer(), max_repetitions: non_neg_integer() }
@type pdu_type() ::
:get_request
| :get_next_request
| :get_response
| :set_request
| :get_bulk_request
@type snmp_type() ::
:integer
| :octet_string
| :null
| :object_identifier
| :counter32
| :gauge32
| :timeticks
| :counter64
| :ip_address
| :opaque_type
| :no_such_object
| :no_such_instance
| :end_of_mib_view
@type snmp_value() :: any()
@type snmp_version() :: :v1 | :v2c | :v2 | :v3 | 0 | 1 | 3
@type varbind() :: {oid(), atom(), snmp_value()}
Functions
@spec error_status_to_atom(non_neg_integer()) :: atom()
Converts an error status code to its atom representation.
@spec error_status_to_code(atom()) :: non_neg_integer()
Converts an error status atom to its numeric code.
Normalizes an SNMP type atom.