aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/doc/src')
-rw-r--r--lib/snmp/doc/src/notes.xml128
-rw-r--r--lib/snmp/doc/src/snmp_app.xml7
-rw-r--r--lib/snmp/doc/src/snmp_config.xml9
-rw-r--r--lib/snmp/doc/src/snmpa.xml75
-rw-r--r--lib/snmp/doc/src/snmpa_mib_data.xml2
5 files changed, 172 insertions, 49 deletions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 646e3027d6..68743e60aa 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -36,7 +36,7 @@
<section>
<title>SNMP Development Toolkit 4.25</title>
<p>Version 4.25 supports code replacement in runtime from/to
- version 4.24.1, 4.24, 4.23.1 and 4.23. </p>
+ version 4.24.2, 4.24.1, 4.24, 4.23.1 and 4.23. </p>
<section>
<title>Improvements and new features</title>
@@ -46,6 +46,23 @@
<list type="bulleted">
<item>
+ <p>[agent] Enable SNMP to create missing database directories. </p>
+ <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>
+ and
+ <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
+ as a fatal error.
+ 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>
+ </item>
+
+ <item>
<p>[manager] Improved handling of unexpected return values from
<seealso marker="snmpm_user">snmpm_user</seealso>
callback functions. </p>
@@ -65,57 +82,102 @@
<!--
<list type="bulleted">
<item>
- <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,
- see <seealso marker="snmp_agent_config_files#vacm">vacm config file</seealso>
- 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
- (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
- is not strictly the case (see bitlist above). </p>
- <p>Own Id: OTP-11177</p>
- <p>Stefan Zegenhagen</p>
+ <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>
+ </list>
+-->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
<item>
- <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>
+ <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.25 -->
+
+
+ <section>
+ <title>SNMP Development Toolkit 4.24.2</title>
+ <p>Version 4.24.2 supports code replacement in runtime from/to
+ version 4.24.1, 4.24, 4.23.1 and 4.23. </p>
+
<section>
- <title>Incompatibilities</title>
+ <title>Improvements and new features</title>
<!--
<p>-</p>
-->
<list type="bulleted">
<item>
- <p>[manager] The
- <seealso marker="snmpm_user">snmpm_user</seealso>
- callback functions are no longer allowed to "return" via
- exit or throw. </p>
- <p>Own Id: OTP-11307</p>
+ <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
+ more info. </p>
+ <p>Own Id: OTP-11216</p>
</item>
</list>
+
</section>
- </section> <!-- 4.25 -->
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <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>
+
+ </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.24.2 -->
<section>
@@ -232,7 +294,7 @@
<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>) implement�ng this behaviour,
+ <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>
diff --git a/lib/snmp/doc/src/snmp_app.xml b/lib/snmp/doc/src/snmp_app.xml
index e5a05342c1..9ede75b943 100644
--- a/lib/snmp/doc/src/snmp_app.xml
+++ b/lib/snmp/doc/src/snmp_app.xml
@@ -763,12 +763,15 @@
</item>
<marker id="db_init_error"></marker>
- <tag><c>db_init_error() = terminate | create</c></tag>
+ <tag><c>db_init_error() = terminate | create | create_db_and_dir</c></tag>
<item>
<p>Defines what to do if the agent or manager is unable to open an
existing database file. <c>terminate</c> means that the
agent/manager will terminate and <c>create</c> means that the
- agent/manager will remove the faulty file(s) and create new ones.</p>
+ agent/manager will remove the faulty file(s) and create new ones,
+ and <c>create_db_and_dir</c> means that the agent/manager will
+ create the database file along with any missing parent directories
+ for the database file.</p>
<p>Default is <c>terminate</c>.</p>
</item>
diff --git a/lib/snmp/doc/src/snmp_config.xml b/lib/snmp/doc/src/snmp_config.xml
index 61ee7f00ee..30b46e6aa8 100644
--- a/lib/snmp/doc/src/snmp_config.xml
+++ b/lib/snmp/doc/src/snmp_config.xml
@@ -792,12 +792,15 @@ in so far as it will be converted to the new format if found.
</item>
<marker id="db_init_error"></marker>
- <tag><c>db_init_error() = terminate | create</c></tag>
+ <tag><c>db_init_error() = terminate | create | create_db_and_dir</c></tag>
<item>
<p>Defines what to do if the agent is unable to open an
existing database file. <c>terminate</c> means that the
- agent/manager will terminate and <c>create</c> means that the
- agent/manager will remove the faulty file(s) and create new ones.</p>
+ agent/manager will terminate, <c>create</c> means that the
+ agent/manager will remove the faulty file(s) and create new ones,
+ and <c>create_db_and_dir</c> means that the agent/manager will
+ create the database file along with any missing parent directories
+ for the database file.</p>
<p>Default is <c>terminate</c>.</p>
</item>
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml
index 86fde03205..77146f3a89 100644
--- a/lib/snmp/doc/src/snmpa.xml
+++ b/lib/snmp/doc/src/snmpa.xml
@@ -245,29 +245,75 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}
This function is used to convert to the old (pre-4.4) info
format. </p>
+ <marker id="load_mib"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>load_mib(Mib) -> ok | {error, Reason}</name>
+ <name>load_mib(Agent, Mib) -> ok | {error, Reason}</name>
+ <fsummary>Load single MIB into the agent</fsummary>
+ <type>
+ <v>Agent = pid() | atom()</v>
+ <v>MibName = string()</v>
+ <v>Reason = already_loaded | term()</v>
+ </type>
+ <desc>
+ <p>Load a single <c>Mib</c> into an agent. The <c>MibName</c>
+ is the name of the Mib, including the path to where the compiled
+ mib is found. For example: </p>
+ <code type="none">
+ Dir = code:priv_dir(my_app) ++ "/mibs/",
+ snmpa:load_mib(snmp_master_agent, Dir ++ "MY-MIB").
+ </code>
+
<marker id="load_mibs"></marker>
</desc>
</func>
<func>
<name>load_mibs(Mibs) -> ok | {error, Reason}</name>
- <name>load_mibs(Agent,Mibs) -> ok | {error, Reason}</name>
+ <name>load_mibs(Mibs, Force) -> ok | {error, Reason}</name>
+ <name>load_mibs(Agent, Mibs) -> ok | {error, Reason}</name>
+ <name>load_mibs(Agent, Mibs, Force) -> ok | {error, Reason}</name>
<fsummary>Load MIBs into the agent</fsummary>
<type>
<v>Agent = pid() | atom()</v>
<v>Mibs = [MibName]</v>
+ <v>Force = boolean()</v>
<v>MibName = string()</v>
- <v>Reason = term()</v>
+ <v>Reason = {'load aborted at', MibName, InternalReason}</v>
+ <v>InternalReason = already_loaded | term()</v>
</type>
<desc>
- <p>Loads <c>Mibs</c> into an agent. If the agent cannot load
- all MIBs, it will indicate where loading was aborted. The
- <c>MibName</c> is the name of the Mib, including the path to
- where the compiled mib is found. For example,</p>
- <code type="none">
+ <p>Load <c>Mibs</c> into an agent. If the agent cannot load all
+ MIBs (the default value of the <c>Force</c> argument is <c>false</c>),
+ it will indicate where loading was aborted. The <c>MibName</c>
+ is the name of the Mib, including the path to where the compiled
+ mib is found. For example,</p>
+ <code type="none">
Dir = code:priv_dir(my_app) ++ "/mibs/",
snmpa:load_mibs(snmp_master_agent, [Dir ++ "MY-MIB"]).
</code>
+ <p>If <c>Force = true</c> then the agent will continue attempting
+ to load each mib even after failing to load a previous mib. Use with
+ care. </p>
+
+ <marker id="unload_mib"></marker>
+ </desc>
+ </func>
+
+ <func>
+ <name>unload_mib(Mib) -> ok | {error, Reason}</name>
+ <name>unload_mib(Agent, Mib) -> ok | {error, Reason}</name>
+ <fsummary>Unload single MIB from the agent</fsummary>
+ <type>
+ <v>Agent = pid() | atom()</v>
+ <v>MibName = string()</v>
+ <v>Reason = not_loaded | term()</v>
+ </type>
+ <desc>
+ <p>Unload a single <c>Mib</c> from an agent. </p>
<marker id="unload_mibs"></marker>
</desc>
@@ -275,16 +321,25 @@ notification_delivery_info() = #snmpa_notification_delivery_info{}
<func>
<name>unload_mibs(Mibs) -> ok | {error, Reason}</name>
- <name>unload_mibs(Agent,Mibs) -> ok | {error, Reason}</name>
+ <name>unload_mibs(Mibs, Force) -> ok | {error, Reason}</name>
+ <name>unload_mibs(Agent, Mibs) -> ok | {error, Reason}</name>
+ <name>unload_mibs(Agent, Mibs, Force) -> ok | {error, Reason}</name>
<fsummary>Unload MIBs from the agent</fsummary>
<type>
<v>Agent = pid() | atom()</v>
<v>Mibs = [MibName]</v>
+ <v>Force = boolean()</v>
<v>MibName = string()</v>
+ <v>Reason = {'unload aborted at', MibName, InternalReason}</v>
+ <v>InternalReason = not_loaded | term()</v>
</type>
<desc>
- <p>Unloads MIBs into an agent. If it cannot unload all MIBs,
- it will indicate where unloading was aborted. </p>
+ <p>Unload <c>Mibs</c> from an agent. If it cannot unload all MIBs
+ (the default value of the <c>Force</c> argument is <c>false</c>),
+ it will indicate where unloading was aborted. </p>
+ <p>If <c>Force = true</c> then the agent will continue attempting
+ to unload each mib even after failing to unload a previous mib.
+ Use with care. </p>
<marker id="which_mibs"></marker>
</desc>
diff --git a/lib/snmp/doc/src/snmpa_mib_data.xml b/lib/snmp/doc/src/snmpa_mib_data.xml
index ff07a03b98..c1ea0a91f9 100644
--- a/lib/snmp/doc/src/snmpa_mib_data.xml
+++ b/lib/snmp/doc/src/snmpa_mib_data.xml
@@ -380,7 +380,7 @@
<desc>
<p>Perform a code-change (upgrade or downgrade). </p>
<p>See
- <seealso marker="gen_server">gen_server</seealso>
+ <seealso marker="stdlib:gen_server">gen_server</seealso>
for more info regarding the <c>Vsn</c> and <c>Extra</c> arguments. </p>
</desc>