diff options
Diffstat (limited to 'lib/snmp/src')
-rw-r--r-- | lib/snmp/src/agent/modules.mk | 3 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa.erl | 18 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_mib_data.erl | 15 |
3 files changed, 20 insertions, 16 deletions
diff --git a/lib/snmp/src/agent/modules.mk b/lib/snmp/src/agent/modules.mk index ea43904f4a..34765475b9 100644 --- a/lib/snmp/src/agent/modules.mk +++ b/lib/snmp/src/agent/modules.mk @@ -30,7 +30,8 @@ BEHAVIOUR_MODULES = \ snmpa_set_mechanism # snmpa is "plain" interface module but also defines some agent specific types -# and therefor must be compiled before the modules that use them... +# and therefor must be compiled before the modules that use them, including +# the behaviour modules... # snmpa_mib_data_ttln MODULES = \ snmpa \ diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index 0ce1f611b2..14b93439df 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -112,7 +112,13 @@ -export([print_mib_info/0, print_mib_tables/0, print_mib_variables/0]). -export_type([ - me/0 + me/0, + + %% Agent config types + mib_storage/0, + mib_storage_opt/0, + mib_storage_module/0, + mib_storage_options/0 ]). -deprecated([{old_info_format, 1, next_major_release}]). @@ -131,6 +137,16 @@ -type me() :: #me{}. +%% Agent config types +-type mib_storage() :: [mib_storage_opt()]. +-type mib_storage_opt() :: {module, mib_storage_module()} | + {options, mib_storage_options()}. + +%% Module implementing the snmpa_mib_storage behaviour +-type mib_storage_module() :: atom(). +%% Options specific to the above module +-type mib_storage_options() :: list(). + %%----------------------------------------------------------------- %% This utility function is used to convert an old SNMP application diff --git a/lib/snmp/src/agent/snmpa_mib_data.erl b/lib/snmp/src/agent/snmpa_mib_data.erl index 368c714134..4d8a12b6c6 100644 --- a/lib/snmp/src/agent/snmpa_mib_data.erl +++ b/lib/snmp/src/agent/snmpa_mib_data.erl @@ -27,25 +27,12 @@ %% These types should really be defined elsewhere... -export_type([ - mib_storage/0, - mib_storage_opt/0, - mib_storage_module/0, - mib_storage_options/0, mib_view/0, mib_view_elem/0, mib_view_mask/0, mib_view_inclusion/0 ]). --type mib_storage() :: [mib_storage_opt()]. --type mib_storage_opt() :: {module, mib_storage_module()} | - {options, mib_storage_options()}. - -%% Module implementing the snmpa_mib_storage behaviour --type mib_storage_module() :: atom(). -%% Options specific to the above module --type mib_storage_options() :: list(). - -type mib_view() :: [mib_view_elem()]. -type mib_view_elem() :: {SubTree :: snmp:oid(), Mask :: [non_neg_integer()], @@ -56,7 +43,7 @@ -type filename() :: file:filename(). --callback new(MibStorage :: mib_storage()) -> State :: term(). +-callback new(MibStorage :: snmpa:mib_storage()) -> State :: term(). -callback close(State :: term()) -> ok. |