diff options
Diffstat (limited to 'lib/snmp')
29 files changed, 866 insertions, 559 deletions
diff --git a/lib/snmp/doc/src/Makefile b/lib/snmp/doc/src/Makefile index 9ea5dba0c5..3ebee792f9 100644 --- a/lib/snmp/doc/src/Makefile +++ b/lib/snmp/doc/src/Makefile @@ -1,9 +1,9 @@ #-*-makefile-*- ; force emacs to enter makefile-mode # %CopyrightBegin% -# -# Copyright Ericsson AB 1997-2016. All Rights Reserved. -# +# +# Copyright Ericsson AB 1997-2017. All Rights Reserved. +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -15,7 +15,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# # %CopyrightEnd% include $(ERL_TOP)/make/target.mk @@ -66,7 +66,6 @@ HTML_REF6_FILES = $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) HTML_CHAP_FILES = $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) EXTRA_FILES = \ - summary.html.src \ $(DEFAULT_HTML_FILES) \ $(HTML_REF1_FILES) \ $(HTML_REF3_FILES) \ @@ -85,18 +84,14 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf -INDEX_FILE = index.html -INDEX_SRC = $(INDEX_FILE).src -INDEX_TARGET = $(DOCDIR)/$(INDEX_FILE) - GIF_TARGETS = $(GIF_FILES:%=$(HTMLDIR)/%) # ---------------------------------------------------- -# FLAGS +# FLAGS # ---------------------------------------------------- -XML_FLAGS += -DVIPS_FLAGS += +XML_FLAGS += +DVIPS_FLAGS += # ---------------------------------------------------- # Targets @@ -106,21 +101,17 @@ $(HTMLDIR)/%.gif: %.gif # Copy them to ../html docs: pdf html man -ldocs: local_docs $(INDEX_TARGET) +ldocs: local_docs $(TOP_PDF_FILE): $(XML_FILES) pdf: $(TOP_PDF_FILE) html: gifs $(HTML_REF_MAN_FILE) -html2: html $(INDEX_TARGET) clean clean_docs: clean_html clean_man clean_pdf rm -f errs core *~ -$(INDEX_TARGET): $(INDEX_SRC) ../../vsn.mk # Create top make file - $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@ # inserting version number - man: man1 man3 man6 man7 man1: $(MAN1_FILES) @@ -133,7 +124,7 @@ man7: $(MAN7_FILES) gifs: $(GIF_TARGETS) -debug opt: +debug opt: clean_pdf: @echo "cleaning pdf:" @@ -149,7 +140,6 @@ clean_man: clean_html: @echo "cleaning html:" rm -rf $(HTMLDIR)/* - rm -f $(INDEX_TARGET) $(MAN7DIR)/%.7: $(MIBSDIR)/%.mib @echo "processing $*" @@ -162,7 +152,7 @@ $(MAN7DIR)/%.7: $(MIBSDIR)/%.mib # ---------------------------------------------------- # Release Target -# ---------------------------------------------------- +# ---------------------------------------------------- $(MAN1DIR)/snmpc.1: snmpc_cmd.xml date=`date +"%B %e %Y"`; \ @@ -194,7 +184,7 @@ info: info_xml info_man info_html @echo "MAN6DIR: $(MAN6DIR)" @echo "MAN7DIR: $(MAN7DIR)" -info_man: +info_man: @echo "man files:" @echo "MAN1_FILES = $(MAN1_FILES)" @echo "MAN3_FILES = $(MAN3_FILES)" @@ -203,7 +193,7 @@ info_man: @echo "" @echo "MIB_FILES = $(MIB_FILES)" -info_xml: +info_xml: @echo "xml files:" # @echo "XML_REF1_FILES = $(XML_REF1_FILES)" @echo "XML_REF3_FILES = $(XML_REF3_FILES)" @@ -221,9 +211,7 @@ info_xml: info_html: @echo "html files:" @echo "DOCDIR = $(DOCDIR)" - @echo "INDEX_FILE = $(INDEX_FILE)" - @echo "INDEX_SRC = $(INDEX_SRC)" - @echo "INDEX_TARGET = $(INDEX_TARGET)" + @echo "HTML_REF_MAN_FILE = $(HTML_REF_MAN_FILE)" @echo "" @echo "HTMLDIR = $(HTMLDIR)" @echo "HTML_APP_FILES = $(HTML_APP_FILES)" diff --git a/lib/snmp/doc/src/book.gif b/lib/snmp/doc/src/book.gif Binary files differdeleted file mode 100644 index 94b3868792..0000000000 --- a/lib/snmp/doc/src/book.gif +++ /dev/null diff --git a/lib/snmp/doc/src/fascicules.xml b/lib/snmp/doc/src/fascicules.xml deleted file mode 100644 index 37feca543f..0000000000 --- a/lib/snmp/doc/src/fascicules.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE fascicules SYSTEM "fascicules.dtd"> - -<fascicules> - <fascicule file="part" href="part_frame.html" entry="no"> - User's Guide - </fascicule> - <fascicule file="ref_man" href="ref_man_frame.html" entry="yes"> - Reference Manual - </fascicule> - <fascicule file="part_notes" href="part_notes_frame.html" entry="no"> - Release Notes - </fascicule> - <fascicule file="" href="../../../../doc/print.html" entry="no"> - Off-Print - </fascicule> -</fascicules> - diff --git a/lib/snmp/doc/src/files.mk b/lib/snmp/doc/src/files.mk index 5aeae19105..f364cb6fa5 100644 --- a/lib/snmp/doc/src/files.mk +++ b/lib/snmp/doc/src/files.mk @@ -1,9 +1,9 @@ #-*-makefile-*- ; force emacs to enter makefile-mode # %CopyrightBegin% -# -# Copyright Ericsson AB 2001-2016. All Rights Reserved. -# +# +# Copyright Ericsson AB 2001-2017. All Rights Reserved. +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -15,7 +15,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# # %CopyrightEnd% XML_APPLICATION_FILES = \ @@ -81,9 +81,7 @@ XML_REF3_FILES = \ XML_REF6_FILES = snmp_app.xml XML_PART_FILES = \ - part.xml \ - part_notes.xml \ - part_notes_history.xml + part.xml XML_CHAPTER_FILES = \ snmp_intro.xml \ @@ -115,23 +113,16 @@ XML_FILES = $(BOOK_FILES) \ $(XML_REF6_FILES) \ $(XML_APPLICATION_FILES) -GIF_FILES = book.gif \ +GIF_FILES = \ getnext1.gif \ getnext2.gif \ getnext3.gif \ getnext4.gif \ snmp_agent_netif_1.gif \ snmp_manager_netif_1.gif \ - min_head.gif \ - note.gif \ - notes.gif \ - ref_man.gif \ snmp-um-1-image-1.gif \ snmp-um-1-image-2.gif \ snmp-um-1-image-3.gif \ - snmp.gif \ - user_guide.gif \ - warning.gif \ MIB_mechanism.gif PS_FILES = getnext1.ps \ diff --git a/lib/snmp/doc/src/index.html.src b/lib/snmp/doc/src/index.html.src deleted file mode 100644 index e1b6be4d1f..0000000000 --- a/lib/snmp/doc/src/index.html.src +++ /dev/null @@ -1,99 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<!-- This file is obsolete --> -<HTML> -<!-- - ``Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - The Initial Developer of the Original Code is Ericsson Utvecklings AB. - Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings - AB. All Rights Reserved.'' - - $Id$ ---> -<HEAD> -<TITLE>SNMP %VSN%</TITLE> -</HEAD> - -<BODY BGCOLOR="#FFFFFF"> - -<CENTER> -<A HREF="http://www.erlang.se/"><IMG ALT="Erlang/OTP" BORDER=0 SRC="html/min_head.gif"></A><BR> - -<FONT SIZE="-1"> -[<A HREF="../../../doc/index.html">Up</A> | -<A HREF="http://www.erlang.se/">Erlang/OTP</A>] -</FONT><BR> - -<P><FONT SIZE="+3"> -SNMP -</FONT><BR> -Version %VSN% -</CENTER> - -<P><TABLE> -<TR> -<TD> -<IMG ALIGN=LEFT ALT="SNMP" SRC="html/snmp.gif"> -</TD> - -<TD> -<P>A bilingual Simple Network Management Protocol application, - featuring an Extensible Agent, a simple manager, a MIB compiler - and facilities for implementing SNMP MIBs etc. -</TD> -</TR> -</TABLE> - -<P><CENTER> -<TABLE CELLPADDING=15> -<TR> -<TD ALIGN=CENTER> -<A HREF="html/users_guide.html"><IMG ALT="User's Guide" BORDER=0 SRC="html/user_guide.gif"></A><BR> -<FONT SIZE="-1"> -<A HREF="html/users_guide.html">User's Guide</A> -</FONT> -</TD> - -<TD ALIGN=CENTER> -<A HREF="html/index.html"><IMG ALT="Reference Manual" BORDER=0 SRC="html/ref_man.gif"></A><BR> -<FONT SIZE="-1"> -<A HREF="html/index.html">Reference Manual</A> -</FONT> -</TD> - -<TD ALIGN=CENTER> -<A HREF="html/release_notes.html"><IMG ALT="Release Notes" BORDER=0 SRC="html/notes.gif"></A><BR> -<FONT SIZE="-1"> -<A HREF="html/release_notes.html">Release Notes</A> -</FONT> -</TD> - -<TD ALIGN=CENTER> -<A HREF="pdf/snmp-%VSN%.pdf"><IMG ALT="Off-Print" BORDER=0 SRC="html/book.gif"></A><BR> -<FONT SIZE="-1"> -<A HREF="pdf/snmp-%VSN%.pdf">Off-Print</A> -</FONT> -</TD> -</TR> -</TABLE> -</CENTER> - -<P><CENTER> -<HR> -<FONT SIZE="-1"> -Copyright © 1991-2001 -<A HREF="http://www.erlang.se/">Ericsson Utvecklings AB</A> -</FONT> -</CENTER> -</BODY> -</HTML> diff --git a/lib/snmp/doc/src/min_head.gif b/lib/snmp/doc/src/min_head.gif Binary files differdeleted file mode 100644 index 67948a6378..0000000000 --- a/lib/snmp/doc/src/min_head.gif +++ /dev/null diff --git a/lib/snmp/doc/src/note.gif b/lib/snmp/doc/src/note.gif Binary files differdeleted file mode 100644 index 6fffe30419..0000000000 --- a/lib/snmp/doc/src/note.gif +++ /dev/null diff --git a/lib/snmp/doc/src/notes.gif b/lib/snmp/doc/src/notes.gif Binary files differdeleted file mode 100644 index e000cca26a..0000000000 --- a/lib/snmp/doc/src/notes.gif +++ /dev/null diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index f1919a6bb1..f64e0cca97 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -4,14 +4,14 @@ <chapter> <header> <copyright> - <year>1996</year><year>2016</year> + <year>1996</year><year>2017</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - + </legalnotice> <title>SNMP Release Notes</title> @@ -34,7 +34,104 @@ </header> - <section><title>SNMP 5.2.5</title> + <section><title>SNMP 5.2.11</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The Snmp MIB compiler now allows using a + TEXTUAL-CONVENTION type before defining it.</p> + <p> + Own Id: OTP-14196 Aux Id: ERIERL-161 </p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.2.10</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The example MIB EX1-MIB in the SNMP application has been + corrected to match its example.</p> + <p> + Own Id: OTP-14204 Aux Id: PR-1726 </p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.2.9</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> Removed all old unused files in the documentation. + </p> + <p> + Own Id: OTP-14475 Aux Id: ERL-409, PR-1493 </p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.2.8</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The <c>recbuf</c> configuration option was not propagated + correctly to the socket for the SNMP Manager.</p> + <p> + Own Id: OTP-13372 Aux Id: ERIERL-73 </p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.2.7</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + A bug in the SNMP MIB compiler has been fixed. An + AUGMENTS referring to a table defined later in the MIB + did not work.</p> + <p> + Own Id: OTP-13014 Aux Id: ERL-375 </p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.2.6</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>Internal code change: Calls to <c>catch</c> followed + by a call to <c>erlang:get_stacktrace/0</c> has been + rewritten to use <c>try</c> instead of <c>catch</c> to + make the code future-proof.</p> + <p> + Own Id: OTP-14400</p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.2.5</title> <section><title>Fixed Bugs and Malfunctions</title> <list> @@ -203,8 +300,8 @@ <list type="bulleted"> <item> <p>[compiler] Refinement of type Opaque was not allowed. </p> - <p>MIB constructs such as '<c>SYNTAX Opaque (SIZE(0..65535))</c>' - was previously not allowed, + <p>MIB constructs such as '<c>SYNTAX Opaque (SIZE(0..65535))</c>' + was previously not allowed, see the standard <c>ALARM-MIB</c> for eaxmple. </p> <p>Own Id: OTP-12066</p> <p>Aux Id: Seq 12669</p> @@ -221,8 +318,8 @@ <!-- <list type="bulleted"> <item> - <p>[agent] - see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and + <p>[agent] + see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and <seealso marker="snmpa#unload_mibs">unload_mibs</seealso>. </p> <p>Own Id: OTP-11216</p> </item> @@ -353,18 +450,18 @@ <!-- <list type="bulleted"> <item> - <p>Wrong block cypher type used for AES ('aes_cbf128' - instead of 'aes_cfb128') when performing AES block - encrypt/decrypt which breaks SNMP usmAesCfb128Protocol + <p>Wrong block cypher type used for AES ('aes_cbf128' + instead of 'aes_cfb128') when performing AES block + encrypt/decrypt which breaks SNMP usmAesCfb128Protocol in agent and manager. </p> <p>Own Id: OTP-11412</p> </item> <item> - <p>[manager] When performing the AES encryption, invalid values for + <p>[manager] When performing the AES encryption, invalid values for the EngineBoots and EngineTime was used. </p> - <p>The values of the local agent was used, which would have produced - "some" values if an agent was actually running. + <p>The values of the local agent was used, which would have produced + "some" values if an agent was actually running. If not it would have caused a crash. </p> <p>Own Id: OTP-11413</p> </item> @@ -408,16 +505,16 @@ <list type="bulleted"> <item> <p>[agent] Enable SNMP to create missing database directories. </p> - <p>Add + <p>Add <seealso marker="snmp_app#db_init_error"> - {db_init_error, create_db_and_dir}</seealso> option to SNMP - <seealso marker="snmp_app#manager_opts_and_types">manager</seealso> + {db_init_error, create_db_and_dir}</seealso> option to SNMP + <seealso marker="snmp_app#manager_opts_and_types">manager</seealso> and - <seealso marker="snmp_app#agent_opts_and_types">agent</seealso>. + <seealso marker="snmp_app#agent_opts_and_types">agent</seealso>. This allows them to create any missing parent directories for - <c>db_dir</c>, rather than treating any missing directories + <c>db_dir</c>, rather than treating any missing directories as a fatal error. - The default for <c>db_init_error</c>, which is <c>terminate</c>, + The default for <c>db_init_error</c>, which is <c>terminate</c>, is unchanged. </p> <p>Steve Vinoski</p> <p>Own Id: OTP-11352</p> @@ -427,7 +524,7 @@ <p>[manager] Improved handling of unexpected return values from <seealso marker="snmpm_user">snmpm_user</seealso> callback functions. </p> - <p>Violations of the documented API (crashes or invalid return + <p>Violations of the documented API (crashes or invalid return values) will now result in an error message. </p> <p>Own Id: OTP-11307</p> </item> @@ -435,16 +532,16 @@ <item> <p>Add (atl) log conversion block option. </p> <p>It is now possible to request that the Audit Trail Log should - be blocked during conversion (<c>log_to_txt</c> or <c>log_to_io</c>). - This could be usefull when coverting an entire large log (when + be blocked during conversion (<c>log_to_txt</c> or <c>log_to_io</c>). + This could be usefull when coverting an entire large log (when there is a chance it may otherwise wrap during conversion). </p> - <p>See - agent + <p>See + agent <seealso marker="snmpa#log_to_txt">log_to_txt</seealso> and - <seealso marker="snmpa#log_to_io">log_to_io</seealso> and also - manager + <seealso marker="snmpa#log_to_io">log_to_io</seealso> and also + manager <seealso marker="snmpm#log_to_txt">log_to_txt</seealso> and - <seealso marker="snmpm#log_to_io">log_to_io</seealso> + <seealso marker="snmpm#log_to_io">log_to_io</seealso> for details. </p> <p>Own Id: OTP-11396</p> <p>Own Id: seq12433</p> @@ -453,9 +550,9 @@ <item> <p>When converting an Audit Trail Log to text, a corrupt log entry could cause the entire conversion to fail. </p> - <p>Also, for a log with sequence numbers, failing to + <p>Also, for a log with sequence numbers, failing to decode a log entry would cause the conversion to fail - (not because of the failed decode, but because of the + (not because of the failed decode, but because of the failure to write the error message). </p> <p>Own Id: OTP-111453</p> <p>Aux Id: Seq 12459</p> @@ -473,18 +570,18 @@ <list type="bulleted"> <item> - <p>Wrong block cypher type used for AES ('aes_cbf128' - instead of 'aes_cfb128') when performing AES block - encrypt/decrypt which breaks SNMP usmAesCfb128Protocol + <p>Wrong block cypher type used for AES ('aes_cbf128' + instead of 'aes_cfb128') when performing AES block + encrypt/decrypt which breaks SNMP usmAesCfb128Protocol in agent and manager. </p> <p>Own Id: OTP-11412</p> </item> <item> - <p>[manager] When performing the AES encryption, invalid values for + <p>[manager] When performing the AES encryption, invalid values for the EngineBoots and EngineTime was used. </p> - <p>The values of the local agent was used, which would have produced - "some" values if an agent was actually running. + <p>The values of the local agent was used, which would have produced + "some" values if an agent was actually running. If not it would have caused a crash. </p> <p>Own Id: OTP-11413</p> </item> @@ -526,14 +623,14 @@ <list type="bulleted"> <item> - <p>[agent] Improved documentation for the functions for - loading and unloading mibs, - see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and - <seealso marker="snmpa#unload_mibs">unload_mibs</seealso> for + <p>[agent] Improved documentation for the functions for + loading and unloading mibs, + see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and + <seealso marker="snmpa#unload_mibs">unload_mibs</seealso> for more info. </p> - <p>Also added new functions for loading and unloading a single mib, - see <seealso marker="snmpa#load_mib">load_mib</seealso> and - <seealso marker="snmpa#unload_mib">unload_mib</seealso> for + <p>Also added new functions for loading and unloading a single mib, + see <seealso marker="snmpa#load_mib">load_mib</seealso> and + <seealso marker="snmpa#unload_mib">unload_mib</seealso> for more info. </p> <p>Own Id: OTP-11216</p> </item> @@ -549,8 +646,8 @@ <!-- <list type="bulleted"> <item> - <p>[agent] - see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and + <p>[agent] + see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and <seealso marker="snmpa#unload_mibs">unload_mibs</seealso>. </p> <p>Own Id: OTP-11216</p> </item> @@ -576,7 +673,7 @@ </list> --> </section> - + </section> <!-- 4.24.2 --> @@ -609,29 +706,29 @@ <list type="bulleted"> <item> - <p>[agent] Reading the value of the vacmViewTreeFamilyMask returns + <p>[agent] Reading the value of the vacmViewTreeFamilyMask returns it in the wrong (internal bitlist) format. </p> <p>The vacmViewTreeFamilyMask is defined as a bit string in the MIB - (OCTET STRING). Internally a bitlist (list of 1's and 0's, + (OCTET STRING). Internally a bitlist (list of 1's and 0's, see <seealso marker="snmp_agent_config_files#vacm">vacm config file</seealso> - for more info) is used. + for more info) is used. However, the MIB implementation assumed the latter, effectively rendering all attempts to read/set masks via SNMP unsuccessful. </p> - <p>Since the mask is used in hot paths (e.g. access permission checks - for each SNMP operation, the bitlist representation of the mask has - benefits (e.g. faster processing). Reading/writing the view mask - objects is less time-critical. Therefore, to fix the issue, convert - between the bitlist (internal) representation and bitstring + <p>Since the mask is used in hot paths (e.g. access permission checks + for each SNMP operation, the bitlist representation of the mask has + benefits (e.g. faster processing). Reading/writing the view mask + objects is less time-critical. Therefore, to fix the issue, convert + between the bitlist (internal) representation and bitstring (external) when the vacmViewTreeFamilyMask objects are accessed. </p> - <p>Also, the check of the vacm config file was invalid with - regard to the mask value. It was assumed to be a proper oid, which + <p>Also, the check of the vacm config file was invalid with + regard to the mask value. It was assumed to be a proper oid, which is not strictly the case (see bitlist above). </p> <p>Own Id: OTP-11177</p> <p>Stefan Zegenhagen</p> </item> <item> - <p>[agent] The counter increment function in the local-db was + <p>[agent] The counter increment function in the local-db was incorrect. It did not handle counter wrap correctly. </p> <p>Own Id: OTP-11192</p> </item> @@ -678,26 +775,26 @@ </item> <item> - <p>[agent] Introduced a documented behaviour for the mib-server - <seealso marker="snmpa_mib_data">mib-data backend</seealso>. + <p>[agent] Introduced a documented behaviour for the mib-server + <seealso marker="snmpa_mib_data">mib-data backend</seealso>. At present only the default module (<c>snmpa_mib_data_tttn</c>) is provided. </p> - <p>A config option for the (agent) - <seealso marker="snmp_config#agent_mib_server">mib-servers</seealso> - mib-data backend module has been added to the agent config options, + <p>A config option for the (agent) + <seealso marker="snmp_config#agent_mib_server">mib-servers</seealso> + mib-data backend module has been added to the agent config options, <seealso marker="snmp_config#agent_ms_data_module">data_module</seealso>. </p> <p>Own Id: OTP-11101</p> </item> <item> - <p>[agent] Introduced a documented behaviour for the - <seealso marker="snmpa_mib_storage">mib storage</seealso>. - At present there are three simple modules - (<c>snmpa_mib_storage_ets</c>, <c>snmpa_mib_storage_dets</c> and + <p>[agent] Introduced a documented behaviour for the + <seealso marker="snmpa_mib_storage">mib storage</seealso>. + At present there are three simple modules + (<c>snmpa_mib_storage_ets</c>, <c>snmpa_mib_storage_dets</c> and <c>snmpa_mib_storage_mnesia</c>) implementing this behaviour, provided with the app. </p> - <p>A config option for the (agent) - <seealso marker="snmp_config#agent_mib_storage">mib storage</seealso> + <p>A config option for the (agent) + <seealso marker="snmp_config#agent_mib_storage">mib storage</seealso> has been added to the agent config options. </p> <p>Own Id: OTP-11107</p> </item> @@ -755,14 +852,14 @@ <list type="bulleted"> <item> <p>[agent] Errors in <c>vacmAccessTable</c> RowStatus handling. - There are problems with the handling of vacmAccessTableStatus + There are problems with the handling of vacmAccessTableStatus that cause some SNMP test suites to report errors. - Most notably, erroneous set operations frequently cause "genErr" - errors to be returned. These "genErr" errors are usually caused - by badmatch exceptions coming from - <c>{ok, Row} = snmpa_vacm:get_row(RowIndex)</c> + Most notably, erroneous set operations frequently cause "genErr" + errors to be returned. These "genErr" errors are usually caused + by badmatch exceptions coming from + <c>{ok, Row} = snmpa_vacm:get_row(RowIndex)</c> if the row does not exist. </p> - <p>The semantics of the RowStatus handling in that table has + <p>The semantics of the RowStatus handling in that table has been adjusted to be compliant with the RowStatus textual description of SNPMv2-TC MIB. </p> <p>Stefan Zegenhagen</p> @@ -786,7 +883,7 @@ </item> <item> - <p>[compiler] The MIB compiler could not handle a table index + <p>[compiler] The MIB compiler could not handle a table index that was defined later in the MIB. </p> <p>Own Id: OTP-10808</p> </item> @@ -819,7 +916,7 @@ <title>SNMP Development Toolkit 4.23</title> <!-- <p>Version 4.23 supports code replacement in runtime from/to - version 4.22.1, + 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> --> @@ -831,14 +928,14 @@ <list type="bulleted"> <item> - <p>[manager] Polish return values of snmpm_user_default according + <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 + <p>[agent] Remove runtime warning in snmpa_agent because of tuple fun usage. </p> <p>Luca Favatella</p> <p>Own Id: OTP-10672</p> @@ -860,10 +957,10 @@ <!-- <list type="bulleted"> <item> - <p>[agent] Simultaneous - <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso> + <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 + 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> @@ -896,7 +993,7 @@ <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 + 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> @@ -908,15 +1005,15 @@ <list type="bulleted"> <item> <p>[agent] Sematic fixes to SNMP-USER-BASED-SM-MIB. - The semantics allow the <c>usmUserAuthKeyChange</c> and - <c>usmUserPrivKeyChange</c> objects to be written to in the - same set requests that also creates and clones the user. - This was not possible beforehand, causing test tools checking + The semantics allow the <c>usmUserAuthKeyChange</c> and + <c>usmUserPrivKeyChange</c> objects to be written to in the + same set requests that also creates and clones the user. + This was not possible beforehand, causing test tools checking semantic SNMPv3 behaviour to fail on a lot of test cases. </p> - <p>Furthermore, once the user has been cloned by writing to an - instance of <c>usmUserCloneFrom</c>, further set-operations to - the same object will not return an error, but be no-ops. - Especially, it must be avoided to copy security parameters + <p>Furthermore, once the user has been cloned by writing to an + instance of <c>usmUserCloneFrom</c>, further set-operations to + the same object will not return an error, but be no-ops. + Especially, it must be avoided to copy security parameters again (possibly even from a different user). </p> <p>Stefan Zegenhagen</p> <p>Own Id: OTP-10166</p> @@ -924,14 +1021,14 @@ <item> <p>[agent] Errors in <c>vacmAccessTable</c> RowStatus handling. - There are problems with the handling of vacmAccessTableStatus + There are problems with the handling of vacmAccessTableStatus that cause some SNMP test suites to report errors. - Most notably, erroneous set operations frequently cause "genErr" - errors to be returned. These "genErr" errors are usually caused - by badmatch exceptions coming from - <c>{ok, Row} = snmpa_vacm:get_row(RowIndex)</c> + Most notably, erroneous set operations frequently cause "genErr" + errors to be returned. These "genErr" errors are usually caused + by badmatch exceptions coming from + <c>{ok, Row} = snmpa_vacm:get_row(RowIndex)</c> if the row does not exist. </p> - <p>The semantics of the RowStatus handling in that table has + <p>The semantics of the RowStatus handling in that table has been adjusted to be compliant with the RowStatus textual description of SNPMv2-TC MIB. </p> <p>Stefan Zegenhagen</p> @@ -950,24 +1047,24 @@ <list type="bulleted"> <item> <p>[agent] Fix walk over vacmAccessTable. - Fix the get_next implementation of vacmAccessTable to + Fix the get_next implementation of vacmAccessTable to return all table entries. </p> - <p>The get_next implementation of vacmAccessTable did not return - all available table data. Instead, it only returned the first + <p>The get_next implementation of vacmAccessTable did not return + all available table data. Instead, it only returned the first column for each row, and all columns for the last row available. </p> <p>Stefan Zegenhagen</p> <p>Own Id: OTP-10165</p> </item> <item> - <p>[manager] - <seealso marker="snmpm#log_to_io">snmpm:log_to_io/6</seealso> + <p>[manager] + <seealso marker="snmpm#log_to_io">snmpm:log_to_io/6</seealso> did not use the LogName argument. </p> <p>Own Id: OTP-10066</p> </item> <item> - <p>Incorrect TimeTicks decode. Also bad handling of + <p>Incorrect TimeTicks decode. Also bad handling of invalid encode (value outside of value range) for both <c>TimeTicks</c> and <c>Unsigned32</c>. </p> <p>Own Id: OTP-10132</p> @@ -998,38 +1095,38 @@ <list type="bulleted"> <item> - <p>[compiler] The table information the MIB compiler provides with - augmented tables has been extended with <c>nbr_of_cols</c>, + <p>[compiler] The table information the MIB compiler provides with + augmented tables has been extended with <c>nbr_of_cols</c>, <c>first_accessible</c> and <c>not_accessible</c>. </p> <p>Own Id: OTP-9969</p> </item> <item> - <p>Added the <c>log_to_io</c> audit-trail-log converter function - to the api modules of both the - <seealso marker="snmpm#log_to_io">manager</seealso> - and + <p>Added the <c>log_to_io</c> audit-trail-log converter function + to the api modules of both the + <seealso marker="snmpm#log_to_io">manager</seealso> + and <seealso marker="snmpa#log_to_io">agent</seealso>. </p> <p>Own Id: OTP-9940</p> </item> <item> - <p>[manager] Introduced a new transport module, - <c>snmpm_net_if_mt</c>, - which handles all incomming and outgoing + <p>[manager] Introduced a new transport module, + <c>snmpm_net_if_mt</c>, + which handles all incomming and outgoing traffic in newly created processes. The message/request is processed and then the process exits. </p> <p>Own Id: OTP-9876</p> </item> <item> - <p>[agent] Documenting previously existing but undocumented function, + <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> <item> - <p>[agent] Improve error handling while reading agent config files. + <p>[agent] Improve error handling while reading agent config files. Some files contain mandatory information and is therefor themself mandatory. </p> <p>Own Id: OTP-9943</p> @@ -1045,10 +1142,10 @@ <!-- <list type="bulleted"> <item> - <p>[agent] Simultaneous - <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso> + <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 + 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> @@ -1070,7 +1167,7 @@ <section> <title>SNMP Development Toolkit 4.21.7</title> <p>Version 4.21.7 supports code replacement in runtime from/to - version 4.21.6, 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1, 4.21, 4.20.1 and + version 4.21.6, 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1, 4.21, 4.20.1 and 4.20. </p> <section> @@ -1080,13 +1177,13 @@ <!-- <list type="bulleted"> <item> - <p>[agent] DoS attack using GET-BULK with large value of + <p>[agent] DoS attack using GET-BULK with large value of MaxRepetitions. - A preventive method has been implementing by simply - limit the number of varbinds that can be included in - a Get-BULK response message. This is specified by the - new config option, - <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>. + A preventive method has been implementing by simply + limit the number of varbinds that can be included in + a Get-BULK response message. This is specified by the + new config option, + <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>. </p> <p>Own Id: OTP-9700</p> </item> @@ -1104,10 +1201,10 @@ <list type="bulleted"> <item> - <p>[agent] Simultaneous - <seealso marker="snmpa#backup">snmpa:backup/1,2</seealso> + <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 + 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> @@ -1128,7 +1225,7 @@ <section> <title>SNMP Development Toolkit 4.21.6</title> <p>Version 4.21.6 supports code replacement in runtime from/to - version 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1, 4.21, 4.20.1 and + version 4.21.5, 4.21.4, 4.21.3, 4.21.2, 4.21.1, 4.21, 4.20.1 and 4.20. </p> <section> @@ -1139,13 +1236,13 @@ <list type="bulleted"> <item> - <p>[agent] DoS attack using GET-BULK with large value of + <p>[agent] DoS attack using GET-BULK with large value of MaxRepetitions. - A preventive method has been implementing by simply - limit the number of varbinds that can be included in - a Get-BULK response message. This is specified by the - new config option, - <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>. + A preventive method has been implementing by simply + limit the number of varbinds that can be included in + a Get-BULK response message. This is specified by the + new config option, + <seealso marker="snmp_app#agent_gb_max_vbs">gb_max_vbs</seealso>. </p> <p>Own Id: OTP-9700</p> </item> @@ -1162,11 +1259,11 @@ <list type="bulleted"> <item> - <p>[agent] Mib server cache gclimit update function incorrectly calls - age update function. - The gclimit update function, - <seealso marker="snmpa#update_mibs_cache_gclimit">update_mibs_cache_gclimit/1</seealso>, - <em>incorrectly</em> called the age update function, + <p>[agent] Mib server cache gclimit update function incorrectly calls + age update function. + The gclimit update function, + <seealso marker="snmpa#update_mibs_cache_gclimit">update_mibs_cache_gclimit/1</seealso>, + <em>incorrectly</em> called the age update function, <seealso marker="snmpa#update_mibs_cache_age">update_mibs_cache_age/2</seealso>. </p> <p>Johan Claesson</p> <p>Own Id: OTP-9868</p> @@ -1208,18 +1305,18 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> <item> - <p>[agent] Repeated vacm table dumping fails due to file name - conflict. When dumping the vacm table to disk, a temoporary - file with a fixed name was used. If the table dumping - (snmpa_vacm:dump_table/0) was initiated from several different - processes in rapid succesion, the dumping could fail because the - different processes was simultaniously trying to write to the - same file. This problem has been eliminated by creating a unique + <p>[agent] Repeated vacm table dumping fails due to file name + conflict. When dumping the vacm table to disk, a temoporary + file with a fixed name was used. If the table dumping + (snmpa_vacm:dump_table/0) was initiated from several different + processes in rapid succesion, the dumping could fail because the + different processes was simultaniously trying to write to the + same file. This problem has been eliminated by creating a unique name for the temporary file. </p> <p>Own Id: OTP-9851</p> <p>Aux Id: Seq 11980</p> @@ -1260,7 +1357,7 @@ <!-- <list type="bulleted"> <item> - <p>[compiler] Improved version info printout from the + <p>[compiler] Improved version info printout from the <seealso marker="snmpc(command)#">MIB compiler frontend escript</seealso>. </p> <p>Own Id: OTP-9618</p> </item> @@ -1273,7 +1370,7 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> @@ -1317,7 +1414,7 @@ <list type="bulleted"> <item> - <p>[compiler] Improved version info printout from the + <p>[compiler] Improved version info printout from the <seealso marker="snmpc(command)#">MIB compiler frontend escript</seealso>. </p> <p>Own Id: OTP-9618</p> </item> @@ -1329,27 +1426,27 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> <item> - <p>[agent] Version 4.20 introduced a change that broke trap - sending from subagents. Due to a bug in the test code, + <p>[agent] Version 4.20 introduced a change that broke trap + sending from subagents. Due to a bug in the test code, this was not discovered, until that bug was fixed. </p> <p>Own Id: OTP-9745</p> </item> <item> - <p>[agent] When sending an error message (reply) regarding + <p>[agent] When sending an error message (reply) regarding <c>snmpUnknownPDUHandlers</c>, the agent used the wrong OID. </p> <p>Own Id: OTP-9747</p> </item> <item> - <p>[compiler] Fix the <c>--warnings/--W</c> option parsing in the + <p>[compiler] Fix the <c>--warnings/--W</c> option parsing in the <seealso marker="snmpc(command)#option_warnings">snmpc</seealso> - wrapper (e)script. + wrapper (e)script. The short warning option was incorrectly <c>--w</c>, instead of as documented <c>--W</c>. This has now been corrected. </p> <p>*** POTENTIAL INCOMPATIBILITY ***</p> @@ -1369,7 +1466,7 @@ <list type="bulleted"> <item> - <p>[compiler] The short warning option has been changed from + <p>[compiler] The short warning option has been changed from <c>--w</c> to <c>--W</c> to comply with the documentation. </p> <p>Tuncer Ayaz</p> <p>Own Id: OTP-9718</p> @@ -1393,7 +1490,7 @@ <!-- <list type="bulleted"> <item> - <p>Bad note store GC timer deactivation. + <p>Bad note store GC timer deactivation. Wrong field in the state record was set (timeout instead active). </p> <p>Stefan Grundmann</p> <p>Own Id: OTP-9690</p> @@ -1407,12 +1504,12 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> <item> - <p>Bad note store GC timer deactivation. + <p>Bad note store GC timer deactivation. Wrong field in the state record was set (timeout instead active). </p> <p>Stefan Grundmann</p> <p>Own Id: OTP-9690</p> @@ -1442,13 +1539,13 @@ --> <list type="bulleted"> <item> - <p>[compiler] Used wrong variable name (for - warnings-as-errors variable), which caused the + <p>[compiler] Used wrong variable name (for + warnings-as-errors variable), which caused the compiler to crash when using the snmpc (e)script. </p> - <p>Also added the option + <p>Also added the option <seealso marker="snmpc(command)#option_werror">--Werror</seealso> - for the SNMP MIB compiler (escript) frontend (to mimic - <seealso marker="erts:erlc">erlc</seealso>), + for the SNMP MIB compiler (escript) frontend (to mimic + <seealso marker="erts:erlc">erlc</seealso>), which specifies whether warnings should be treated as errors. </p> <p>Own Id: OTP-9447</p> </item> @@ -1463,12 +1560,12 @@ <section> <title>Fixed Bugs and Malfunctions</title> - <p>-</p> + <p>-</p> <!-- <list type="bulleted"> <item> - <p>The snmp config tool could not handle (manager) audit trail config + <p>The snmp config tool could not handle (manager) audit trail config because the option seqno was not handled. </p> <p>Own Id: OTP-9354</p> </item> @@ -1498,15 +1595,15 @@ --> <list type="bulleted"> <item> - <p>[manager] There was no way to specify transport domain. + <p>[manager] There was no way to specify transport domain. The transport domains was assumed to be IPv4 (transportDomainUdpIpv4). - This has now been changed so that it can also be IPv6 - (transportDomainUdpIpv6). - To facilitate this, the transport domain, <c>tdomain</c>, - is now a (new) valid option when + This has now been changed so that it can also be IPv6 + (transportDomainUdpIpv6). + To facilitate this, the transport domain, <c>tdomain</c>, + is now a (new) valid option when <seealso marker="snmpm#register_agent">registering</seealso> - a new agent (and - <seealso marker="snmpm#update_agent_info">updating</seealso> + a new agent (and + <seealso marker="snmpm#update_agent_info">updating</seealso> agent info). </p> <p>This also mean that the transport behaviour has changed. </p> <p>Own Id: OTP-9305</p> @@ -1514,10 +1611,10 @@ </item> <item> - <p>[compiler] Added the option - <seealso marker="snmpc#compile">warnings_as_errors</seealso> - (for the SNMP MIB compiler (escript) frontend, the option - <seealso marker="snmpc(command)#option_wae">--wae</seealso> is used) + <p>[compiler] Added the option + <seealso marker="snmpc#compile">warnings_as_errors</seealso> + (for the SNMP MIB compiler (escript) frontend, the option + <seealso marker="snmpc(command)#option_wae">--wae</seealso> is used) which specifies whether warnings should be treated as errors. </p> <p>Tuncer Ayaz</p> <p>Own Id: OTP-9437</p> @@ -1529,12 +1626,12 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> <item> - <p>The snmp config tool could not handle (manager) audit trail config + <p>The snmp config tool could not handle (manager) audit trail config because the option seqno was not handled. </p> <p>Own Id: OTP-9354</p> </item> @@ -1588,11 +1685,11 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> <item> - <p>[agent] Did not handle transport domains properly in some cases, + <p>[agent] Did not handle transport domains properly in some cases, for instance trap sending. </p> <p>Own Id: OTP-9400</p> </item> @@ -1629,9 +1726,9 @@ <list type="bulleted"> <item> <p>[agent] Added support for sending traps to IPv6 targets. </p> - <p>See the - <seealso marker="snmp_agent_config_files#target_addr">target address config file</seealso>, - the <seealso marker="snmpa_conf#target_addr_entry">target_addr_entry/11</seealso> function or + <p>See the + <seealso marker="snmp_agent_config_files#target_addr">target address config file</seealso>, + the <seealso marker="snmpa_conf#target_addr_entry">target_addr_entry/11</seealso> function or <seealso marker="snmp_target_mib#add_addr">add_addr/11</seealso> for more info. </p> <p>Own Id: OTP-9088</p> <p>Aux Id: Seq 11790</p> @@ -1640,7 +1737,7 @@ <item> <p>[agent] To be able to handle multiple engine-id(s) when - sending trap(s), the function + sending trap(s), the function <seealso marker="snmp_community_mib#add_community"> add_community/6</seealso> has been added. </p> <p>Own Id: OTP-9119</p> @@ -1650,14 +1747,14 @@ <item> <p>[manager] The API for snmp requests has been augmented to allow the caller to override some configuration. </p> - <p>This has been done by introducing a new set of API functions, see - <seealso marker="snmpm#sync_get2">sync_get2/3,4</seealso>, - <seealso marker="snmpm#async_get2">async_get2/3,4</seealso>, - <seealso marker="snmpm#sync_get_next2">sync_get_next2/3,4</seealso>, - <seealso marker="snmpm#async_get_next2">async_get_next2/3,4</seealso>, - <seealso marker="snmpm#sync_get_bulk2">sync_get_bulk2/5,6</seealso>, - <seealso marker="snmpm#async_get_bulk2">async_get_bulk2/5,6</seealso>, - <seealso marker="snmpm#sync_set2">sync_set2/3,4</seealso> and + <p>This has been done by introducing a new set of API functions, see + <seealso marker="snmpm#sync_get2">sync_get2/3,4</seealso>, + <seealso marker="snmpm#async_get2">async_get2/3,4</seealso>, + <seealso marker="snmpm#sync_get_next2">sync_get_next2/3,4</seealso>, + <seealso marker="snmpm#async_get_next2">async_get_next2/3,4</seealso>, + <seealso marker="snmpm#sync_get_bulk2">sync_get_bulk2/5,6</seealso>, + <seealso marker="snmpm#async_get_bulk2">async_get_bulk2/5,6</seealso>, + <seealso marker="snmpm#sync_set2">sync_set2/3,4</seealso> and <seealso marker="snmpm#async_set2">async_set2/3,4</seealso> for more info. </p> <p>Own Id: OTP-9162</p> @@ -1665,8 +1762,8 @@ <item> <p>[manager] The old API functions (for get and set - requests: - snmpm:g/3,4,5,6,7, snmpm:ag/3,4,5,6,7, + requests: + snmpm:g/3,4,5,6,7, snmpm:ag/3,4,5,6,7, snmpm:gn/3,4,5,6,7, snmpm:agn/3,4,5,6,7, snmpm:s/3,4,5,6,7, snmpm:s/3,4,5,6,7, snmpm:gb/5,6,7,8,9 and snmpm:agb/5,6,7,8,9) @@ -1678,12 +1775,12 @@ <item> <p>[agent] Pass extra info through the agent to the net-if process when sending notifications. </p> - <p>See + <p>See <seealso marker="snmpa#send_notification2"> - snmpa:send_notification2/3</seealso> for more info. - See also the incomming net-if messages when sending a - <seealso marker="snmp_agent_netif#im_send_pdu">trap</seealso> - (send_pdu message) and + snmpa:send_notification2/3</seealso> for more info. + See also the incomming net-if messages when sending a + <seealso marker="snmp_agent_netif#im_send_pdu">trap</seealso> + (send_pdu message) and <seealso marker="snmp_agent_netif#im_send_pdu_req"> notification</seealso> (send_pdu_req message). </p> <p>Own Id: OTP-9183</p> @@ -1701,15 +1798,15 @@ <section> <title>Fixed Bugs and Malfunctions</title> <!-- - <p>-</p> + <p>-</p> --> <list type="bulleted"> <item> <p>Fixed endode/decode of values of type <c>Counter32</c>. </p> - <p>This type (<c>Counter32</c>) is an unsigned integer 32, - but is actually encoded as an signed integer 32. - The encode/decode functions however, treated it as if it was + <p>This type (<c>Counter32</c>) is an unsigned integer 32, + but is actually encoded as an signed integer 32. + The encode/decode functions however, treated it as if it was encodeded as an unsigned integer 32. </p> <p>Own Id: OTP-9022</p> </item> @@ -1724,12 +1821,4 @@ </section> </section> <!-- 4.20 --> - - - <!-- section> - <title>Release notes history</title> - <p>For information about older versions see - <url href="part_notes_history_frame.html">release notes history</url>.</p> - </section --> </chapter> - diff --git a/lib/snmp/doc/src/part_notes.xml b/lib/snmp/doc/src/part_notes.xml deleted file mode 100644 index d149044169..0000000000 --- a/lib/snmp/doc/src/part_notes.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE part SYSTEM "part.dtd"> - -<part xmlns:xi="http://www.w3.org/2001/XInclude"> - <header> - <copyright> - <year>1997</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>SNMP Release Notes</title> - <prepared></prepared> - <docno></docno> - <date></date> - <rev></rev> - <file>part_notes.xml</file> - </header> - <description> - <p>A multilingual Simple Network Management Protocol application, - featuring an Extensible Agent, a simple manager and a MIB - compiler and facilities for implementing SNMP MIBs etc.</p> - <p>For information about older versions see - <url href="part_notes_history_frame.html">release notes history</url>.</p> - </description> - <xi:include href="notes.xml"/> -</part> - diff --git a/lib/snmp/doc/src/part_notes_history.xml b/lib/snmp/doc/src/part_notes_history.xml deleted file mode 100644 index aa5276dc94..0000000000 --- a/lib/snmp/doc/src/part_notes_history.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE part SYSTEM "part.dtd"> - -<part> - <header> - <copyright> - <year>2004</year><year>2016</year> - <holder>Ericsson AB. All Rights Reserved.</holder> - </copyright> - <legalnotice> - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - </legalnotice> - - <title>SNMP Release Notes History</title> - <prepared></prepared> - <responsible></responsible> - <docno></docno> - <approved></approved> - <checked></checked> - <date></date> - <rev></rev> - <file>part_notes_history.xml</file> - </header> - <description> - <p>A multilingual Simple Network Management Protocol application, - featuring an Extensible Agent, a simple manager and a MIB - compiler and facilities for implementing SNMP MIBs etc.</p> - </description> - <include file="notes_history"></include> -</part> - diff --git a/lib/snmp/doc/src/ref_man.gif b/lib/snmp/doc/src/ref_man.gif Binary files differdeleted file mode 100644 index b13c4efd53..0000000000 --- a/lib/snmp/doc/src/ref_man.gif +++ /dev/null diff --git a/lib/snmp/doc/src/snmp.gif b/lib/snmp/doc/src/snmp.gif Binary files differdeleted file mode 100644 index d9985f990b..0000000000 --- a/lib/snmp/doc/src/snmp.gif +++ /dev/null diff --git a/lib/snmp/doc/src/snmp_impl_example_agent.xml b/lib/snmp/doc/src/snmp_impl_example_agent.xml index a86006a0a7..e576fa51f3 100644 --- a/lib/snmp/doc/src/snmp_impl_example_agent.xml +++ b/lib/snmp/doc/src/snmp_impl_example_agent.xml @@ -47,6 +47,7 @@ EX1-MIB DEFINITIONS ::= BEGIN IMPORTS + experimental FROM RFC1155-SMI RowStatus FROM STANDARD-MIB DisplayString FROM RFC1213-MIB OBJECT-TYPE FROM RFC-1212 @@ -81,7 +82,7 @@ EX1-MIB DEFINITIONS ::= BEGIN FriendsEntry ::= SEQUENCE { - fIndex + fIndex INTEGER, fName DisplayString, @@ -105,6 +106,7 @@ EX1-MIB DEFINITIONS ::= BEGIN DESCRIPTION "Name of friend" ::= { friendsEntry 2 } + fAddress OBJECT-TYPE SYNTAX DisplayString (SIZE (0..255)) ACCESS read-write @@ -112,6 +114,7 @@ EX1-MIB DEFINITIONS ::= BEGIN DESCRIPTION "Address of friend" ::= { friendsEntry 3 } + fStatus OBJECT-TYPE SYNTAX RowStatus ACCESS read-write @@ -119,12 +122,13 @@ EX1-MIB DEFINITIONS ::= BEGIN DESCRIPTION "The status of this conceptual row." ::= { friendsEntry 4 } + fTrap TRAP-TYPE ENTERPRISE example1 VARIABLES { myName, fIndex } DESCRIPTION - "This trap is sent when something happens to - the friend specified by fIndex." + "This trap is sent when something happens to + the friend specified by fIndex." ::= 1 END </code> diff --git a/lib/snmp/doc/src/summary.html.src b/lib/snmp/doc/src/summary.html.src deleted file mode 100644 index 9bad4adbeb..0000000000 --- a/lib/snmp/doc/src/summary.html.src +++ /dev/null @@ -1 +0,0 @@ -Simple Network Management Protocol (SNMP) support including a MIB compiler, a simple SNMP manager and tools for creating SNMP agents diff --git a/lib/snmp/doc/src/user_guide.gif b/lib/snmp/doc/src/user_guide.gif Binary files differdeleted file mode 100644 index e6275a803d..0000000000 --- a/lib/snmp/doc/src/user_guide.gif +++ /dev/null diff --git a/lib/snmp/doc/src/warning.gif b/lib/snmp/doc/src/warning.gif Binary files differdeleted file mode 100644 index 96af52360e..0000000000 --- a/lib/snmp/doc/src/warning.gif +++ /dev/null diff --git a/lib/snmp/src/agent/snmp_generic.erl b/lib/snmp/src/agent/snmp_generic.erl index fc23e16ef1..e67a1b3c80 100644 --- a/lib/snmp/src/agent/snmp_generic.erl +++ b/lib/snmp/src/agent/snmp_generic.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2016. All Rights Reserved. +%% Copyright Ericsson AB 1996-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -413,20 +413,21 @@ table_check_status(NameDb, Col, ?'RowStatus_createAndGo', RowIndex, Cols) -> false -> % it's ok to use snmpa_local_db:table_construct_row since it's % side effect free and we only use the result temporary. - case catch snmpa_local_db:table_construct_row( + try snmpa_local_db:table_construct_row( NameDb, RowIndex, ?'RowStatus_createAndGo', Cols) of - {'EXIT', _Reason} -> - ?vtrace( - "failed construct row (createAndGo): " - " n Reason: ~p" - " n Stack: ~p", - [_Reason, erlang:get_stacktrace()]), - {noCreation, Col}; % Bad RowIndex Row -> case lists:member(noinit, tuple_to_list(Row)) of false -> {noError, 0}; _Found -> {inconsistentValue, Col} end + catch + _:_Reason -> + ?vtrace( + "failed construct row (createAndGo): " + " n Reason: ~p" + " n Stack: ~p", + [_Reason, erlang:get_stacktrace()]), + {noCreation, Col} % Bad RowIndex end; true -> {inconsistentValue, Col} end; @@ -435,17 +436,18 @@ table_check_status(NameDb, Col, ?'RowStatus_createAndGo', RowIndex, Cols) -> table_check_status(NameDb, Col, ?'RowStatus_createAndWait', RowIndex, Cols) -> case table_row_exists(NameDb, RowIndex) of false -> - case catch snmpa_local_db:table_construct_row( + try snmpa_local_db:table_construct_row( NameDb, RowIndex, ?'RowStatus_createAndGo', Cols) of - {'EXIT', _Reason} -> + _Row -> + {noError, 0} + catch + _:_Reason -> ?vtrace( "failed construct row (createAndWait): " " n Reason: ~p" " n Stack: ~p", [_Reason, erlang:get_stacktrace()]), - {noCreation, Col}; % Bad RowIndex - _Row -> - {noError, 0} + {noCreation, Col} % Bad RowIndex end; true -> {inconsistentValue, Col} end; diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index db09ec3dc5..ca61782639 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -8,10 +8,6 @@ %% {update, snmpa_local_db, soft, soft_purge, soft_purge, []} %% {add_module, snmpm_net_if_mt} [ - {<<"5\\.2\\.4">>, - [{load_module, snmp, soft_purge, soft_purge, []}, - {load_module, snmpc_lib, soft_purge, soft_purge, []}, - {load_module, snmpc_mib_gram, soft_purge, soft_purge, []}]}, {<<"5\\..*">>, [{restart_application, snmp}]}, {<<"4\\..*">>, [{restart_application, snmp}]} ], @@ -21,10 +17,6 @@ %% {remove, {snmpm_net_if_mt, soft_purge, soft_purge}} [ - {<<"5\\.2\\.4">>, - [{load_module, snmp, soft_purge, soft_purge, []}, - {load_module, snmpc_lib, soft_purge, soft_purge, []}, - {load_module, snmpc_mib_gram, soft_purge, soft_purge, []}]}, {<<"5\\..*">>, [{restart_application, snmp}]}, {<<"4\\..*">>, [{restart_application, snmp}]} ] diff --git a/lib/snmp/src/compile/snmpc.erl b/lib/snmp/src/compile/snmpc.erl index 416353508e..7f627d66d9 100644 --- a/lib/snmp/src/compile/snmpc.erl +++ b/lib/snmp/src/compile/snmpc.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2016. All Rights Reserved. +%% Copyright Ericsson AB 1997-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -455,7 +455,9 @@ compile_parsed_data(#pdata{mib_name = MibName, Deprecated = get_deprecated(Opts), RelChk = get_relaxed_row_name_assign_check(Opts), Data = #dldata{deprecated = Deprecated, - relaxed_row_name_assign_check = RelChk}, + relaxed_row_name_assign_check = RelChk}, + mc_new_type_loop(Definitions), + put(augmentations, false), definitions_loop(Definitions, Data), MibName. @@ -480,7 +482,40 @@ do_update_imports([{{Mib, ImportsFromMib0},_Line}|Imports], Acc) -> update_status(Name, Status) -> #cdata{status_ets = Ets} = get(cdata), ets:insert(Ets, {Name, Status}). - + + +mc_new_type_loop( + [{#mc_new_type{ + name = NewTypeName, + macro = Macro, + syntax = OldType, + display_hint = DisplayHint},Line}|T]) -> + ?vlog2("typeloop -> new_type:" + "~n Macro: ~p" + "~n NewTypeName: ~p" + "~n OldType: ~p" + "~n DisplayHint: ~p", + [Macro, NewTypeName, OldType, DisplayHint], Line), + ensure_macro_imported(Macro,Line), + Types = (get(cdata))#cdata.asn1_types, + case lists:keysearch(NewTypeName, #asn1_type.aliasname, Types) of + {value,_} -> + snmpc_lib:print_error("Type ~w already defined.", + [NewTypeName],Line); + false -> + %% NameOfOldType = element(2,OldType), + ASN1 = snmpc_lib:make_ASN1type(OldType), + snmpc_lib:add_cdata(#cdata.asn1_types, + [ASN1#asn1_type{aliasname = NewTypeName, + imported = false, + display_hint = DisplayHint}]) + end, + mc_new_type_loop(T); +mc_new_type_loop([_|T]) -> + mc_new_type_loop(T); +mc_new_type_loop([]) -> + ok. + %% A deprecated object definitions_loop([{#mc_object_type{name = ObjName, status = deprecated}, @@ -744,32 +779,8 @@ definitions_loop([{#mc_object_type{name = NameOfTable, ColMEs]), definitions_loop(RestObjs, Data); -definitions_loop([{#mc_new_type{name = NewTypeName, - macro = Macro, - syntax = OldType, - display_hint = DisplayHint},Line}|T], - Data) -> - ?vlog2("defloop -> new_type:" - "~n Macro: ~p" - "~n NewTypeName: ~p" - "~n OldType: ~p" - "~n DisplayHint: ~p", - [Macro, NewTypeName, OldType, DisplayHint], Line), - ensure_macro_imported(Macro,Line), - Types = (get(cdata))#cdata.asn1_types, - case lists:keysearch(NewTypeName, #asn1_type.aliasname, Types) of - {value,_} -> - snmpc_lib:print_error("Type ~w already defined.", - [NewTypeName],Line); - false -> - %% NameOfOldType = element(2,OldType), - ASN1 = snmpc_lib:make_ASN1type(OldType), - snmpc_lib:add_cdata(#cdata.asn1_types, - [ASN1#asn1_type{aliasname = NewTypeName, - imported = false, - display_hint = DisplayHint}]) - end, - definitions_loop(T, Data); +definitions_loop([{#mc_new_type{},_}|T], Data) -> + definitions_loop(T, Data); %% Plain variable definitions_loop([{#mc_object_type{name = NewVarName, @@ -1211,7 +1222,39 @@ definitions_loop([{Obj,Line}|T], Data) -> definitions_loop([], _Data) -> ?vlog("defloop -> done", []), - ok. + case get(augmentations) of + true -> + CData = get(cdata), + put(cdata, CData#cdata{mes = augmentations(CData#cdata.mes)}), + ok; + false -> + ok + end. + +augmentations( + [#me{ + aliasname = AliasName, + assocList = + [{table_info, + #table_info{ + index_types = + {augments, SrcTableEntry, Line}} = TableInfo}|Ref]} = Me + |Mes]) -> + ?vlog("augmentations(~w) ->" + "~n NameOfTable: ~p" + "~n IndexingInfo: ~p" + "~n Sline: ~p", + [?LINE, AliasName, {augments, SrcTableEntry}, Line]), + NewTableInfo = snmpc_lib:fix_table_info_augmentation(TableInfo), + [Me#me{assocList = [{table_info,NewTableInfo}|Ref]} + |augmentations(Mes)]; +augmentations([Me | Mes]) -> + [Me|augmentations(Mes)]; +augmentations([]) -> + ?vlog("augmentations -> done", []), + []. + + safe_elem(N,T) -> case catch(element(N,T)) of diff --git a/lib/snmp/src/compile/snmpc_lib.erl b/lib/snmp/src/compile/snmpc_lib.erl index 33ddd78308..19a6bc8851 100644 --- a/lib/snmp/src/compile/snmpc_lib.erl +++ b/lib/snmp/src/compile/snmpc_lib.erl @@ -26,7 +26,7 @@ -export([test_father/4, make_ASN1type/1, import/1, makeInternalNode2/2, is_consistent/1, resolve_defval/1, make_variable_info/1, check_trap_name/3, make_table_info/5, get_final_mib/2, set_dir/2, - look_at/1, add_cdata/2, + fix_table_info_augmentation/1, look_at/1, add_cdata/2, check_object_group/4, check_notification_group/4, check_notification/3, register_oid/4, @@ -710,25 +710,34 @@ check_trap_name(EnterpriseName, Line, MEs) -> %% functions for tables. %%---------------------------------------------------------------------- +fix_table_info_augmentation( + #table_info{index_types = {augments, SrcTableEntry, Line}} = TableInfo) -> + MEs = (get(cdata))#cdata.mes, + Aug = + case lookup(SrcTableEntry, MEs) of + false -> + print_error( + "Cannot AUGMENT the non-existing table entry ~p", + [SrcTableEntry], Line), + {augments, error}; + {value, ME} -> + {augments, + {SrcTableEntry, translate_type(ME#me.asn1_type)}} + end, + TableInfo#table_info{index_types = Aug}. + + make_table_info(Line, TableName, {augments, SrcTableEntry}, _, ColumnMEs) -> ColMEs = lists:keysort(#me.oid, ColumnMEs), - Nbr_of_Cols = length(ColMEs), - MEs = ColMEs ++ (get(cdata))#cdata.mes, - Aug = case lookup(SrcTableEntry, MEs) of - false -> - print_error("Cannot AUGMENT the non-existing table entry ~p", - [SrcTableEntry], Line), - {augments, error}; - {value, ME} -> - {augments, {SrcTableEntry, translate_type(ME#me.asn1_type)}} - end, - FirstNonIdxCol = augments_first_non_index_column(ColMEs), + Nbr_of_Cols = length(ColMEs), + put(augmentations, true), + FirstNonIdxCol = augments_first_non_index_column(ColMEs), NoAccs = list_not_accessible(FirstNonIdxCol, ColMEs), FirstAcc = first_accessible(TableName, ColMEs), #table_info{nbr_of_cols = Nbr_of_Cols, - first_accessible = FirstAcc, - not_accessible = NoAccs, - index_types = Aug}; + first_accessible = FirstAcc, + not_accessible = NoAccs, + index_types = {augments, SrcTableEntry, Line}}; make_table_info(Line, TableName, {indexes, []}, _, _ColumnMEs) -> print_error("Table ~w lacks indexes.", [TableName],Line), #table_info{}; diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl index 93c987eb0f..29216f9d6a 100644 --- a/lib/snmp/src/manager/snmpm_net_if.erl +++ b/lib/snmp/src/manager/snmpm_net_if.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2015. All Rights Reserved. +%% Copyright Ericsson AB 2004-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -367,7 +367,7 @@ common_socket_opts(Opts) -> default -> []; Sz -> - [{sndbuf, Sz}] + [{recbuf, Sz}] end ++ case get_opt(Opts, no_reuse, false) of false -> diff --git a/lib/snmp/test/snmp_agent_test.erl b/lib/snmp/test/snmp_agent_test.erl index 3c1a6f2afd..2ed2c4580c 100644 --- a/lib/snmp/test/snmp_agent_test.erl +++ b/lib/snmp/test/snmp_agent_test.erl @@ -605,7 +605,12 @@ init_per_group(multiple_reqs_3 = GroupName, Config) -> init_per_group(test_multi_threaded = GroupName, Config) -> init_mt(snmp_test_lib:init_group_top_dir(GroupName, Config)); init_per_group(test_v3 = GroupName, Config) -> - init_v3(snmp_test_lib:init_group_top_dir(GroupName, Config)); + case snmp_test_lib:crypto_start() of + ok -> + init_v3(snmp_test_lib:init_group_top_dir(GroupName, Config)); + _ -> + {skip, "Crypto did not start"} + end; init_per_group(test_v1_v2 = GroupName, Config) -> init_v1_v2(snmp_test_lib:init_group_top_dir(GroupName, Config)); init_per_group(test_v2 = GroupName, Config) -> @@ -631,11 +636,26 @@ init_per_group(mib_storage_varm_dets = GroupName, Config) -> init_varm_mib_storage_dets( snmp_test_lib:init_group_top_dir(GroupName, Config)); init_per_group(mib_storage_size_check_mnesia = GroupName, Config) -> - init_size_check_msm(snmp_test_lib:init_group_top_dir(GroupName, Config)); + case snmp_test_lib:crypto_start() of + ok -> + init_size_check_msm(snmp_test_lib:init_group_top_dir(GroupName, Config)); + _ -> + {skip, "Crypto did not start"} + end; init_per_group(mib_storage_size_check_dets = GroupName, Config) -> - init_size_check_msd(snmp_test_lib:init_group_top_dir(GroupName, Config)); + case snmp_test_lib:crypto_start() of + ok -> + init_size_check_msm(snmp_test_lib:init_group_top_dir(GroupName, Config)); + _ -> + {skip, "Crypto did not start"} + end; init_per_group(mib_storage_size_check_ets = GroupName, Config) -> - init_size_check_mse(snmp_test_lib:init_group_top_dir(GroupName, Config)); + case snmp_test_lib:crypto_start() of + ok -> + init_size_check_msm(snmp_test_lib:init_group_top_dir(GroupName, Config)); + _ -> + {skip, "Crypto did not start"} + end; init_per_group(mib_storage_mnesia = GroupName, Config) -> init_mib_storage_mnesia(snmp_test_lib:init_group_top_dir(GroupName, Config)); diff --git a/lib/snmp/test/snmp_compiler_test.erl b/lib/snmp/test/snmp_compiler_test.erl index 9b3c2bfd2c..0a7b729d1f 100644 --- a/lib/snmp/test/snmp_compiler_test.erl +++ b/lib/snmp/test/snmp_compiler_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2017. All Rights Reserved. +%% Copyright Ericsson AB 2003-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -57,8 +57,9 @@ otp_8595/1, otp_10799/1, otp_10808/1, - otp_14145/1 - + otp_14145/1, + otp_13014/1, + otp_14196/1 ]). %%---------------------------------------------------------------------- @@ -137,7 +138,8 @@ all() -> groups() -> [{tickets, [], - [otp_6150, otp_8574, otp_8595, otp_10799, otp_10808, otp_14145]}]. + [otp_6150, otp_8574, otp_8595, otp_10799, otp_10808, otp_14145, + otp_13014, otp_14196]}]. init_per_group(_GroupName, Config) -> Config. @@ -436,7 +438,7 @@ otp_10808(Config) when is_list(Config) -> otp_14145(suite) -> []; otp_14145(Config) when is_list(Config) -> - put(tname, otp10808), + put(tname, otp14145), p("starting with Config: ~p~n", [Config]), Dir = ?config(case_top_dir, Config), @@ -457,6 +459,56 @@ otp_14145(Config) when is_list(Config) -> %%====================================================================== +otp_13014(suite) -> + []; +otp_13014(Config) when is_list(Config) -> + put(tname, otp13014), + p("starting with Config: ~p~n", [Config]), + + Dir = ?config(case_top_dir, Config), + MibDir = ?config(mib_dir, Config), + MibName = "Test-LLDP-MIB", + MibFile = join(MibDir, MibName++".mib"), + ?line {ok, MibBin} = + snmpc:compile(MibFile, [{outdir, Dir}, + {verbosity, log}, + {group_check, false}, + module_compliance]), + p("Mib: ~n~p~n", [MibBin]), + #mib{mes = MEs} = read_mib(MibBin), + Oid = [1,0,8802,1,1,2,1,1,7], + #me{ + entrytype = table, + aliasname = lldpConfigManAddrTable, + assocList = [{table_info,TableInfo}]} = + lists:keyfind(Oid, #me.oid, MEs), + #table_info{ + nbr_of_cols = 1, + first_accessible = 1, + not_accessible = [], + index_types = {augments,{lldpLocManAddrEntry,undefined}}} = + TableInfo, + ok. + +%%====================================================================== + +otp_14196(suite) -> + []; +otp_14196(Config) when is_list(Config) -> + put(tname, otp14196), + p("starting with Config: ~p~n", [Config]), + + Dir = ?config(case_top_dir, Config), + MibDir = ?config(mib_dir, Config), + MibFile = join(MibDir, "OTP14196-MIB.mib"), + ?line {ok, Mib} = + snmpc:compile(MibFile, [{outdir, Dir}, {verbosity, trace}]), + p("Mib: ~n~p~n", [Mib]), + ok. + + +%%====================================================================== + augments_extra_info(suite) -> []; augments_extra_info(Config) when is_list(Config) -> diff --git a/lib/snmp/test/snmp_manager_test.erl b/lib/snmp/test/snmp_manager_test.erl index 71f4017d8b..6ced55f0cc 100644 --- a/lib/snmp/test/snmp_manager_test.erl +++ b/lib/snmp/test/snmp_manager_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2016. All Rights Reserved. +%% Copyright Ericsson AB 2003-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -156,16 +156,25 @@ init_per_suite(Config0) when is_list(Config0) -> ?DBG("init_per_suite -> entry with" "~n Config0: ~p", [Config0]), - Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0), - Config2 = snmp_test_lib:fix_data_dir(Config1), - - %% Mib-dirs - %% data_dir is trashed by the test-server / common-test - %% so there is no point in fixing it... - MibDir = snmp_test_lib:lookup(data_dir, Config2), - StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]), - - [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2]. + %% Preferably this test SUITE should be divided into groups + %% so that if crypto does not work only v3 tests that + %% need crypto will be skipped, but as this is only a + %% problem with one legacy test machine, we will procrastinate + %% until we have a more important reason to fix this. + case snmp_test_lib:crypto_start() of + ok -> + Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0), + Config2 = snmp_test_lib:fix_data_dir(Config1), + %% Mib-dirs + %% data_dir is trashed by the test-server / common-test + %% so there is no point in fixing it... + MibDir = snmp_test_lib:lookup(data_dir, Config2), + StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]), + + [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2]; + _ -> + {skip, "Crypto did not start"} + end. end_per_suite(Config) when is_list(Config) -> @@ -1760,7 +1769,7 @@ do_simple_sync_get2(Node, TargetName, Oids, Get, PostVerify) "~n Rem: ~w", [Reply, _Rem]), %% verify that the operation actually worked: - %% The order should be the same, so no need to seach + %% The order should be the same, so no need to search ?line ok = case Reply of {noError, 0, [#varbind{oid = ?sysObjectID_instance, value = SysObjectID}, @@ -2709,7 +2718,7 @@ do_simple_set2(Node, TargetName, VAVs, Set, PostVerify) -> "~n Rem: ~w", [Reply, _Rem]), %% verify that the operation actually worked: - %% The order should be the same, so no need to seach + %% The order should be the same, so no need to search %% The value we get should be exactly the same as we sent ?line ok = case Reply of {noError, 0, [#varbind{oid = ?sysName_instance, @@ -5118,10 +5127,10 @@ inform_swarm_collector(N) -> %% Note that we need to deal with re-transmissions! %% That is, the agent did not receive the ack in time, -%% and therefor did a re-transmit. This means that we -%% expect to receive more inform's then we actually -%% sent. So for sucess we assume: -%% +%% and therefor did a re-transmit. This means that we +%% expect to receive more inform's then we actually +%% sent. So for success we assume: +%% %% SentAckCnt = N %% RespCnt = N %% RecvCnt >= N diff --git a/lib/snmp/test/snmp_test_data/OTP14196-MIB.mib b/lib/snmp/test/snmp_test_data/OTP14196-MIB.mib new file mode 100644 index 0000000000..0b3c718a02 --- /dev/null +++ b/lib/snmp/test/snmp_test_data/OTP14196-MIB.mib @@ -0,0 +1,47 @@ +OTP14196-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, snmpModules, mib-2 + FROM SNMPv2-SMI + TEXTUAL-CONVENTION + FROM SNMPv2-TC + OBJECT-GROUP + FROM SNMPv2-CONF + ; + +otp14196MIB MODULE-IDENTITY + LAST-UPDATED "1004210000Z" + ORGANIZATION "" + CONTACT-INFO + "" + DESCRIPTION + "Test mib for OTP-14196" + ::= { snmpModules 1 } + +testCompliances OBJECT IDENTIFIER ::= { otp14196MIB 1 } +test OBJECT IDENTIFIER ::= { mib-2 15 } + +typeA OBJECT-TYPE + SYNTAX TypeAType + MAX-ACCESS accessible-for-notify + STATUS current + DESCRIPTION + "Test type for OTP-14196" + ::= { test 4711 } + +TypeAType ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "" + SYNTAX INTEGER + +testGroups OBJECT IDENTIFIER ::= { testCompliances 1 } + +testGroupA OBJECT-GROUP + OBJECTS { typeA } + STATUS current + DESCRIPTION + "" + ::= { testGroups 17 } + +END diff --git a/lib/snmp/test/snmp_test_data/Test-LLDP-MIB.mib b/lib/snmp/test/snmp_test_data/Test-LLDP-MIB.mib new file mode 100644 index 0000000000..40a9fc79e1 --- /dev/null +++ b/lib/snmp/test/snmp_test_data/Test-LLDP-MIB.mib @@ -0,0 +1,251 @@ +Test-LLDP-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Integer32, Counter32, NOTIFICATION-TYPE + FROM SNMPv2-SMI + TEXTUAL-CONVENTION, TimeStamp, TruthValue + FROM SNMPv2-TC + SnmpAdminString + FROM SNMP-FRAMEWORK-MIB + MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP + FROM SNMPv2-CONF; + +t-lldpMIB MODULE-IDENTITY + LAST-UPDATED "200505060000Z" -- May 06, 2005 + ORGANIZATION "IEEE 802.1 Working Group" + CONTACT-INFO + " Contact: The Erlang/OTP team at Ericsson AB, Sweden + + WG-URL: http://grouper.ieee.org/groups/802/1/index.html + WG-EMail: [email protected] + + Contact: Paul Congdon + Postal: Hewlett-Packard Company + 8000 Foothills Blvd. + Roseville, CA 95747 + USA + Tel: +1-916-785-5753 + E-mail: [email protected]" + DESCRIPTION + "This is the ripped out bits and pieces of LLDP-MIB + that triggered a compilation problem for Erlang/OTP's + MIB compiler due to an AUGMENTS in lldpConfigManAddrEntry + refering to a not yet defined OBJECT-TYPE lldpLocManAddrEntry. + Rip and rewrite done 2017. + + Management Information Base module for LLDP configuration, + statistics, local system data and remote systems data + components. + + Copyright (C) IEEE (2005). This version of this MIB module + is published as subclause 12.1 of IEEE Std 802.1AB-2005; + see the standard itself for full legal notices." + REVISION "200505060000Z" -- May 06, 2005 + DESCRIPTION + "Published as part of IEEE Std 802.1AB-2005 initial version." + ::= { iso std(0) iso8802(8802) ieee802dot1(1) ieee802dot1mibs(1) 2 } + +--lldpNotifications OBJECT IDENTIFIER ::= { lldpMIB 0 } +lldpObjects OBJECT IDENTIFIER ::= { t-lldpMIB 1 } +lldpConformance OBJECT IDENTIFIER ::= { t-lldpMIB 2 } + +-- +-- LLDP MIB Objects +-- + +lldpConfiguration OBJECT IDENTIFIER ::= { lldpObjects 1 } +--lldpStatistics OBJECT IDENTIFIER ::= { lldpObjects 2 } +lldpLocalSystemData OBJECT IDENTIFIER ::= { lldpObjects 3 } +--lldpRemoteSystemsData OBJECT IDENTIFIER ::= { lldpObjects 4 } +--lldpExtensions OBJECT IDENTIFIER ::= { lldpObjects 5 } + + + +LldpPortList ::= TEXTUAL-CONVENTION + STATUS current + DESCRIPTION + "Each octet within this value specifies a set of eight ports, + with the first octet specifying ports 1 through 8, the second + octet specifying ports 9 through 16, etc. Within each octet, + the most significant bit represents the lowest numbered port, + and the least significant bit represents the highest numbered + port. Thus, each port of the system is represented by a + single bit within the value of this object. If that bit has + a value of '1' then that port is included in the set of ports; + the port is not included if its bit has a value of '0'." + REFERENCE + "IETF RFC 2674 section 5" + SYNTAX OCTET STRING(SIZE(0..512)) + + + +-- +-- lldpManAddrConfigTxPortsTable : selection of management addresses +-- to be transmitted on a specified set +-- of ports. +-- + +lldpConfigManAddrTable OBJECT-TYPE + SYNTAX SEQUENCE OF LldpConfigManAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "The table that controls selection of LLDP management address + TLV instances to be transmitted on individual ports." + ::= { lldpConfiguration 7 } + +lldpConfigManAddrEntry OBJECT-TYPE + SYNTAX LldpConfigManAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "LLDP configuration information that specifies the set + of ports (represented as a PortList) on which the local + system management address instance will be transmitted. + + This configuration object augments the lldpLocManAddrEntry, + therefore it is only present along with the management + address instance contained in the associated + lldpLocManAddrEntry entry. + + Each active lldpConfigManAddrEntry must be restored from + non-volatile and re-created (along with the corresponding + lldpLocManAddrEntry) after a re-initialization of the + management system." + AUGMENTS { lldpLocManAddrEntry } + ::= { lldpConfigManAddrTable 1 } + +LldpConfigManAddrEntry ::= SEQUENCE { + lldpConfigManAddrPortsTxEnable LldpPortList +} + +lldpConfigManAddrPortsTxEnable OBJECT-TYPE + SYNTAX LldpPortList + MAX-ACCESS read-write + STATUS current + DESCRIPTION + "A set of ports that are identified by a PortList, in which + each port is represented as a bit. The corresponding local + system management address instance will be transmitted on the + member ports of the lldpManAddrPortsTxEnable. + + The default value for lldpConfigManAddrPortsTxEnable object + is empty binary string, which means no ports are specified + for advertising indicated management address instance." + REFERENCE + "IEEE 802.1AB-2005 10.2.1.1" + DEFVAL { ''H } -- empty binary string + ::= { lldpConfigManAddrEntry 1 } + + +-- +-- lldpLocManAddrTable : Management addresses of the local system +-- + +lldpLocManAddrTable OBJECT-TYPE + SYNTAX SEQUENCE OF LldpLocManAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This table contains management address information on the + local system known to this agent." + ::= { lldpLocalSystemData 8 } + +lldpLocManAddrEntry OBJECT-TYPE + SYNTAX LldpLocManAddrEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Management address information about a particular chassis + component. There may be multiple management addresses + configured on the system identified by a particular + lldpLocChassisId. Each management address should have + distinct 'management address type' (lldpLocManAddrSubtype) and + 'management address' (lldpLocManAddr.) + + Entries may be created and deleted in this table by the + agent." + INDEX { lldpLocManAddrIfId, + lldpLocManAddrLen } + ::= { lldpLocManAddrTable 1 } + +LldpLocManAddrEntry ::= SEQUENCE { + lldpLocManAddrIfId Integer32, + lldpLocManAddrLen Integer32, + lldpLocManAddrOID OBJECT IDENTIFIER +} + +lldpLocManAddrIfId OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The integer value used to identify the interface number + regarding the management address component associated with + the local system." + REFERENCE + "IEEE 802.1AB-2005 9.5.9.6" + ::= { lldpLocManAddrEntry 1 } + +lldpLocManAddrLen OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The total length of the management address subtype and the + management address fields in LLDPDUs transmitted by the + local LLDP agent. + + The management address length field is needed so that the + receiving systems that do not implement SNMP will not be + required to implement an iana family numbers/address length + equivalency table in order to decode the management adress." + REFERENCE + "IEEE 802.1AB-2005 9.5.9.2" + ::= { lldpLocManAddrEntry 2 } + +lldpLocManAddrOID OBJECT-TYPE + SYNTAX OBJECT IDENTIFIER + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The OID value used to identify the type of hardware component + or protocol entity associated with the management address + advertised by the local system agent." + REFERENCE + "IEEE 802.1AB-2005 9.5.9.8" + ::= { lldpLocManAddrEntry 3 } + + +lldpGroups OBJECT IDENTIFIER ::= { lldpConformance 1 } + +lldpLocSysGroup OBJECT-GROUP + OBJECTS { + lldpLocManAddrIfId, + lldpLocManAddrLen, + lldpLocManAddrOID + } + STATUS current + DESCRIPTION + "The collection of objects which are used to represent LLDP + Local System Information. + + This group is mandatory for agents which implement the LLDP + and have the capability of transmitting LLDP frames." + ::= { lldpGroups 6 } + +lldpConfigTxGroup OBJECT-GROUP + OBJECTS { + lldpConfigManAddrPortsTxEnable + } + STATUS current + DESCRIPTION + "The collection of objects which are used to configure the + LLDP implementation behavior. + + This group is mandatory for agents which implement the LLDP + and have the capability of transmitting LLDP frames." + ::= { lldpGroups 3 } + + +END diff --git a/lib/snmp/test/snmp_to_snmpnet_SUITE.erl b/lib/snmp/test/snmp_to_snmpnet_SUITE.erl index 24c14d86ea..6a3466b6e4 100644 --- a/lib/snmp/test/snmp_to_snmpnet_SUITE.erl +++ b/lib/snmp/test/snmp_to_snmpnet_SUITE.erl @@ -88,8 +88,17 @@ groups() -> ]. init_per_suite(Config) -> - [{agent_port, ?AGENT_PORT}, {manager_port, ?MANAGER_PORT} | Config]. - + case re:run(os:cmd("snmpd -v"),"NET-SNMP", [{capture, first}]) of + nomatch -> + {skip, "snmpd is NOT NET-SNMP"}; + {match, _} -> + case re:run(os:cmd("snmpd -v"),"5.4|5.6.2.1", [{capture, first}]) of + nomatch -> + [{agent_port, ?AGENT_PORT}, {manager_port, ?MANAGER_PORT} | Config]; + {match, _} -> + {skip, "buggy snmpd"} + end + end. end_per_suite(_Config) -> ok. @@ -322,7 +331,7 @@ snmpget(Oid, Transport, Config) -> Args = ["-c", "public", net_snmp_version(Versions), - "-m", "", + "-m", ":", "-Cf", net_snmp_addr_str(Transport), oid_str(Oid)], @@ -353,11 +362,13 @@ start_snmpd(Community, SysDescr, Config) -> ["--rocommunity"++domain_suffix(Domain)++"=" ++Community++" "++inet_parse:ntoa(Ip) || {Domain, {Ip, _}} <- Targets], + SnmpdArgs = - ["-f", "-r", %"-Dverbose", - "-c", filename:join(DataDir, "snmpd.conf"), - "-C", "-Lo", - "-m", "", + ["-f", "-r", %"-Dverbose", + "-c", filename:join(DataDir, "snmpd.conf"), + "-C", + "-Lo", + "-m", ":", "--sysDescr="++SysDescr, "--agentXSocket=tcp:localhost:"++integer_to_list(Port)] ++ CommunityArgs diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 30b8ee1124..96123f02f5 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -19,6 +19,6 @@ # %CopyrightEnd% APPLICATION = snmp -SNMP_VSN = 5.2.5 +SNMP_VSN = 5.2.11 PRE_VSN = APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)" |