Search documentation of snmpkit

# SnmpKit.SnmpLib.PDU.Encoder (snmpkit v1.3.17)

ASN.1 BER encoding functions for SNMP PDUs and messages.

This module handles the conversion of Elixir data structures to binary ASN.1 BER format for SNMP protocol communication.

# Summary

## Types

message()
pdu()

## Functions

encode(message)

Encodes an SNMP message to binary format (alias for encode_message/1).

encode_message(message)

Encodes an SNMP message to binary format.

encode_message(message, user)

Encodes an SNMP message with security user (SNMPv3).

encode_pdu(pdu)

Encodes a PDU to binary format.

encode_snmp_packet(message)

Alias for encode/1.

# Types

# message()

    @type message() :: SnmpKit.SnmpLib.PDU.Constants.message()

# pdu()

    @type pdu() :: SnmpKit.SnmpLib.PDU.Constants.pdu()

# Functions

# encode(message)

    @spec encode(message()) :: {:ok, binary()} | {:error, atom()}

Encodes an SNMP message to binary format (alias for encode_message/1).

# encode_message(message)

    @spec encode_message(message()) :: {:ok, binary()} | {:error, atom()}

Encodes an SNMP message to binary format.

# encode_message(message, user)

    @spec encode_message(message(), map() | nil) :: {:ok, binary()} | {:error, atom()}

Encodes an SNMP message with security user (SNMPv3).

# encode_pdu(pdu)

    @spec encode_pdu(pdu()) :: {:ok, binary()} | {:error, atom()}

Encodes a PDU to binary format.

# encode_snmp_packet(message)

    @spec encode_snmp_packet(message()) :: {:ok, binary()} | {:error, atom()}

Alias for encode/1.