From 5af245e617ea5abad86131e194d304a66c72dd5d Mon Sep 17 00:00:00 2001
From: Micael Karlberg
Date: Wed, 9 Jun 2010 12:00:00 +0200
Subject: snmp: Patch 1125
OTP-8478 [agent] Added very basic support for multiple SNMPv3 EngineIDs
in a single agent.
---
lib/snmp/doc/src/notes.xml | 55 ++++++++++++++++++++++++++++++++++++++++++
lib/snmp/doc/src/snmpa.xml | 16 ++++++++++++
lib/snmp/doc/src/snmpa_mpd.xml | 42 +++++++++++++++++++++++++++-----
3 files changed, 107 insertions(+), 6 deletions(-)
(limited to 'lib/snmp/doc')
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 45e1549de7..3f4954cfbd 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -32,6 +32,61 @@
notes.xml
+
+ SNMP Development Toolkit 4.17
+ Version 4.17 supports code replacement in runtime from/to
+ version 4.16.2, 4.16.1, 4.16, 4.15, 4.14 and 4.13.5.
+
+
+ Improvements and new features
+
+
+ -
+
[agent] Added very basic support for multiple SNMPv3
+ EngineIDs in a single agent. See
+ send_notification/7,
+ process_packet/7,
+ generate_response_msg/6 or
+ generate_msg/6
+ for more info.
+
+ Own Id: OTP-8478
+
+
+
+
+
+
+
+ Reported Fixed Bugs and Malfunctions
+ -
+
+
+
+
+
+
+ Incompatibilities
+ -
+
+
+
+
SNMP Development Toolkit 4.16.2
Version 4.16.2 supports code replacement in runtime from/to
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml
index 69fe6d62f4..1be6abe6dd 100644
--- a/lib/snmp/doc/src/snmpa.xml
+++ b/lib/snmp/doc/src/snmpa.xml
@@ -881,6 +881,7 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2).
send_notification(Agent, Notification, Receiver, Varbinds)
send_notification(Agent, Notification, Receiver, NotifyName, Varbinds)
send_notification(Agent, Notification, Receiver, NotifyName, ContextName, Varbinds) -> void()
+ send_notification(Agent, Notification, Receiver, NotifyName, ContextName, Varbinds, LocalEngineID) -> void()
Send a notification
Agent = pid() | atom()
@@ -902,6 +903,7 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2).
OID = oid()
Value = term()
RowIndex = [int()]
+ LocalEngineID = string()
Sends the notification Notification to the
@@ -1041,6 +1043,7 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2).
- {?sysLocation_instance, "upstairs"} (provided
that the generated .hrl file is included)
+
If a variable in the notification is a table element, the
RowIndex for the element must be given in the
Varbinds list. In this case, the OBJECT IDENTIFIER sent
@@ -1048,15 +1051,27 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2).
element. This OBJECT IDENTIFIER could be used in a get
operation later.
+
This function is asynchronous, and does not return any
information. If an error occurs, user_err/2 of the error
report module is called and the notification is discarded.
+
+ Note that the use of the LocalEngineID argument is only intended
+ for special cases, if the agent is to "emulate" multiple EngineIDs!
+ By default, the agent uses the value of SnmpEngineID
+ (see SNMP-FRAMEWORK-MIB).
+
+
+
+
+
discovery(TargetName, Notification) -> {ok, ManagerEngineID} | {error, Reason}
diff --git a/lib/snmp/doc/src/snmpa_mpd.xml b/lib/snmp/doc/src/snmpa_mpd.xml
index ea5bde8956..202e6b5661 100644
--- a/lib/snmp/doc/src/snmpa_mpd.xml
+++ b/lib/snmp/doc/src/snmpa_mpd.xml
@@ -4,7 +4,7 @@
- 19992009
+ 19992010
Ericsson AB. All Rights Reserved.
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
snmpa_mpd
@@ -63,15 +63,19 @@
- process_packet(Packet, TDomain, TAddress, State) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}
+ process_packet(Packet, TDomain, TAddress, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}
+ process_packet(Packet, TDomain, TAddress, LocalEngineID, State, NoteStore, Log) -> {ok, Vsn, Pdu, PduMS, ACMData} | {discarded, Reason} | {discovery, DiscoPacket}
Process a packet received from the network
Packet = binary()
TDomain = snmpUDPDomain
TAddress = {Ip, Udp}
+ LocalEngineID = string()
Ip = {integer(), integer(), integer(), integer()}
Udp = integer()
State = mpd_state()
+ NoteStore = pid()
+ Log = snmp_log()
Vsn = 'version-1' | 'version-2' | 'version-3'
Pdu = #pdu
PduMs = integer()
@@ -84,18 +88,27 @@
decryption as necessary. The return values should be passed the
agent.
+
+ Note that the use of the LocalEngineID argument is only intended
+ for special cases, if the agent is to "emulate" multiple EngineIDs!
+ By default, the agent uses the value of SnmpEngineID
+ (see SNMP-FRAMEWORK-MIB).
+
+
- generate_response_msg(Vsn, RePdu, Type, ACMData) -> {ok, Packet} | {discarded, Reason}
+ generate_response_msg(Vsn, RePdu, Type, ACMData, Log) -> {ok, Packet} | {discarded, Reason}
+ generate_response_msg(Vsn, RePdu, Type, ACMData, LocalEngineID, Log) -> {ok, Packet} | {discarded, Reason}
Generate a response packet to be sent to the network
Vsn = 'version-1' | 'version-2' | 'version-3'
RePdu = #pdu
Type = atom()
ACMData = acm_data()
+ LocalEngineID = string()
Packet = binary()
@@ -103,17 +116,27 @@
network. Type is the #pdu.type of the original
request.
+
+ Note that the use of the LocalEngineID argument is only intended
+ for special cases, if the agent is to "emulate" multiple EngineIDs!
+ By default, the agent uses the value of SnmpEngineID
+ (see SNMP-FRAMEWORK-MIB).
+
+
- generate_msg(Vsn, Pdu, MsgData, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}
+ generate_msg(Vsn, NoteStore, Pdu, MsgData, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}
+ generate_msg(Vsn, NoteStore, Pdu, MsgData, LocalEngineID, To) -> {ok, PacketsAndAddresses} | {discarded, Reason}
Generate a request message to be sent to the network
Vsn = 'version-1' | 'version-2' | 'version-3'
+ NoteStore = pid()
Pdu = #pdu
MsgData = msg_data()
+ LocalEngineID = string()
To = [dest_addrs()]
PacketsAndAddresses = [{TDomain, TAddress, Packet}]
TDomain = snmpUDPDomain
@@ -136,6 +159,13 @@
also received from the requests mentioned above.
+
+ Note that the use of the LocalEngineID argument is only intended
+ for special cases, if the agent is to "emulate" multiple EngineIDs!
+ By default, the agent uses the value of SnmpEngineID
+ (see SNMP-FRAMEWORK-MIB).
+
+
--
cgit v1.2.3