SnmpKit.SnmpSim.Core.Server (snmpkit v0.6.6)

High-performance UDP server for SNMP request handling. Supports concurrent packet processing with minimal latency.

Summary

Functions

Returns a specification to start this module under a supervisor.

Get server statistics.

Update the device handler function.

Start an SNMP UDP server on the specified port.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_stats(server_pid)

Get server statistics.

set_device_handler(server_pid, handler)

Update the device handler function.

start_link(port, opts \\ [])

Start an SNMP UDP server on the specified port.

Options

  • :community - SNMP community string (default: "public")
  • :device_handler - Module or function to handle device requests
  • :socket_opts - Additional socket options

Examples

{:ok, server} = SnmpKit.SnmpSim.Core.Server.start_link(9001,
  community: "public",
  device_handler: &MyDevice.handle_request/2
)