From 7f26c62a2f705cca26227411547c31288df289c5 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 2 Mar 2011 16:55:02 +0100 Subject: Updated version, preliminary appup and release notes. --- lib/snmp/doc/src/notes.xml | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 2efeb8ae3f..8677d5ab61 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,6 +32,55 @@ notes.xml +
+ SNMP Development Toolkit 4.20 +

Version 4.20 supports code replacement in runtime from/to + version 4,19 and 4.18.

+ +
+ Improvements and new features + + + +

[agent] Added support for sending traps to IPv6 targets.

+

Own Id: OTP-9088

+

Aux Id: Seq 11790

+
+ +
+
+ +
+ Fixed Bugs and Malfunctions +

-

+ +
+ + +
+ Incompatibilities +

-

+
+ +
+
SNMP Development Toolkit 4.19

Version 4.19 supports code replacement in runtime from/to -- cgit v1.2.3 From 4526ec71fc913993ec6c5f0a9c0e11192240a60a Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 3 Mar 2011 14:27:32 +0100 Subject: Handling target address configuration files (with new Domain). Also added some proper documentation. --- lib/snmp/doc/src/notes.xml | 4 ++ lib/snmp/doc/src/snmp_agent_config_files.xml | 60 ++++++++++++---------------- lib/snmp/doc/src/snmp_target_mib.xml | 24 ++++++++--- lib/snmp/doc/src/snmpa_conf.xml | 25 +++++++++--- 4 files changed, 68 insertions(+), 45 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 8677d5ab61..8dd5bcb2c0 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -45,6 +45,10 @@

[agent] Added support for sending traps to IPv6 targets.

+

See the + target address config file, + the target_addr_entry/11 function or + add_addr/11 for more info.

Own Id: OTP-9088

Aux Id: Seq 11790

diff --git a/lib/snmp/doc/src/snmp_agent_config_files.xml b/lib/snmp/doc/src/snmp_agent_config_files.xml index b62269d506..bd5c537522 100644 --- a/lib/snmp/doc/src/snmp_agent_config_files.xml +++ b/lib/snmp/doc/src/snmp_agent_config_files.xml @@ -1,4 +1,4 @@ - + @@ -367,56 +367,50 @@ Target Address Definitions

The information about Target Address Definitions should be - stored in a file called - target_addr.conf. -

+ stored in a file called target_addr.conf.

The corresponding tables are snmpTargetAddrTable in the - SNMP-TARGET-MIB and snmpTargetAddrExtTable in the SNMP-COMMUNITY-MIB. -

-

Each entry is a term: -

-

{TargetName, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId}. or

-{TargetName, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize}.

+ SNMP-TARGET-MIB and snmpTargetAddrExtTable in the + SNMP-COMMUNITY-MIB.

+

Each entry is a term:

+

{TargetName, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId}.

or

+{TargetName, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize}.

or

+{TargetName, Domain, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize}.

TargetName is a unique non-empty string.

-

Ip is a list of four integers. -

+

Domain is one of the atoms: + transportDomainUdpIpv4 | transportDomainUdpIpv6.

-

Udp is an integer. -

+

Ip is a list of four or eight integers.

-

Timeout is an integer. -

+

Udp is an integer.

-

RetryCount is an integer. -

+

Timeout is an integer.

-

TagList is a string. -

+

RetryCount is an integer.

-

ParamsName is a string. -

+

TagList is a string.

-

EngineId is a string or the atom discovery. -

+

ParamsName is a string.

-

TMask is a string of size 0, or size 6 (default: []). -

+

EngineId is a string or the atom discovery.

-

MaxMessageSize is an integer (default: 2048). -

+

TMask is a list of integer() of size 0, + size 6 or size 10 (default: []).

+
+ +

MaxMessageSize is an integer (default: 2048).

Note that if EngineId has the value discovery, @@ -429,14 +423,10 @@ Target Parameters Definitions

The information about Target Parameters Definitions should be - stored in a file called - target_params.conf. -

+ stored in a file called target_params.conf.

The corresponding table is snmpTargetParamsTable in the - SNMP-TARGET-MIB. -

-

Each entry is a term: -

+ SNMP-TARGET-MIB.

+

Each entry is a term:

{ParamsName, MPModel, SecurityModel, SecurityName, SecurityLevel}.

diff --git a/lib/snmp/doc/src/snmp_target_mib.xml b/lib/snmp/doc/src/snmp_target_mib.xml index 4a36be19a3..d5151d41de 100644 --- a/lib/snmp/doc/src/snmp_target_mib.xml +++ b/lib/snmp/doc/src/snmp_target_mib.xml @@ -1,10 +1,10 @@ - +
- 19982009 + 19982011 Ericsson AB. All Rights Reserved. @@ -39,9 +39,21 @@ and functions for configuring the database.

The configuration files are described in the SNMP User's Manual.

- + +
+ DATA TYPES + + + +
+ configure(ConfDir) -> void() @@ -118,17 +130,19 @@ add_addr(Name, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret + add_addr(Name, Domain, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> Ret Add one target address definition Name = string() - Ip = [integer()], length 4 + Domain = transportDomain() + Ip = transportAddressIPv4() | transportAddressIPv6() (depends on the value of Domain) Port = integer() Timeout = integer() Retry = integer() TagList = string() ParamsName = string() EngineId = string() - TMask = string(), length 0 or 6 + TMask = transportAddressMask() (depends on Domain) MMS = integer() Ret = {ok, Key} | {error, Reason} Key = term() diff --git a/lib/snmp/doc/src/snmpa_conf.xml b/lib/snmp/doc/src/snmpa_conf.xml index d873574c6e..a533c179ee 100644 --- a/lib/snmp/doc/src/snmpa_conf.xml +++ b/lib/snmp/doc/src/snmpa_conf.xml @@ -1,10 +1,10 @@ - +
- 20062010 + 20062011 Ericsson AB. All Rights Reserved. @@ -38,8 +38,21 @@ used for manipulating (write/append/read) the config files of the SNMP agent.

- + + +
+ DATA TYPES + + + +
+ agent_entry(Tag, Val) -> agent_entry() @@ -381,17 +394,19 @@ target_addr_entry(Name, Ip, TagList, ParamsName, EngineId, TMask) -> target_addr_entry() target_addr_entry(Name, Ip, Udp, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry() target_addr_entry(Name, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry() + target_addr_entry(Name, Domain, Ip, Udp, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry() Create an target_addr entry Name = string() - Ip = string() + Domain = transportDomain() + Ip = transportAddressIPv4() | transportAddressIPv6() (depends on Domain) Udp = integer() Timeout = integer() RetryCount = integer() TagList = string() ParamsName = string() EngineId = string() - TMask = string() + TMask = transportAddressMask() (depends on Domain) MaxMessageSize = integer() target_addr_entry() = term() -- cgit v1.2.3 From b56002c163ff5f811da902129dd4b2f37edc226d Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 9 Mar 2011 16:52:33 +0100 Subject: Added the new mib TRANSPORT-ADDRESS-MIB to the mib for which we are building man-pages. --- lib/snmp/doc/src/files.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/files.mk b/lib/snmp/doc/src/files.mk index c906ba0cf2..44cfab0a14 100644 --- a/lib/snmp/doc/src/files.mk +++ b/lib/snmp/doc/src/files.mk @@ -157,4 +157,5 @@ MIB_FILES = \ $(MIBSDIR)/SNMP-VIEW-BASED-ACM-MIB.mib \ $(MIBSDIR)/SNMP-USM-AES-MIB.mib \ $(MIBSDIR)/INET-ADDRESS-MIB.mib \ + $(MIBSDIR)/TRANSPORT-ADDRESS-MIB.mib \ $(MIBSDIR)/OTP-SNMPEA-MIB.mib -- cgit v1.2.3 From 9b56ae6666dfa5e3389ec8ca117ddcbb4dc350a3 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 9 Mar 2011 17:23:28 +0100 Subject: The first basic (version) update: Version, release notes and (an empty) appup entry. --- lib/snmp/doc/src/notes.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 2efeb8ae3f..b7e50c47e4 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,6 +32,59 @@ notes.xml
+
+ SNMP Development Toolkit 4.20 +

Version 4.20 supports code replacement in runtime from/to + version 4.19 and 4.18.

+ +
+ Improvements and new features + + + +

[agent] To be able to handle multiple engine-id(s) when + sending trap(s), the function + add_community/6 + has been added.

+

Own Id: OTP-9119 Aux Id: Seq 11792

+
+ +
+
+ +
+ Fixed Bugs and Malfunctions +

-

+ +
+ + +
+ Incompatibilities +

-

+
+ +
+ +
SNMP Development Toolkit 4.19

Version 4.19 supports code replacement in runtime from/to @@ -126,6 +179,7 @@ snmp_view_basec_acm_mib:vacmAccessTable(set, RowIndex, Cols).

+
SNMP Development Toolkit 4.18

Version 4.18 supports code replacement in runtime from/to -- cgit v1.2.3 From 49737813349f164b35737eb3cd59491930128f58 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 31 Mar 2011 17:46:17 +0200 Subject: Deprecated old manager API (set and get) request functions. --- lib/snmp/doc/src/notes.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 2efeb8ae3f..87dcd46725 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,6 +32,52 @@ notes.xml

+
+ SNMP Development Toolkit 4.20 +

Version 4.20 supports code replacement in runtime from/to + version 4.19 and 4.18.

+ +
+ Improvements and new features + + + +

[manager] The old API functions (for get and set + requests) are now officially deprecated. + They will be removed as of R16B.

+

Own Id: OTP-9174

+
+ +
+
+ +
+ Fixed Bugs and Malfunctions +

-

+ +
+ + +
+ Incompatibilities +

-

+
+ +
+
SNMP Development Toolkit 4.19

Version 4.19 supports code replacement in runtime from/to -- cgit v1.2.3 From dbacaf9db7977c3ad4ff35f7f6fe0085a6ab9956 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 5 Apr 2011 14:37:40 +0200 Subject: Documentation updated. --- lib/snmp/doc/src/notes.xml | 15 ++ lib/snmp/doc/src/snmp_agent_netif.xml | 198 ++++++++++++++++----------- lib/snmp/doc/src/snmpa.xml | 251 +++++++++++++++++++++------------- 3 files changed, 291 insertions(+), 173 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index f5fa7065fb..e9787c17da 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -43,6 +43,21 @@

-

--> + +

[agent] Pass extra info through the agent to the net-if + process when sending notifications.

+

See + + snmpa:send_notification2/3 for more info. + See also the incomming net-if messages when sending a + trap + and + + notification.

+

Own Id: OTP-9183

+

Aux Id: Seq 11817

+
+

[agent] Added support for sending traps to IPv6 targets.

See the diff --git a/lib/snmp/doc/src/snmp_agent_netif.xml b/lib/snmp/doc/src/snmp_agent_netif.xml index 1f2dbe80db..d751740a82 100644 --- a/lib/snmp/doc/src/snmp_agent_netif.xml +++ b/lib/snmp/doc/src/snmp_agent_netif.xml @@ -1,4 +1,4 @@ - + @@ -65,16 +65,19 @@

+ Messages

The section Messages describes mandatory messages, which Net if must send and be able to receive.

+ Outgoing Messages

Net if must send the following message when it receives an - SNMP PDU from the network that is aimed for the MasterAgent: -

+ SNMP PDU from the network that is aimed for the MasterAgent: +

+
 MasterAgent ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, From, Extra}
       
@@ -106,9 +109,10 @@ MasterAgent ! {snmp_pdu, Vsn, Pdu, PduMS, ACMData, From, Extra} the request.

The following message is used to report that a response to a - request has been received. The only request an agent can send - is an Inform-Request. -

+ request has been received. The only request an agent can send + is an Inform-Request. +

+
 Pid ! {snmp_response_received, Vsn, Pdu, From}
       
@@ -131,119 +135,153 @@ Pid ! {snmp_response_received, Vsn, Pdu, From}
+ Incoming Messages

This section describes the incoming messages which a Net if - process must be able to receive. -

+ process must be able to receive. +

+

{snmp_response, Vsn, Pdu, Type, ACMData, To, Extra}

This message is sent to the Net if process from a master agent as a response to a previously received request.

- Vsn is either 'version-1', - 'version-2', or 'version-3'. + +

Vsn is either 'version-1', + 'version-2', or 'version-3'.

- Pdu is an SNMP PDU record (as defined in - snmp_types.hrl) with the SNMP response. + +

Pdu is an SNMP PDU record (as defined in + snmp_types.hrl) with the SNMP response.

- Type is the #pdu.type of the original - request. + +

Type is the #pdu.type + of the original request.

- ACMData is data used by the Access Control - Module in use. Normally this is just sent to - snmpa_mpd:generate_response_message (see Reference Manual). + +

ACMData is data used by the Access Control + Module in use. Normally this is just sent to + snmpa_mpd:generate_response_message + (see Reference Manual).

- To is the destination address. If UDP over IP - is used, this should be a 2-tuple {IP, UDPport}, - where IP is a 4-tuple with the IP address, and - UDPport is an integer. + +

To is the destination address. If UDP over IP + is used, this should be a 2-tuple {IP, UDPport}, + where IP is a 4-tuple with the IP address, and + UDPport is an integer.

- Extra is the term that the Net if process - sent to the agent when the request was sent to the agent. + +

Extra is the term that the Net if process + sent to the agent when the request was sent to the agent.

+

{discarded_pdu, Vsn, ReqId, ACMData, Variable, Extra}

This message is sent from a master agent if it for some - reason decided to discard the pdu. -

+ reason decided to discard the pdu.

- Vsn is either 'version-1', - 'version-2', or 'version-3'. + +

Vsn is either 'version-1', + 'version-2', or 'version-3'.

- ReqId is the request id of the original - request. + +

ReqId is the request id of the original request.

- ACMData is data used by the Access Control - Module in use. Normally this is just sent to - snmpa_mpd:generate_response_message (see Reference Manual). + +

ACMData is data used by the Access Control + Module in use. Normally this is just sent to + snmpa_mpd:generate_response_message + (see Reference Manual).

- Variable is the name of an snmp counter that - represents the error, e.g. snmpInBadCommunityUses. + +

Variable is the name of an snmp counter that + represents the error, e.g. snmpInBadCommunityUses.

- Extra is the term that the Net if process - sent to the agent when the request was sent to the agent. + +

Extra is the term that the Net if process + sent to the agent when the request was sent to the agent.

-

{send_pdu, Vsn, Pdu, MsgData, To}

+ +

{send_pdu, Vsn, Pdu, MsgData, To, Extra}

This message is sent from a master agent when a trap is - to be sent. -

+ to be sent.

- Vsn is either 'version-1', - 'version-2', or 'version-3'. + +

Vsn is either 'version-1', + 'version-2', or 'version-3'.

- Pdu is an SNMP PDU record (as defined in - snmp_types.hrl) with the SNMP response. + +

Pdu is an SNMP PDU record (as defined in + snmp_types.hrl) with the SNMP response.

+
+ +

MsgData is the message specific data used in + the SNMP message. This value is normally sent to + snmpa_mpd:generate_message/4. In SNMPv1 and + SNMPv2c, this message data is the community string. In + SNMPv3, it is the context information.

- MsgData is the message specific data used in - the SNMP message. This value is normally sent to - snmpa_mpd:generate_message/4. In SNMPv1 and - SNMPv2c, this message data is the community string. In - SNMPv3, it is the context information. + +

To is a list of the destination addresses and + their corresponding security parameters. This value is + normally sent to snmpa_mpd:generate_message/4.

- To is a list of the destination addresses and - their corresponding security parameters. This value is - normally sent to snmpa_mpd:generate_message/4. + +

Extra is any term that the notification sender + wishes to pass to the Net if process when sending a notification + (see + send notification + for more info).

-

{send_pdu_req, Vsn, Pdu, MsgData, To, Pid}

-

This - message is sent from a master - agent when a request is - to be sent. The only request an agent can send is - Inform-Request. The net if process needs to remember the - request id and the Pid, and when a response is received for - the request id, send it to Pid, using a - snmp_response_received message. -

- - Vsn is either 'version-1', - 'version-2', or 'version-3'. - - Pdu is an SNMP PDU record (as defined in - snmp_types.hrl) with the SNMP response. - - MsgData is the message specific data used in - the SNMP message. This value is normally sent to - snmpa_mpd:generate_message/4. In SNMPv1 and - SNMPv2c, this message data is the community string. In - SNMPv3, it is the context information. + +

{send_pdu_req, Vsn, Pdu, MsgData, To, Pid, Extra}

+

This message is sent from a master agent when a request is to + be sent. The only request an agent can send is Inform-Request. + The net if process needs to remember the request id and the Pid, + and when a response is received for the request id, send it to Pid, + using a snmp_response_received message.

+ + +

Vsn is either 'version-1', + 'version-2', or 'version-3'.

+
+ +

Pdu is an SNMP PDU record (as defined in + snmp_types.hrl) with the SNMP response.

+
+ +

MsgData is the message specific data used in + the SNMP message. This value is normally sent to + snmpa_mpd:generate_message/4. In SNMPv1 and + SNMPv2c, this message data is the community string. In + SNMPv3, it is the context information.

+
+ +

To is a list of the destination addresses and + their corresponding security parameters. This value is + normally sent to snmpa_mpd:generate_message/4.

+
+ +

Pid is a process identifier.

+
+ +

Extra is any term that the notification sender + wishes to pass to the Net if process when sending a notification + (see + send notification + for more info).

- To is a list of the destination addresses and - their corresponding security parameters. This value is - normally sent to snmpa_mpd:generate_message/4. - - Pid is a process identifier. - -
+
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml index 1d680e80f5..1800bbc91a 100644 --- a/lib/snmp/doc/src/snmpa.xml +++ b/lib/snmp/doc/src/snmpa.xml @@ -872,10 +872,139 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2). then that sub-agent will be unregistered from all trees in Agent.

- + + + + send_notification2(Agent, Notification, SendOpts) -> void() + Send notification + + Agent = pid() | atom() + Notification = atom() + SendOpts = [send_option()] + send_option() = {receiver, receiver()} | {name, notify_name()} | {context, context_name()} | {varbinds, varbinds()} | {local_engine_id, string()} | {extra, extra_info()} + override_option() = atom() + receiver() = no_receiver | {tag(), tag_receiver()} | notification_delivery_info() + tag() = term(() + tag_receiver() = pid() | registered_name() | {Mod, Func, Args} + registered_name() = atom() + Mod = atom() + Func = atom() + Args = list() + notify_name() = string() + context_name() = string() + varbinds() = [varbind()] + varbind() = {variable(), value()} | {column(), row_index(), value()} | {oid(), value()} + variable() = atom() + value() = term() + column() = atom() + row_index() = [int()] + extra_info() = term() + + +

Send the notification Notification to the management + targets defined for notify-name (name) in the + snmpNotifyTable in SNMP-NOTIFICATION-MIB from the + specified context.

+ +

If no name is specified (or if it is ""), the + notification is sent to all management targets.

+ +

If no context is specified, the default context, "", + is used.

+ +

The send option receiver specifies where information + about delivery of Inform-Requests should be sent. The agent + sends Inform-Requests and waits for acknowledgments from the + management targets. + The receiver can have three values:

+ + + +

no_receiver - No information is delivered.

+
+ + +

notification_delivery_info() - The information is + delivered via a function call according to this data. See the + DATA TYPES section + above for details.

+
+ + +

{tag(), tag_receiver()} - The information is delivered + either via messages or via a function call according to the value + of tag_receiver().

+

Delivery is done differently depending on the value + of tag_receiver():

+ + + +

pid() | registered_name() - The info will be delivered in + the following messages:

+ + +

{snmp_targets, tag(), Addresses}

+

This informs the user which target addresses the + notification was sent to.

+
+ +

{snmp_notification, tag(), {got_response, Address}}

+

This informs the user that this target address + acknowledged the notification.

+
+ +

{snmp_notification, tag(), {no_response, Address}}

+

This informs the user that this target address + did not acknowledge the notification.

+
+
+

The notification is sent as an Inform-Request to each + target address in Addresses and if there are no + targets for which an Inform-Request is sent, Addresses + is the empty list [].

+

The tag_receiver() will first be sent the + snmp_targets message, and then for each address in + Addresses list, one of the two snmp_notification + messages.

+
+ + +

{Mod, Func, Args} - The info will be delivered via + the function call:

+

Mod:Func([Msg | Args])

+

where Msg has the same content and purpose as the + messages descrived above.

+
+ +
+
+
+ + +

The extra info is not normally interpreted by the agent, + instead it is passed through to the + net-if process. It is + up to the implementor of that process to make use of this data.

+

The version of net-if provided by this application makes no use + of this data, with one exception: + Any tuple containing the atom + snmpa_default_notification_extra_info + may be used by the agent and is therefor reserved.

+

See the net-if incomming messages for sending a + + trap and + + notification for more info.

+
+ + +
+
+ + send_notification(Agent, Notification, Receiver) send_notification(Agent, Notification, Receiver, Varbinds) @@ -907,29 +1036,25 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2).

Sends the notification Notification to the - management targets defined for NotifyName in the - snmpNotifyTable in SNMP-NOTIFICATION-MIB from the - specified context. If no NotifyName is specified (or - if it is ""), the notification is sent to all - management targets (Addresses below). If no ContextName - is specified, the default "" context is used. -

+ management targets defined for NotifyName in the + snmpNotifyTable in SNMP-NOTIFICATION-MIB from the + specified context.

+

If no NotifyName is specified (or if it is ""), + the notification is sent to all management targets + (Addresses below).

+

If no ContextName is specified, the default "" + context is used.

The parameter Receiver specifies where information - about delivery of Inform-Requests should be sent. The agent - sends Inform-Requests and waits for acknowledgments from the - managers. Receiver can have three values:

+ about delivery of Inform-Requests should be sent. The agent + sends Inform-Requests and waits for acknowledgments from the + managers. Receiver can have three values:

no_receiver - No information is delivered.

- -

{Tag, Recv} - The information is delivered either via messages - or via a function call according to the value of Recv.

-
-

notification_delivery_info() - The information is delivered via a function call according to this data. See the @@ -937,6 +1062,12 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2). above for details.

+ +

{Tag, Recv} - The information is delivered either via + messages or via a function call according to the value of + Recv.

+
+
@@ -1064,86 +1195,20 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2). (see SNMP-FRAMEWORK-MIB).

- - +

ExtraInfo is not normally used in any way by the agent. + It is intended to be passed along to the net-if process, which is + a component that a user can implement themself. The users own net-if + may then make use of ExtraInfo. The net-if provided with this + application does not process ExtraInfo.

+

There is one exception. Any tuple containing the atom + snmpa_default_notification_extra_info will, in this context, + be considered belonging to this application, and may be processed + by the agent.

+ +
- discovery(TargetName, Notification) -> {ok, ManagerEngineID} | {error, Reason} -- cgit v1.2.3 From 96273e7f909b14163aa117174994362736590140 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 7 Apr 2011 12:20:56 +0200 Subject: Release notes and API cleanup. --- lib/snmp/doc/src/notes.xml | 30 +++++++++++++++--------------- lib/snmp/doc/src/snmpa.xml | 1 - 2 files changed, 15 insertions(+), 16 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index e9787c17da..6853eefad2 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -43,21 +43,6 @@

-

--> - -

[agent] Pass extra info through the agent to the net-if - process when sending notifications.

-

See - - snmpa:send_notification2/3 for more info. - See also the incomming net-if messages when sending a - trap - and - - notification.

-

Own Id: OTP-9183

-

Aux Id: Seq 11817

-
-

[agent] Added support for sending traps to IPv6 targets.

See the @@ -75,6 +60,21 @@

Own Id: OTP-9174

+ +

[agent] Pass extra info through the agent to the net-if + process when sending notifications.

+

See + + snmpa:send_notification2/3 for more info. + See also the incomming net-if messages when sending a + trap + and + + notification.

+

Own Id: OTP-9183

+

Aux Id: Seq 11817

+
+
diff --git a/lib/snmp/doc/src/snmpa.xml b/lib/snmp/doc/src/snmpa.xml index 1800bbc91a..27d89ea4e3 100644 --- a/lib/snmp/doc/src/snmpa.xml +++ b/lib/snmp/doc/src/snmpa.xml @@ -885,7 +885,6 @@ snmp_agent:register_subagent(SA1,[1,2,3], SA2). Notification = atom() SendOpts = [send_option()] send_option() = {receiver, receiver()} | {name, notify_name()} | {context, context_name()} | {varbinds, varbinds()} | {local_engine_id, string()} | {extra, extra_info()} - override_option() = atom() receiver() = no_receiver | {tag(), tag_receiver()} | notification_delivery_info() tag() = term(() tag_receiver() = pid() | registered_name() | {Mod, Func, Args} -- cgit v1.2.3 From 6f7913a20db1f59a67cc22ae3b6ce6d4d013deee Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 13 Apr 2011 12:05:20 +0200 Subject: Proper interface documentation for new API. Also release notes with links into API. --- lib/snmp/doc/src/notes.xml | 23 ++- lib/snmp/doc/src/snmpm.xml | 354 ++++++++++++++++++++++++++++----------------- 2 files changed, 247 insertions(+), 130 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index f5fa7065fb..11d2a513df 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -53,9 +53,30 @@

Aux Id: Seq 11790

+ +

[manager] The API for snmp requests has been changed to + allow the caller to override some configuration.

+

See + sync_get/3,4, + async_get/3,4, + sync_get_next/3,4, + async_get_next/3,4, + sync_get_bulk/5,6, + async_get_bulk/5,6, + sync_set/3,4 and + async_set/3,4 + for more info.

+

Own Id: OTP-9162

+
+

[manager] The old API functions (for get and set - requests) are now officially deprecated. + 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) + are now officially deprecated. They will be removed as of R16B.

Own Id: OTP-9174

diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml index 1ee391d9ba..db7abd6867 100644 --- a/lib/snmp/doc/src/snmpm.xml +++ b/lib/snmp/doc/src/snmpm.xml @@ -1,4 +1,4 @@ - + @@ -63,6 +63,10 @@ value_type() = o ('OBJECT IDENTIFIER') | c64 ('Counter64') | tt ('TimeTicks') value() = term() +community() = string() +sec_model() = any | v1 | v2c | usm +sec_name() = string() +sec_level() = noAuthNoPriv | authNoPriv | authPriv ]]> @@ -488,22 +492,20 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 sync_get(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get(UserId, TargetName, ContextName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get(UserId, TargetName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get(UserId, TargetName, ContextName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get(UserId, TargetName, ContextName, Oids, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous get-request UserId = term() TargetName = target_name() - ContextName = string() Oids = [oid()] - Timeout = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() - Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term() - R = term() + Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + ReqId = term() + ActualReason = term() SecInfo = [sec_info()] sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} sec_tag() = atom() @@ -512,19 +514,29 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Synchronous get-request.

-

Remaining is the remaining time of the given or - default timeout time.

+ +

Remaining is the remaining time of the given (or default) + timeout time.

+

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

-

For SnmpInfo, see the user callback function - handle_report.

+ the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. + ActualReason is the actual reason in this case.

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a option (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

+ +

For SnmpInfo, see the user callback function + handle_report.

@@ -532,33 +544,39 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 async_get(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} - async_get(UserId, TargetName, ContextName, Oids) -> {ok, ReqId} | {error, Reason} - async_get(UserId, TargetName, Oids, Expire) -> {ok, ReqId} | {error, Reason} - async_get(UserId, TargetName, ContextName, Oids, Expire) -> {ok, ReqId} | {error, Reason} - async_get(UserId, TargetName, ContextName, Oids, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + async_get(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous get-request UserId = term() TargetName = target_name() - ContextName = string() Oids = [oid()] - Expire = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = term() Reason = term()

Asynchronous get-request.

+

The reply, if it arrives, will be delivered to the user - through a call to the snmpm_user callback function - handle_pdu.

-

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ through a call to the snmpm_user callback function + handle_pdu.

+ +

The send option timeout specifies for how long the request is + valid (after which the manager is free to delete it).

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

@@ -566,35 +584,51 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 sync_get_next(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_next(UserId, TargetName, ContextName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_next(UserId, TargetName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_next(UserId, TargetName, ContextName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_next(UserId, TargetName, ContextName, Oids, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous get-next-request UserId = term() TargetName = target_name() - ContextName = string() Oids = [oid()] - Timeout = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() - Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term() - R = term() + Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + ReqId = term() + ActualReason = term() + SecInfo = [sec_info()] + sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} + sec_tag() = atom() + ExpectedValue = ReceivedValue = term() + SnmpInfo = term()

Synchronous get-next-request.

-

Remaining time of the given or default timeout time.

+ +

Remaining is the remaining time of the given (or default) + timeout time.

+

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. + ActualReason is the actual reason in this case.

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

+ +

For SnmpInfo, see the user callback function + handle_report.

@@ -602,27 +636,36 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 async_get_next(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} - async_get_next(UserId, TargetName, ContextName, Oids) -> {ok, ReqId} | {error, Reason} - async_get_next(UserId, TargetName, Oids, Expire) -> {ok, ReqId} | {error, Reason} - async_get_next(UserId, TargetName, ContextName, Oids, Expire) -> {ok, ReqId} | {error, Reason} - async_get_next(UserId, TargetName, ContextName, Oids, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + async_get_next(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous get-next-request UserId = term() TargetName = target_name() - ContextName = string() Oids = [oid()] - Expire = integer() - ExtraInfo = term() + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = integer() Reason = term()

Asynchronous get-next-request.

+

The reply will be delivered to the user through a call - to the snmpm_user callback function handle_pdu.

-

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

+ to the snmpm_user callback function handle_pdu.

+ +

The send option timeout specifies for how long the request is + valid (after which the manager is free to delete it).

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

@@ -630,37 +673,54 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 sync_set(UserId, TargetName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_set(UserId, TargetName, ContextName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_set(UserId, TargetName, VarsAndVals, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_set(UserId, TargetName, ContextName, VarsAndVals, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_set(UserId, TargetName, ContextName, VarsAndVals, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous set-request UserId = term() TargetName = target_name() - ContextName = string() VarsAndVals = vars_and_vals() - Timeout = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + ReqId = term() ActualReason = term() + SecInfo = [sec_info()] + sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} + sec_tag() = atom() + ExpectedValue = ReceivedValue = term() + SnmpInfo = term()

Synchronous set-request.

-

Remaining time of the given or default timeout time.

-

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

When var_and_val() is {oid(), value()}, the - manager makes an educated guess based on the loaded mibs.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ +

Remaining is the remaining time of the given (or default) + timeout time.

+ +

When Reason is {send_failed, ...} it means that + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. + ActualReason is the actual reason in this case.

+ +

When var_and_val() is {oid(), value()}, the + manager makes an educated guess based on the loaded mibs.

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

+ +

For SnmpInfo, see the user callback function + handle_report.

@@ -668,33 +728,41 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 async_set(UserId, TargetName, VarsAndVals) -> {ok, ReqId} | {error, Reason} - async_set(UserId, TargetName, ContextName, VarsAndVals) -> {ok, ReqId} | {error, Reason} - async_set(UserId, TargetName, VarsAndVals, Expire) -> {ok, ReqId} | {error, Reason} - async_set(UserId, TargetName, ContextName, VarsAndVals, Expire) -> {ok, ReqId} | {error, Reason} - async_set(UserId, TargetName, ContextName, VarsAndVals, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + async_set(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous set-request UserId = term() TargetName = target_name() VarsAndVals = vars_and_vals() - Expire = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = term() Reason = term()

Asynchronous set-request.

-

The reply will be delivered to the user through a call - to the snmpm_user callback function handle_pdu.

-

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

-

When var_and_val() is {oid(), value()}, the - manager makes an educated guess based on the loaded mibs.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ +

The reply will be delivered to the user through a call + to the snmpm_user callback function handle_pdu.

+ +

The send option timeout specifies for how long the request is + valid (after which the manager is free to delete it).

+ +

When var_and_val() is {oid(), value()}, the + manager makes an educated guess based on the loaded mibs.

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

@@ -702,36 +770,53 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_bulk(UserId, TragetName, NonRep, MaxRep, ContextName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_bulk(UserId, TragetName, NonRep, MaxRep, ContextName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_bulk(UserId, TragetName, NonRep, MaxRep, ContextName, Oids, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous get-bulk-request UserId = term() TargetName = target_name() NonRep = integer() MaxRep = integer() - ContextName = string() Oids = [oid()] - Timeout = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} SnmpReply = snmp_reply() Remaining = integer() - Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + ReqId = term() + ActualReason = term() + SecInfo = [sec_info()] + sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} + sec_tag() = atom() + ExpectedValue = ReceivedValue = term() + SnmpInfo = term()

Synchronous get-bulk-request (See RFC1905).

-

Remaining time of the given or default timeout time.

+ +

Remaining is the remaining time of the given (or default) + timeout time.

+

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. + ActualReason is the actual reason in this case.

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

+ +

For SnmpInfo, see the user callback function + handle_report.

@@ -739,29 +824,40 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids) -> {ok, ReqId} | {error, Reason} - async_get_bulk(UserId, TargetName, NonRep, MaxRep, ContextName, Oids) -> {ok, ReqId} | {error, Reason} - async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids, Expire) -> {ok, ReqId} | {error, Reason} - async_get_bulk(UserId, TargetName, NonRep, MaxRep, ContextName, Oids, Expire) -> {ok, ReqId} | {error, Reason} - async_get_bulk(UserId, TargetName, NonRep, MaxRep, ContextName, Oids, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous get-bulk-request UserId = term() TargetName = target_name() NonRep = integer() MaxRep = integer() - ContextName = string() Oids = [oid()] - Expire = integer() - ExtraInfo = term() + SendOpts = send_opts() + send_opts() = [send_opt()] + send_opt() = {context, string()} | {timeout, pos_integer()} | {extra, term()} | {community, community()} | {sec_model, sec_model()} | {sec_name, string()} | {sec_level, sec_level()} | {max_message_size, pos_integer()} ReqId = integer() Reason = term()

Asynchronous get-bulk-request (See RFC1905).

+

The reply will be delivered to the user through a call - to the snmpm_user callback function handle_pdu.

-

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

+ to the snmpm_user callback function handle_pdu.

+ +

The send option timeout specifies for how long the request is + valid (after which the manager is free to delete it).

+ +

The send option extra specifies an opaque data structure + passed on to the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+ +

Some of the send options (community, sec_model, + sec_name, sec_level and max_message_size) + are override options. That is, + for this request, they override any configuration done + when the agent was registered.

-- cgit v1.2.3 From 32aa680d7b2a06299f2cf37d54496060fff1b44a Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 14 Apr 2011 09:07:04 +0200 Subject: Final version of the (new) API. --- lib/snmp/doc/src/notes.xml | 24 +++++++++++------------ lib/snmp/doc/src/snmpm.xml | 48 +++++++++++++++++++++++----------------------- 2 files changed, 36 insertions(+), 36 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 11d2a513df..ae00c42a7c 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -54,17 +54,17 @@ -

[manager] The API for snmp requests has been changed to +

[manager] The API for snmp requests has been augmented to allow the caller to override some configuration.

-

See - sync_get/3,4, - async_get/3,4, - sync_get_next/3,4, - async_get_next/3,4, - sync_get_bulk/5,6, - async_get_bulk/5,6, - sync_set/3,4 and - async_set/3,4 +

This has been done by introducing a new set of API functions, see + sync_get2/3,4, + async_get2/3,4, + sync_get_next2/3,4, + async_get_next2/3,4, + sync_get_bulk2/5,6, + async_get_bulk2/5,6, + sync_set2/3,4 and + async_set2/3,4 for more info.

Own Id: OTP-9162

@@ -304,7 +304,7 @@ snmp_view_basec_acm_mib:vacmAccessTable(set, RowIndex, Cols).

The config utility (snmp:config/0) generated a default notify.conf - with a bad name for the starndard trap entry (was "stadard trap", + with a bad name for the standard trap entry (was "stadard trap", but should have been "standard trap"). This has been corrected.

Kenji Rikitake

Own Id: OTP-8433

@@ -508,7 +508,7 @@ snmp_view_basec_acm_mib:vacmAccessTable(set, RowIndex, Cols).

The config utility (snmp:config/0) generated a default notify.conf - with a bad name for the starndard trap entry (was "stadard trap", + with a bad name for the standard trap entry (was "stadard trap", but should have been "standard trap"). This has been corrected.

Kenji Rikitake

Own Id: OTP-8433

diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml index db7abd6867..ff072205bc 100644 --- a/lib/snmp/doc/src/snmpm.xml +++ b/lib/snmp/doc/src/snmpm.xml @@ -486,13 +486,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Get a list of all registered usm users with engine-id EngineID.

- +
- sync_get(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get2(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get2(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous get-request UserId = term() @@ -538,13 +538,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

- +
- async_get(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} - async_get(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} + async_get2(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} + async_get2(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous get-request UserId = term() @@ -578,13 +578,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

- +
- sync_get_next(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_next(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next2(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next2(UserId, TargetName, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous get-next-request UserId = term() @@ -630,13 +630,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

- +
- async_get_next(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} - async_get_next(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} + async_get_next2(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} + async_get_next2(UserId, TargetName, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous get-next-request UserId = term() @@ -667,13 +667,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

- +
- sync_set(UserId, TargetName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_set(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set2(UserId, TargetName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set2(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous set-request UserId = term() @@ -722,13 +722,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

- +
- async_set(UserId, TargetName, VarsAndVals) -> {ok, ReqId} | {error, Reason} - async_set(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, ReqId} | {error, Reason} + async_set2(UserId, TargetName, VarsAndVals) -> {ok, ReqId} | {error, Reason} + async_set2(UserId, TargetName, VarsAndVals, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous set-request UserId = term() @@ -764,13 +764,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

- +
- sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} - sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk2(UserId, TragetName, NonRep, MaxRep, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk2(UserId, TragetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, SnmpReply, Remaining} | {error, Reason} Synchronous get-bulk-request UserId = term() @@ -818,13 +818,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

- +
- async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids) -> {ok, ReqId} | {error, Reason} - async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} + async_get_bulk2(UserId, TargetName, NonRep, MaxRep, Oids) -> {ok, ReqId} | {error, Reason} + async_get_bulk2(UserId, TargetName, NonRep, MaxRep, Oids, SendOpts) -> {ok, ReqId} | {error, Reason} Asynchronous get-bulk-request UserId = term() -- cgit v1.2.3 From e6a14f6efc61aec9eef4197c08fd8fbe9116281b Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 14 Apr 2011 09:31:32 +0200 Subject: Added the documentation for the previous request API (removed by misstake). --- lib/snmp/doc/src/snmpm.xml | 281 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml index ff072205bc..b1c8e56721 100644 --- a/lib/snmp/doc/src/snmpm.xml +++ b/lib/snmp/doc/src/snmpm.xml @@ -538,6 +538,50 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

+ + +
+ + + sync_get(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get(UserId, TargetName, ContextName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get(UserId, TargetName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get(UserId, TargetName, ContextName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get(UserId, TargetName, ContextName, Oids, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + Synchronous get-request + + UserId = term() + TargetName = target_name() + ContextName = string() + Oids = [oid()] + Timeout = integer() + ExtraInfo = term() + SnmpReply = snmp_reply() + Remaining = integer() + Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + R = term() + SecInfo = [sec_info()] + sec_info() = {sec_tag(), ExpectedValue, ReceivedValue} + sec_tag() = atom() + ExpectedValue = ReceivedValue = term() + SnmpInfo = term() + + +

Synchronous get-request.

+

Remaining is the remaining time of the given or + default timeout time.

+

When Reason is {send_failed, ...} it means that + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+

For SnmpInfo, see the user callback function + handle_report.

+
@@ -578,6 +622,40 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

+ + +
+ + + async_get(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} + async_get(UserId, TargetName, ContextName, Oids) -> {ok, ReqId} | {error, Reason} + async_get(UserId, TargetName, Oids, Expire) -> {ok, ReqId} | {error, Reason} + async_get(UserId, TargetName, ContextName, Oids, Expire) -> {ok, ReqId} | {error, Reason} + async_get(UserId, TargetName, ContextName, Oids, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + Asynchronous get-request + + UserId = term() + TargetName = target_name() + ContextName = string() + Oids = [oid()] + Expire = integer() + ExtraInfo = term() + ReqId = term() + Reason = term() + + +

Asynchronous get-request.

+

The reply, if it arrives, will be delivered to the user + through a call to the snmpm_user callback function + handle_pdu.

+

The Expire time indicates for how long the request is + valid (after which the manager is free to delete it).

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+
@@ -630,6 +708,42 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

+ + +
+ + + sync_get_next(UserId, TargetName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next(UserId, TargetName, ContextName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next(UserId, TargetName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next(UserId, TargetName, ContextName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_next(UserId, TargetName, ContextName, Oids, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + Synchronous get-next-request + + UserId = term() + TargetName = target_name() + ContextName = string() + Oids = [oid()] + Timeout = integer() + ExtraInfo = term() + SnmpReply = snmp_reply() + Remaining = integer() + Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + R = term() + + +

Synchronous get-next-request.

+

Remaining time of the given or default timeout time.

+

When Reason is {send_failed, ...} it means that + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+
@@ -667,6 +781,34 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

+ + +
+ + + async_get_next(UserId, TargetName, Oids) -> {ok, ReqId} | {error, Reason} + async_get_next(UserId, TargetName, ContextName, Oids) -> {ok, ReqId} | {error, Reason} + async_get_next(UserId, TargetName, Oids, Expire) -> {ok, ReqId} | {error, Reason} + async_get_next(UserId, TargetName, ContextName, Oids, Expire) -> {ok, ReqId} | {error, Reason} + async_get_next(UserId, TargetName, ContextName, Oids, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + Asynchronous get-next-request + + UserId = term() + TargetName = target_name() + ContextName = string() + Oids = [oid()] + Expire = integer() + ExtraInfo = term() + ReqId = integer() + Reason = term() + + +

Asynchronous get-next-request.

+

The reply will be delivered to the user through a call + to the snmpm_user callback function handle_pdu.

+

The Expire time indicates for how long the request is + valid (after which the manager is free to delete it).

+
@@ -722,6 +864,44 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

+ + +
+ + + sync_set(UserId, TargetName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set(UserId, TargetName, ContextName, VarsAndVals) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set(UserId, TargetName, VarsAndVals, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set(UserId, TargetName, ContextName, VarsAndVals, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_set(UserId, TargetName, ContextName, VarsAndVals, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + Synchronous set-request + + UserId = term() + TargetName = target_name() + ContextName = string() + VarsAndVals = vars_and_vals() + Timeout = integer() + ExtraInfo = term() + SnmpReply = snmp_reply() + Remaining = integer() + Reason = {send_failed, ReqId, ActualReason} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + ActualReason = term() + + +

Synchronous set-request.

+

Remaining time of the given or default timeout time.

+

When Reason is {send_failed, ...} it means that + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

When var_and_val() is {oid(), value()}, the + manager makes an educated guess based on the loaded mibs.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+
@@ -764,6 +944,40 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

+ + +
+ + + async_set(UserId, TargetName, VarsAndVals) -> {ok, ReqId} | {error, Reason} + async_set(UserId, TargetName, ContextName, VarsAndVals) -> {ok, ReqId} | {error, Reason} + async_set(UserId, TargetName, VarsAndVals, Expire) -> {ok, ReqId} | {error, Reason} + async_set(UserId, TargetName, ContextName, VarsAndVals, Expire) -> {ok, ReqId} | {error, Reason} + async_set(UserId, TargetName, ContextName, VarsAndVals, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + Asynchronous set-request + + UserId = term() + TargetName = target_name() + VarsAndVals = vars_and_vals() + Expire = integer() + ExtraInfo = term() + ReqId = term() + Reason = term() + + +

Asynchronous set-request.

+

The reply will be delivered to the user through a call + to the snmpm_user callback function handle_pdu.

+

The Expire time indicates for how long the request is + valid (after which the manager is free to delete it).

+

When var_and_val() is {oid(), value()}, the + manager makes an educated guess based on the loaded mibs.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+
@@ -818,6 +1032,43 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

For SnmpInfo, see the user callback function handle_report.

+ + +
+ + + sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk(UserId, TragetName, NonRep, MaxRep, ContextName, Oids) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk(UserId, TragetName, NonRep, MaxRep, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk(UserId, TragetName, NonRep, MaxRep, ContextName, Oids, Timeout) -> {ok, SnmpReply, Remaining} | {error, Reason} + sync_get_bulk(UserId, TragetName, NonRep, MaxRep, ContextName, Oids, Timeout, ExtraInfo) -> {ok, SnmpReply, Remaining} | {error, Reason} + Synchronous get-bulk-request + + UserId = term() + TargetName = target_name() + NonRep = integer() + MaxRep = integer() + ContextName = string() + Oids = [oid()] + Timeout = integer() + ExtraInfo = term() + SnmpReply = snmp_reply() + Remaining = integer() + Reason = {send_failed, ReqId, R} | {invalid_sec_info, SecInfo, SnmpInfo} | term() + + +

Synchronous get-bulk-request (See RFC1905).

+

Remaining time of the given or default timeout time.

+

When Reason is {send_failed, ...} it means that + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes no use of this info, so the only use for it + in such a configuration (when using the built in net-if) would + be tracing.

+
@@ -859,6 +1110,36 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 for this request, they override any configuration done when the agent was registered.

+ + +
+ + + async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids) -> {ok, ReqId} | {error, Reason} + async_get_bulk(UserId, TargetName, NonRep, MaxRep, ContextName, Oids) -> {ok, ReqId} | {error, Reason} + async_get_bulk(UserId, TargetName, NonRep, MaxRep, Oids, Expire) -> {ok, ReqId} | {error, Reason} + async_get_bulk(UserId, TargetName, NonRep, MaxRep, ContextName, Oids, Expire) -> {ok, ReqId} | {error, Reason} + async_get_bulk(UserId, TargetName, NonRep, MaxRep, ContextName, Oids, Expire, ExtraInfo) -> {ok, ReqId} | {error, Reason} + Asynchronous get-bulk-request + + UserId = term() + TargetName = target_name() + NonRep = integer() + MaxRep = integer() + ContextName = string() + Oids = [oid()] + Expire = integer() + ExtraInfo = term() + ReqId = integer() + Reason = term() + + +

Asynchronous get-bulk-request (See RFC1905).

+

The reply will be delivered to the user through a call + to the snmpm_user callback function handle_pdu.

+

The Expire time indicates for how long the request is + valid (after which the manager is free to delete it).

+
-- cgit v1.2.3 From 29ac3cf1c1e6620344192944ebeae7ee8f220bb7 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 14 Apr 2011 12:24:51 +0200 Subject: Detailed usage of "Extra" usage in the request API functions, including the reserved value. --- lib/snmp/doc/src/snmpm.xml | 210 +++++++++++++++++++++++++++------------------ 1 file changed, 125 insertions(+), 85 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/snmpm.xml b/lib/snmp/doc/src/snmpm.xml index b1c8e56721..72849b9c9e 100644 --- a/lib/snmp/doc/src/snmpm.xml +++ b/lib/snmp/doc/src/snmpm.xml @@ -525,9 +525,11 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a option (when using the built in net-if) would - be tracing.

+ application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) @@ -569,16 +571,18 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Synchronous get-request.

Remaining is the remaining time of the given or - default timeout time.

+ default timeout time.

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

For SnmpInfo, see the user callback function handle_report.

@@ -610,12 +614,14 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option timeout specifies for how long the request is valid (after which the manager is free to delete it).

-

The send option extra specifies an opaque data structure +

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

- + application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

+

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, @@ -646,15 +652,17 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Asynchronous get-request.

The reply, if it arrives, will be delivered to the user - through a call to the snmpm_user callback function - handle_pdu.

-

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ through a call to the snmpm_user callback function + handle_pdu.

+

The Expire time indicates for how long the request is + valid (after which the manager is free to delete it).

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

@@ -695,9 +703,11 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) @@ -735,15 +745,17 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Synchronous get-next-request.

Remaining time of the given or default timeout time.

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

- + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

+ @@ -769,12 +781,14 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option timeout specifies for how long the request is valid (after which the manager is free to delete it).

-

The send option extra specifies an opaque data structure +

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

- + application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

+

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, @@ -808,6 +822,13 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1 to the snmpm_user callback function handle_pdu.

The Expire time indicates for how long the request is valid (after which the manager is free to delete it).

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

@@ -851,9 +872,11 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) @@ -891,16 +914,18 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Synchronous set-request.

Remaining time of the given or default timeout time.

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

When var_and_val() is {oid(), value()}, the - manager makes an educated guess based on the loaded mibs.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+ the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

When var_and_val() is {oid(), value()}, the + manager makes an educated guess based on the loaded mibs.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

@@ -934,10 +959,12 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

- + application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

+

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, @@ -967,17 +994,19 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Asynchronous set-request.

The reply will be delivered to the user through a call - to the snmpm_user callback function handle_pdu.

+ to the snmpm_user callback function handle_pdu.

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

-

When var_and_val() is {oid(), value()}, the - manager makes an educated guess based on the loaded mibs.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

- + valid (after which the manager is free to delete it).

+

When var_and_val() is {oid(), value()}, the + manager makes an educated guess based on the loaded mibs.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

+ @@ -1019,10 +1048,12 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

The send option extra specifies an opaque data structure passed on to the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

- + application makes, with one exception, no use of this info, + so the only use for it in such a option (when using the built in + net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

+

Some of the send options (community, sec_model, sec_name, sec_level and max_message_size) are override options. That is, @@ -1059,15 +1090,17 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Synchronous get-bulk-request (See RFC1905).

Remaining time of the given or default timeout time.

-

When Reason is {send_failed, ...} it means that - the net_if process failed to send the message. This could happen - because of any number of reasons, i.e. encoding error. R - is the actual reason in this case.

-

ExtraInfo is an opaque data structure passed on to - the net-if process. The net-if process included in this - application makes no use of this info, so the only use for it - in such a configuration (when using the built in net-if) would - be tracing.

+

When Reason is {send_failed, ...} it means that + the net_if process failed to send the message. This could happen + because of any number of reasons, i.e. encoding error. R + is the actual reason in this case.

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

@@ -1136,9 +1169,16 @@ priv_key = [integer()] (length is 16 if priv = usmDESPrivProtocol | usmAesCfb1

Asynchronous get-bulk-request (See RFC1905).

The reply will be delivered to the user through a call - to the snmpm_user callback function handle_pdu.

+ to the snmpm_user callback function handle_pdu.

The Expire time indicates for how long the request is - valid (after which the manager is free to delete it).

+ valid (after which the manager is free to delete it).

+

ExtraInfo is an opaque data structure passed on to + the net-if process. The net-if process included in this + application makes, with one exception, no use of this info, + so the only use for it in such a configuration (when using the + built in net-if) would be tracing. The one usage exception is: + Any tuple with snmpm_extra_info_tag as its first + element is reserved for internal use.

-- cgit v1.2.3 From 3e372b28827c3b5bc683ac08002af9cb8da5c692 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 18 Apr 2011 16:48:34 +0200 Subject: Also updated the dokumentation for the added function. --- lib/snmp/doc/src/notes.xml | 4 ++-- lib/snmp/doc/src/snmp_community_mib.xml | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index b7e50c47e4..a098c909d4 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -46,8 +46,8 @@

[agent] To be able to handle multiple engine-id(s) when sending trap(s), the function - add_community/6 - has been added.

+ + add_community/6 has been added.

Own Id: OTP-9119 Aux Id: Seq 11792

diff --git a/lib/snmp/doc/src/snmp_community_mib.xml b/lib/snmp/doc/src/snmp_community_mib.xml index 7c7386af19..5e7bca3e27 100644 --- a/lib/snmp/doc/src/snmp_community_mib.xml +++ b/lib/snmp/doc/src/snmp_community_mib.xml @@ -1,10 +1,10 @@ - +
- 19992009 + 19992011 Ericsson AB. All Rights Reserved. @@ -35,11 +35,13 @@ Instrumentation Functions for SNMP-COMMUNITY-MIB

The module snmp_community_mib implements the instrumentation - functions for the - SNMP-COMMUNITY-MIB, and functions for configuring the database. -

+ functions for the SNMP-COMMUNITY-MIB, and functions for configuring the + database.

The configuration files are described in the SNMP User's Manual.

+ +
+ configure(ConfDir) -> void() @@ -68,8 +70,11 @@

The configuration file read is: community.conf.

+ +
+ reconfigure(ConfDir) -> void() Configure the SNMP-COMMUNITY-MIB @@ -96,28 +101,35 @@ where the configuration files are found.

The configuration file read is: community.conf.

+
+ add_community(Idx, CommName, SecName, CtxName, TransportTag) -> Ret + add_community(Idx, CommName, SecName, EngineId, CtxName, TransportTag) -> Ret Added one community Idx = string() CommName = string() SecName = string() + EngineId = string() CtxName = string() TransportTag = string() Ret = {ok, Key} | {error, Reason} Key = term() - Reason = term() + Reason = term()

Adds a community to the agent config. - Equivalent to one line in the community.conf file.

+ Equivalent to one line in the community.conf file.

+

With the EngineId argument it is possible to + override the configured engine-id (SNMP-FRAMEWORK-MIB).

+ delete_community(Key) -> Ret Delete one community -- cgit v1.2.3 From 4dde37d7d40d213ba052a4f6c18b7c257bf93960 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 11 May 2011 12:11:57 +0200 Subject: Release notes, test case and some minor decode fixes (allow only 32 bit values when decoding). --- lib/snmp/doc/src/notes.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index c507965cd8..105a977d92 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -43,6 +43,15 @@

-

--> + +

Fixed endode/decode of values of type Counter32.

+

This type (Counter32) 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.

+

Own Id: OTP-9022

+
+

[agent] Added support for sending traps to IPv6 targets.

See the -- cgit v1.2.3 From 2f53cae005b91e09969a715978e4001fc04cb668 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 16 May 2011 10:53:51 +0200 Subject: Moved entry from "Improvements..." to "Fixed...". --- lib/snmp/doc/src/notes.xml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'lib/snmp/doc/src') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index c1debd42b1..6a20d8ee3a 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -43,15 +43,6 @@

-

--> - -

Fixed endode/decode of values of type Counter32.

-

This type (Counter32) 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.

-

Own Id: OTP-9022

-
-

[agent] Added support for sending traps to IPv6 targets.

See the @@ -125,19 +116,21 @@

Fixed Bugs and Malfunctions -

-

+ -

[agent] For the table vacmAccessTable, - when performing the is_set_ok and set operation(s), - all values of the vacmAccessSecurityModel column was - incorrectly translated to any.

-

Own Id: OTP-8980

-
+

Fixed endode/decode of values of type Counter32.

+

This type (Counter32) 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.

+

Own Id: OTP-9022

+
--->
-- cgit v1.2.3