aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-12-06 18:30:40 +0100
committerMicael Karlberg <[email protected]>2010-12-06 18:30:40 +0100
commit52140da6cf766ce65a12e6de529f5eafdde0b91a (patch)
tree95f9e5ae215140152b7fc6ade2de4903dbecb713 /lib
parente8d677e46c6bafd290d189e4b0385c21092e4e91 (diff)
downloadotp-52140da6cf766ce65a12e6de529f5eafdde0b91a.tar.gz
otp-52140da6cf766ce65a12e6de529f5eafdde0b91a.tar.bz2
otp-52140da6cf766ce65a12e6de529f5eafdde0b91a.zip
Added central utility function for printing all
"supported" tables (that is for all functions that we currently have implemented the print operation).
Diffstat (limited to 'lib')
-rw-r--r--lib/snmp/src/agent/snmpa.erl22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl
index 87b191caed..ce208d870b 100644
--- a/lib/snmp/src/agent/snmpa.erl
+++ b/lib/snmp/src/agent/snmpa.erl
@@ -105,6 +105,8 @@
set_request_limit/1, set_request_limit/2
]).
+-export([print_tables/0, print_tables/1]).
+
-include("snmpa_atl.hrl").
-define(EXTRA_INFO, undefined).
@@ -283,6 +285,26 @@ whereis_mib(Agent, Mib) when is_atom(Mib) ->
%% -
+print_tables() ->
+ Tables = [
+ {snmp_view_based_acm_mib, [vacmAccessTable,
+ vacmSecurityToGroupTable,
+ vacmViewTreeFamilyTable]},
+ {snmp_target_mib, [snmpTargetAddrTable, snmpTargetParamsTable]}
+ ],
+ print_tables(Tables).
+
+print_tables([]) ->
+ ok;
+print_tables([{Mod, Tables}|MibTables]) ->
+ [(catch Mod:Table(print)) || Table <- Tables],
+ print_tables(MibTables);
+print_tables([_|MibTables]) ->
+ print_tables(MibTables).
+
+
+%% -
+
mib_of(Oid) ->
snmpa_agent:mib_of(Oid).