diff options
Diffstat (limited to 'lib/snmp')
-rw-r--r-- | lib/snmp/doc/src/Makefile | 2 | ||||
-rw-r--r-- | lib/snmp/doc/src/notes.xml | 146 | ||||
-rw-r--r-- | lib/snmp/mibs/Makefile.in | 8 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_agent.erl | 6 | ||||
-rw-r--r-- | lib/snmp/src/app/Makefile | 4 | ||||
-rw-r--r-- | lib/snmp/src/app/snmp.appup.src | 574 | ||||
-rw-r--r-- | lib/snmp/src/compile/depend.mk | 4 | ||||
-rw-r--r-- | lib/snmp/src/manager/snmpm_server.erl | 37 | ||||
-rw-r--r-- | lib/snmp/src/manager/snmpm_user_default.erl | 6 |
9 files changed, 116 insertions, 671 deletions
diff --git a/lib/snmp/doc/src/Makefile b/lib/snmp/doc/src/Makefile index 8820565124..6e55498669 100644 --- a/lib/snmp/doc/src/Makefile +++ b/lib/snmp/doc/src/Makefile @@ -118,7 +118,7 @@ clean clean_docs: clean_html clean_man clean_pdf rm -f errs core *~ $(INDEX_TARGET): $(INDEX_SRC) ../../vsn.mk # Create top make file - sed -e 's;%VSN%;$(VSN);' $< > $@ # inserting version number + $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ # inserting version number man: man1 man3 man6 man7 diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index b6b8751f6c..5b94dcb051 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>1996</year><year>2012</year> + <year>1996</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -34,6 +34,86 @@ <section> + <title>SNMP Development Toolkit 4.23</title> +<!-- + <p>Version 4.23 supports code replacement in runtime from/to + version 4.22.1, + 4.22, 4.21.7 4.21.6 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1 and 4.21. </p> +--> + + <section> + <title>Improvements and new features</title> +<!-- + <p>-</p> +--> + + <list type="bulleted"> + <item> + <p>[manager] Polish return values of snmpm_user_default according + to snmpm_user doc.</p> + <p>Luca Favatella</p> + <p>Own Id: OTP-10671</p> + </item> + + <item> + <p>[agent] Remove runtime warning in snmpa_agent because of + tuple fun usage. </p> + <p>Luca Favatella</p> + <p>Own Id: OTP-10672</p> + </item> + + <item> + <p>[manager] SNMP manager performance optimization. </p> + <p>Ivan Dubovik</p> + <p>Own Id: OTP-10673</p> + </item> + + </list> + + </section> + + <section> + <title>Fixed Bugs and Malfunctions</title> + <p>-</p> + + <!-- + <list type="bulleted"> + <item> + <p>[agent] Simultaneous + <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso> + calls can interfere. + The master agent did not check if a backup was already in + progress when a backup request was accepted. </p> + <p>Own Id: OTP-9884</p> + <p>Aux Id: Seq 11995</p> + </item> + + </list> + --> + + </section> + + <section> + <title>Incompatibilities</title> +<!-- + <p>-</p> +--> + + <list type="bulleted"> + <item> + <p>[manager] The old Addr-and-Port based API functions, previously + long deprecated and marked for deletion in R16B, has now been + removed. </p> + <p>Own Id: OTP-10027</p> + </item> + + </list> + </section> + + </section> <!-- 4.23 --> + + + <section> <title>SNMP Development Toolkit 4.22.1</title> <p>Version 4.22.1 supports code replacement in runtime from/to version 4.22, 4.21.7 4.21.6 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1 and @@ -126,70 +206,6 @@ <section> - <title>SNMP Development Toolkit 4.23</title> - <p>Version 4.23 supports code replacement in runtime from/to - version 4.22, - 4.21.7 4.21.6 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1 and 4.21. </p> - - <section> - <title>Improvements and new features</title> - <p>-</p> - -<!-- - <list type="bulleted"> - <item> - <p>[agent] Documenting previously existing but undocumented function, - <seealso marker="snmp_generic#get_table_info">snmp_generic:get_table_info/2</seealso>. </p> - <p>Own Id: OTP-9942</p> - </item> - - </list> ---> - - </section> - - <section> - <title>Fixed Bugs and Malfunctions</title> - <p>-</p> - - <!-- - <list type="bulleted"> - <item> - <p>[agent] Simultaneous - <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso> - calls can interfere. - The master agent did not check if a backup was already in - progress when a backup request was accepted. </p> - <p>Own Id: OTP-9884</p> - <p>Aux Id: Seq 11995</p> - </item> - - </list> - --> - - </section> - - <section> - <title>Incompatibilities</title> -<!-- - <p>-</p> ---> - - <list type="bulleted"> - <item> - <p>[manager] The old Addr-and-Port based API functions, previously - long deprecated and marked for deletion in R16B, has now been - removed. </p> - <p>Own Id: OTP-10027</p> - </item> - - </list> - </section> - - </section> <!-- 4.23 --> - - - <section> <title>SNMP Development Toolkit 4.22</title> <p>Version 4.22 supports code replacement in runtime from/to version 4.21.7 4.21.6 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1 and 4.21. </p> diff --git a/lib/snmp/mibs/Makefile.in b/lib/snmp/mibs/Makefile.in index 5c1f855fad..e7ca540cc6 100644 --- a/lib/snmp/mibs/Makefile.in +++ b/lib/snmp/mibs/Makefile.in @@ -141,11 +141,11 @@ OTP_MIBDIR = $(shell if test -d ../../otp_mibs; then echo otp_mibs; \ debug opt: $(TARGET_FILES) $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1: $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1.src - $(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@ - chmod 755 $@ + $(gen_verbose)$(PERL) -p -e 's?%PERL%?$(PERL)? ' < $< > $@ + $(V_at)chmod 755 $@ $(SNMP_BIN_TARGET_DIR)/OTP-REG.bin: $(ERL_TOP)/lib/$(OTP_MIBDIR)/mibs/OTP-REG.mib - $(ERLC) -pa $(SNMP_TOOLKIT)/ebin -I $(SNMP_TOOLKIT)/priv/mibs $(SNMP_FLAGS) -o $(SNMP_BIN_TARGET_DIR) $< + $(snmp_verbose)$(ERLC) -pa $(SNMP_TOOLKIT)/ebin -I $(SNMP_TOOLKIT)/priv/mibs $(SNMP_FLAGS) -o $(SNMP_BIN_TARGET_DIR) $< # To support parallel make, we'll need explicit dependencies # to ensure that an imported MIB has been compiled when it's needed. @@ -214,7 +214,7 @@ info: @echo "RELSYSDIR = "$(RELSYSDIR)"" v1/%.mib.v1: %.mib $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 - $(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 -o $@ $< + $(gen_verbose)$(ERL_TOP)/lib/snmp/bin/snmp-v2tov1 -o $@ $< # ---------------------------------------------------- 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/Makefile b/lib/snmp/src/app/Makefile index f7c311b663..716add8b9e 100644 --- a/lib/snmp/src/app/Makefile +++ b/lib/snmp/src/app/Makefile @@ -116,10 +116,10 @@ info: # ---------------------------------------------------- $(APP_TARGET): $(APP_SRC) ../../vsn.mk - sed -e 's;%VSN%;$(VSN);' $< > $@ + $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ $(APPUP_TARGET): $(APPUP_SRC) ../../vsn.mk - sed -e 's;%VSN%;$(VSN);' $< > $@ + $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ # ---------------------------------------------------- # Release Target 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/compile/depend.mk b/lib/snmp/src/compile/depend.mk index 3ee8dc4bec..e6ba1ac810 100644 --- a/lib/snmp/src/compile/depend.mk +++ b/lib/snmp/src/compile/depend.mk @@ -45,5 +45,5 @@ $(EBIN)/snmpc_mib_gram.$(EMULATOR): \ snmpc_mib_gram.erl $(BIN)/snmpc: snmpc.src ../../vsn.mk - $(PERL) -p -e 's?%VSN%?$(VSN)? ' < $< > $@ - chmod 755 $@ + $(vsn_verbose)$(PERL) -p -e 's?%VSN%?$(VSN)? ' < $< > $@ + $(V_at)chmod 755 $@ 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) -> |