diff options
author | Erlang/OTP <[email protected]> | 2019-04-16 16:37:35 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2019-04-16 16:37:35 +0200 |
commit | a2cc71859fdb332c9d2edd0d1408a4c1d8bc5646 (patch) | |
tree | 74578593b7ff4e88b29219b0095b47f40cf7b434 /lib/snmp/src/app | |
parent | c160968d28931bac6895004a780111f2d6306527 (diff) | |
parent | b9a0da00aa0259e35b505d674d2a656020fdbdfe (diff) | |
download | otp-a2cc71859fdb332c9d2edd0d1408a4c1d8bc5646.tar.gz otp-a2cc71859fdb332c9d2edd0d1408a4c1d8bc5646.tar.bz2 otp-a2cc71859fdb332c9d2edd0d1408a4c1d8bc5646.zip |
Merge branch 'bmk/snmp/20190328/get_mechanism/OTP-15691' into maint-20
* bmk/snmp/20190328/get_mechanism/OTP-15691:
[snmp|manager|test] Add bind_to for agents
[snmp|agent] Verbose (debug) improvements
[snmp|agent] Add the net-if data (Extra) argument to get-callbacks
[snmp|agent] Add the default get-mechanism module snmpa_get
[snmp|agent] Add the get-mechanism behaviour
[snmp|agent] Add/update/export useful types
[snmp|agent] Build order
[snmp|agent] Handle new get-mechanism config
Diffstat (limited to 'lib/snmp/src/app')
-rw-r--r-- | lib/snmp/src/app/snmp.app.src | 3 | ||||
-rw-r--r-- | lib/snmp/src/app/snmp.config | 1 | ||||
-rw-r--r-- | lib/snmp/src/app/snmp.erl | 24 |
3 files changed, 26 insertions, 2 deletions
diff --git a/lib/snmp/src/app/snmp.app.src b/lib/snmp/src/app/snmp.app.src index d4bf0de61a..178309b488 100644 --- a/lib/snmp/src/app/snmp.app.src +++ b/lib/snmp/src/app/snmp.app.src @@ -49,6 +49,9 @@ snmpa_error_io, snmpa_error_logger, snmpa_error_report, + snmpa_get, + snmpa_get_lib, + snmpa_get_mechanism, snmpa_local_db, snmpa_mib, snmpa_mib_data, diff --git a/lib/snmp/src/app/snmp.config b/lib/snmp/src/app/snmp.config index b66ef5d7df..f35a636157 100644 --- a/lib/snmp/src/app/snmp.config +++ b/lib/snmp/src/app/snmp.config @@ -8,6 +8,7 @@ %% {agent_verbosity, verbosity()} | %% {versions, versions()} | %% {priority, atom()} | +%% {get_mechanism, module()} | %% {set_mechanism, module()} | %% {authentication_service, module()} | %% {multi_threaded, bool()} | diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index 8a736f688b..216452afdd 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2017. All Rights Reserved. +%% Copyright Ericsson AB 1996-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -116,7 +116,10 @@ pdu/0, trappdu/0, mib/0, - mib_name/0, + mib_name/0, + + error_status/0, + error_index/0, void/0 ]). @@ -208,6 +211,23 @@ -type pdu() :: #pdu{}. -type trappdu() :: #trappdu{}. +%% We should really specify all of these, but they are so numerous... +%% See the validate_err/1 function in the snmpa_agent. +%% Here are a number of them: +%% badValue | +%% commitFailed | +%% genErr | +%% inconsistentName | inconsistentValue | +%% noAccess | noCreation | +%% noSuchInstance | noSuchName | noSuchObject | +%% notWritable | +%% resourceUnavailable | +%% undoFailed | +%% wrongValue + +-type error_status() :: atom(). +-type error_index() :: pos_integer(). + -type void() :: term(). |