Search documentation of snmpkit

# SnmpKit.SnmpSim.MIB.SharedProfiles (snmpkit v1.3.17)

Memory-efficient shared OID profiles using ETS tables. Reduces memory from 1GB to ~10MB for 10K devices by sharing profile data.

# Summary

## Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

clear_all_profiles()

Clear all profiles (useful for testing).

compare_oids_lexicographically(oid1, oid2)

Compare OIDs lexicographically (useful for testing).

get_all_oids(device_type)

Get all OIDs for a device type.

get_bulk_oids(device_type, start_oid, max_repetitions)

Get multiple OIDs for GETBULK operations.

get_memory_stats()

Get memory usage statistics for the shared profiles.

get_next_oid(device_type, oid)

Get the next OID in lexicographic order for GETNEXT operations.

get_oid_value(device_type, oid, device_state)

Get a value for a specific OID with device-specific state applied.

init_profiles()

Initialize shared profiles for device types.

list_profiles()

List all available device type profiles.

load_mib_profile(device_type, mib_files, opts \\ [])

Load a MIB-based profile for a device type.

load_walk_profile(device_type, walk_file, opts \\ [])

Load a walk file-based profile with enhanced behaviors.

start_link(opts \\ [])

Start the shared profiles manager.

store_profile(device_type, profile_data, behavior_data)

Store profile data directly (useful for testing).

# Functions

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# clear_all_profiles()

Clear all profiles (useful for testing).

# compare_oids_lexicographically(oid1, oid2)

Compare OIDs lexicographically (useful for testing).

# get_all_oids(device_type)

Get all OIDs for a device type.

# get_bulk_oids(device_type, start_oid, max_repetitions)

Get multiple OIDs for GETBULK operations.

# get_memory_stats()

Get memory usage statistics for the shared profiles.

# get_next_oid(device_type, oid)

Get the next OID in lexicographic order for GETNEXT operations.

# get_oid_value(device_type, oid, device_state)

Get a value for a specific OID with device-specific state applied.

## Examples

    value = SnmpKit.SnmpSim.MIB.SharedProfiles.get_oid_value(
      :cable_modem,
      "1.3.6.1.2.1.2.2.1.10.1",
      %{device_id: "cm_001", uptime: 3600}
    )

# init_profiles()

Initialize shared profiles for device types.

## Examples

    :ok = SnmpKit.SnmpSim.MIB.SharedProfiles.init_profiles()

# list_profiles()

List all available device type profiles.

# load_mib_profile(device_type, mib_files, opts \\ [])

Load a MIB-based profile for a device type.

## Examples

    :ok = SnmpKit.SnmpSim.MIB.SharedProfiles.load_mib_profile(
      :cable_modem,
      ["DOCS-CABLE-DEVICE-MIB", "IF-MIB"]
    )

# load_walk_profile(device_type, walk_file, opts \\ [])

Load a walk file-based profile with enhanced behaviors.

## Examples

    :ok = SnmpKit.SnmpSim.MIB.SharedProfiles.load_walk_profile(
      :cable_modem,
      "priv/walks/cable_modem.walk",
      behaviors: [:realistic_counters, :daily_patterns]
    )

# start_link(opts \\ [])

Start the shared profiles manager.

# store_profile(device_type, profile_data, behavior_data)

Store profile data directly (useful for testing).