diff options
Diffstat (limited to 'lib/snmp/src')
-rw-r--r-- | lib/snmp/src/agent/snmpa_agent.erl | 6 | ||||
-rw-r--r-- | lib/snmp/src/app/snmp.appup.src | 574 | ||||
-rw-r--r-- | lib/snmp/src/manager/snmpm_server.erl | 37 | ||||
-rw-r--r-- | lib/snmp/src/manager/snmpm_user_default.erl | 6 |
4 files changed, 26 insertions, 597 deletions
diff --git a/lib/snmp/src/agent/snmpa_agent.erl b/lib/snmp/src/agent/snmpa_agent.erl index 9d30e332f1..57846db13b 100644 --- a/lib/snmp/src/agent/snmpa_agent.erl +++ b/lib/snmp/src/agent/snmpa_agent.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2012. All Rights Reserved. +%% Copyright Ericsson AB 1996-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1134,7 +1134,7 @@ handle_call({get, Vars, Context}, _From, S) -> "~n Vars: ~p" "~n Context: ~p", [Vars, Context]), put_pdu_data({undefined, undefined, undefined, undefined, Context}), - case catch mapfoldl({?MODULE, tr_var}, [], 1, Vars) of + case catch mapfoldl(fun ?MODULE:tr_var/2, [], 1, Vars) of {error, Reason} -> {reply, {error, Reason}, S}; {_, Varbinds} -> ?vdebug("Varbinds: ~p",[Varbinds]), @@ -1155,7 +1155,7 @@ handle_call({get_next, Vars, Context}, _From, S) -> "~n Vars: ~p" "~n Context: ~p",[Vars, Context]), put_pdu_data({undefined, undefined, undefined, undefined, Context}), - case catch mapfoldl({?MODULE, tr_var}, [], 1, Vars) of + case catch mapfoldl(fun ?MODULE:tr_var/2, [], 1, Vars) of {error, Reason} -> {reply, {error, Reason}, S}; {_, Varbinds} -> ?vdebug("Varbinds: ~p",[Varbinds]), diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index 593ddd82bd..a6abf8439a 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2012. All Rights Reserved. +%% Copyright Ericsson AB 1999-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -22,582 +22,12 @@ %% ----- U p g r a d e ------------------------------------------------------- [ - {"4.22", - [ - {load_module, snmpm, soft_purge, soft_purge, []}, - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, []} - ] - }, - {"4.21.7", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21.6", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21.5", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21.4", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21.3", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21.2", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {load_module, snmpa_mpd, soft_purge, soft_purge, []}, - {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21.1", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {load_module, snmpa_mpd, soft_purge, soft_purge, []}, - {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - {update, snmp_note_store, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - }, - {"4.21", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {load_module, snmpa_mpd, soft_purge, soft_purge, []}, - {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - {update, snmp_note_store, soft, soft_purge, soft_purge, []}, - - {add_module, snmpm_net_if_mt} - ] - } ], %% ------D o w n g r a d e --------------------------------------------------- [ - {"4.22", - [ - {load_module, snmpm, soft_purge, soft_purge, []}, - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, []} - ] - }, - {"4.21.7", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21.6", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21.5", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21.4", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21.3", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21.2", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {load_module, snmpa_mpd, soft_purge, soft_purge, []}, - {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21.1", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {load_module, snmpa_mpd, soft_purge, soft_purge, []}, - {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - {update, snmp_note_store, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - }, - {"4.21", - [ - {load_module, snmp_pdus, soft_purge, soft_purge, []}, - - {load_module, snmp_config, soft_purge, soft_purge, []}, - {load_module, snmp_conf, soft_purge, soft_purge, []}, - {load_module, snmp_community_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, [snmp_conf]}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, [snmp_conf]}, - - {load_module, snmp, soft_purge, soft_purge, [snmp_log]}, - {load_module, snmpm, soft_purge, soft_purge, [snmp]}, - {load_module, snmp_log, soft_purge, soft_purge, []}, - {load_module, snmp_verbosity, soft_purge, soft_purge, []}, - {load_module, snmpm_mpd, soft_purge, soft_purge, []}, - - {load_module, snmpa, soft_purge, soft_purge, [snmp]}, - {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, - {update, snmpa_supervisor, soft, soft_purge, soft_purge, []}, - - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, - [snmp_conf]}, - {load_module, snmpa_vacm, soft_purge, soft_purge, []}, - {load_module, snmpa_mpd, soft_purge, soft_purge, []}, - {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, - {load_module, snmpa_trap, soft_purge, soft_purge, []}, - {load_module, snmp_target_mib, soft_purge, soft_purge, - [snmp_conf, snmpa_mib_lib]}, - {load_module, snmp_generic_mnesia, soft_purge, soft_purge, []}, - {update, snmpa_local_db, soft, soft_purge, soft_purge, []}, - {update, snmpa_mib, soft, soft_purge, soft_purge, []}, - {update, snmpa_agent, soft, soft_purge, soft_purge, []}, - {update, snmp_note_store, soft, soft_purge, soft_purge, []}, - - {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} - ] - } ] + }. diff --git a/lib/snmp/src/manager/snmpm_server.erl b/lib/snmp/src/manager/snmpm_server.erl index 484954addb..61d22362cc 100644 --- a/lib/snmp/src/manager/snmpm_server.erl +++ b/lib/snmp/src/manager/snmpm_server.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2011. All Rights Reserved. +%% Copyright Ericsson AB 2004-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -3163,17 +3163,16 @@ request_id() -> %%---------------------------------------------------------------------- agent_data(TargetName, SendOpts) -> - case snmpm_config:agent_info(TargetName, all) of - {ok, Info} -> - Version = agent_data_item(version, Info), + case snmpm_config:agent_info(TargetName, version) of + {ok, Version} -> MsgData = case Version of v3 -> - DefSecModel = agent_data_item(sec_model, Info), - DefSecName = agent_data_item(sec_name, Info), - DefSecLevel = agent_data_item(sec_level, Info), + DefSecModel = agent_data_item(sec_model, TargetName), + DefSecName = agent_data_item(sec_name, TargetName), + DefSecLevel = agent_data_item(sec_level, TargetName), - EngineId = agent_data_item(engine_id, Info), + EngineId = agent_data_item(engine_id, TargetName), CtxName = agent_data_item(context, SendOpts, ?DEFAULT_CONTEXT), @@ -3191,8 +3190,8 @@ agent_data(TargetName, SendOpts) -> {SecModel, SecName, mk_sec_level_flag(SecLevel), EngineId, CtxName, TargetName}; _ -> - DefComm = agent_data_item(community, Info), - DefSecModel = agent_data_item(sec_model, Info), + DefComm = agent_data_item(community, TargetName), + DefSecModel = agent_data_item(sec_model, TargetName), Comm = agent_data_item(community, SendOpts, @@ -3203,21 +3202,21 @@ agent_data(TargetName, SendOpts) -> {Comm, SecModel} end, - Domain = agent_data_item(tdomain, Info), - Addr = agent_data_item(address, Info), - Port = agent_data_item(port, Info), - RegType = agent_data_item(reg_type, Info), + Domain = agent_data_item(tdomain, TargetName), + Addr = agent_data_item(address, TargetName), + Port = agent_data_item(port, TargetName), + RegType = agent_data_item(reg_type, TargetName), {ok, RegType, Domain, Addr, Port, version(Version), MsgData}; Error -> Error end. -agent_data_item(Item, Info) -> - case lists:keysearch(Item, 1, Info) of - {value, {_, Val}} -> +agent_data_item(Item, TargetName) -> + case snmpm_config:agent_info(TargetName, Item) of + {ok, Val} -> Val; - false -> - throw({error, {not_found, Item, Info}}) + {error, not_found} -> + throw({error, {not_found, Item, TargetName}}) end. agent_data_item(Item, Info, Default) -> diff --git a/lib/snmp/src/manager/snmpm_user_default.erl b/lib/snmp/src/manager/snmpm_user_default.erl index d90fc3f258..015198cb76 100644 --- a/lib/snmp/src/manager/snmpm_user_default.erl +++ b/lib/snmp/src/manager/snmpm_user_default.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2009. All Rights Reserved. +%% Copyright Ericsson AB 2004-2013. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -62,7 +62,7 @@ handle_trap(TargetName, SnmpTrap, UserData) -> "~n SnmpTrap: ~p" "~n UserData: ~p", [TargetName, SnmpTrap, UserData]), - ok. + ignore. handle_inform(TargetName, SnmpInform, UserData) -> @@ -80,7 +80,7 @@ handle_report(TargetName, SnmpReport, UserData) -> "~n SnmpReport: ~p" "~n UserData: ~p", [TargetName, SnmpReport, UserData]), - ok. + ignore. info(F, A) -> |