Packages

A comprehensive SNMP toolkit for Elixir featuring a unified API, pure Elixir implementation, and powerful device simulation. Perfect for network monitoring, testing, and development with support for SNMP operations, MIB management, and realistic device simulation.

Current section

Files

Jump to
snmpkit lib snmpkit snmp_sim pdu_helper.ex
Raw

lib/snmpkit/snmp_sim/pdu_helper.ex

defmodule SnmpKit.SnmpSim.PDUHelper do
@moduledoc """
Provides utility functions for PDU manipulation.
"""
@doc """
Converts a PDU version atom (e.g., :v1, :v2c) to its integer representation.
Defaults to 2 (for SNMPv2c) if the atom is not :v1.
"""
def pdu_version_to_int(:v1), do: 0
def pdu_version_to_int(_version_atom), do: 1
end